/* ==========================================================================
   Aniqlab — product design system (v4 "Studio", 2026-12)
   One system for the marketing site, auth and the whole authenticated app.

   The palette is the one the product has always had — deep navy, one violet
   accent and the violet→magenta→rose brand gradient. The product itself is
   a light sheet set into a night-sky frame: a dock on top (no side menu),
   the page on a rounded sheet under it, the headline numbers on a dark band
   and everything you press a pill. Data colours carry meaning; the rest
   stays quiet.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
    /* surfaces */
    --bg:            #F3F2F9;
    --surface:       #FFFFFF;
    --surface-2:     #F7F6FB;
    --surface-3:     #ECEBF4;
    --overlay:       rgba(10, 11, 28, .58);

    /* lines */
    --border:        #E6E7F0;
    --border-2:      #D5D7E3;
    --border-soft:   #EFF0F6;

    /* text */
    --text:          #0D0F23;
    --text-1:        #0D0F23;
    --text-2:        #4E556B;
    --text-3:        #8990A6;
    --text-inv:      #FFFFFF;

    /* accent */
    --accent:        #6A4CFF;
    --accent-hover:  #5B3CF2;
    --accent-press:  #4C2EDB;
    --accent-soft:   #F1EEFF;
    --accent-ring:   rgba(106, 76, 255, .18);
    --accent-text:   #5233E6;

    /* brand moments */
    --brand-grad:    linear-gradient(135deg, #7C5CFF 0%, #B84DEB 52%, #FF7A9A 100%);
    --brand-grad-h:  linear-gradient(90deg, #7C5CFF 0%, #B84DEB 52%, #FF7A9A 100%);
    --brand-soft:    linear-gradient(135deg, #F1EDFF 0%, #FBEAF7 60%, #FFEDEF 100%);
    --navy:          #0B0D20;
    --frame:         #090A1C;
    --navy-2:        #15183B;
    --ink-grad:      linear-gradient(180deg, #1C2048 0%, #0E1026 100%);

    /* semantic */
    --pos:           #079455;
    --pos-soft:      #E7F7EE;
    --neg:           #E0362C;
    --neg-soft:      #FEEFEE;
    --warn:          #C2610C;
    --warn-soft:     #FFF3E3;
    --info:          #1F74DB;
    --info-soft:     #EAF2FE;

    /* data-viz */
    --dv-1: #6A4CFF;
    --dv-2: #2E90FA;
    --dv-3: #12B3A2;
    --dv-4: #F59E0B;
    --dv-5: #EC4899;

    /* type */
    --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* radius */
    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 26px;
    --r-xl: 32px;
    --r-full: 999px;

    /* elevation — every shadow is tinted with the navy/violet of the brand */
    --sh-xs:   0 1px 2px rgba(13, 15, 35, .05);
    --sh-card: 0 1px 1px rgba(13, 15, 35, .03), 0 2px 6px -2px rgba(13, 15, 35, .05), 0 14px 30px -20px rgba(44, 32, 120, .20);
    --sh-sm:   0 1px 2px rgba(13, 15, 35, .06), 0 3px 8px -3px rgba(13, 15, 35, .08);
    --sh-md:   0 2px 4px rgba(13, 15, 35, .04), 0 12px 26px -12px rgba(44, 32, 120, .26);
    --sh-lg:   0 6px 14px rgba(13, 15, 35, .06), 0 28px 60px -20px rgba(30, 22, 90, .38);
    --sh-glow: 0 10px 28px -10px rgba(106, 76, 255, .55);

    /* motion */
    --ease:   cubic-bezier(.2, .7, .2, 1);
    --t-fast: 130ms cubic-bezier(.2, .7, .2, 1);
    --t:      200ms cubic-bezier(.2, .7, .2, 1);
    --t-slow: 320ms cubic-bezier(.2, .7, .2, 1);

    /* layout */
    --sidebar-w: 292px;
    --topbar-h: 72px;
    --page-max: 1320px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.55;
    letter-spacing: -.006em;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -.025em; line-height: 1.22; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -.038em; }
h2 { font-size: 20px; }
h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -.016em; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* The `hidden` attribute must beat any component `display` value — modals,
   conditional form fields and tab panels all rely on it to stay closed. */
[hidden] { display: none !important; }
::selection { background: rgba(124, 92, 255, .22); color: var(--accent-press); }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
* { scrollbar-width: thin; scrollbar-color: #CDD0DE transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #CDD0DE; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #B4B8CA; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- typography helpers ---------- */
.t-dim     { color: var(--text-2); }
.t-faint   { color: var(--text-3); }
.t-sm      { font-size: 13px; }
.t-xs      { font-size: 12px; }
.t-num     { font-variant-numeric: tabular-nums; letter-spacing: -.02em; font-weight: 650; }
.t-display { font-family: var(--font-display); }
.t-grad {
    background: var(--brand-grad-h); -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    --btn-bg: var(--surface);
    --btn-fg: var(--text);
    --btn-bd: var(--border-2);
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 40px; padding: 0 18px;
    font-size: 13.5px; font-weight: 600; white-space: nowrap; letter-spacing: -.008em;
    color: var(--btn-fg); background: var(--btn-bg);
    border: 1px solid var(--btn-bd); border-radius: 999px;
    cursor: pointer; text-decoration: none;
    transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t), transform var(--t-fast), color var(--t-fast), filter var(--t-fast);
    box-shadow: var(--sh-xs), inset 0 -1px 0 rgba(13, 15, 35, .03);
}
.btn:hover { text-decoration: none; background: var(--surface-2); border-color: #C3C7D6; box-shadow: var(--sh-sm); }
.btn:active { transform: translateY(.5px) scale(.99); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

.btn-primary {
    --btn-fg: #fff;
    background: linear-gradient(135deg, #8062FF 0%, #6A4CFF 46%, #7A3FF0 100%);
    border-color: transparent;
    box-shadow: 0 1px 1px rgba(46, 26, 150, .30), 0 10px 20px -10px rgba(106, 76, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .24);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #8A6EFF 0%, #6F52FF 46%, #8A49F5 100%);
    border-color: transparent; transform: translateY(-1px);
    box-shadow: 0 1px 1px rgba(46, 26, 150, .30), 0 14px 26px -10px rgba(106, 76, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn-primary:active { background: var(--accent-press); transform: translateY(0) scale(.99); }

/* The brand gradient as a button — the one "do this" moment on a page. */
.btn-brand {
    --btn-fg: #fff;
    background: var(--brand-grad); border-color: transparent;
    box-shadow: 0 1px 1px rgba(90, 30, 140, .28), 0 12px 26px -10px rgba(184, 77, 235, .8), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn-brand:hover { background: var(--brand-grad); border-color: transparent; filter: brightness(1.07) saturate(1.06); transform: translateY(-1px); box-shadow: 0 1px 1px rgba(90, 30, 140, .28), 0 16px 32px -10px rgba(184, 77, 235, .95), inset 0 1px 0 rgba(255, 255, 255, .3); }

.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: rgba(13, 15, 35, .055); border-color: transparent; color: var(--text); box-shadow: none; }

.btn-danger { --btn-fg: var(--neg); --btn-bd: #F3C4C0; }
.btn-danger:hover { background: var(--neg-soft); border-color: #EBA9A3; }

/* On dark surfaces (welcome card, promo) */
.btn-light { --btn-bg: #fff; --btn-fg: var(--navy); --btn-bd: #fff; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .55), inset 0 -1px 0 rgba(13, 15, 35, .06); }
.btn-light:hover { background: #F3F0FF; border-color: #F3F0FF; transform: translateY(-1px); }
.btn-glass { --btn-bg: rgba(255, 255, 255, .08); --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10); }
.btn-glass:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .30); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }

.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; gap: 6px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; gap: 9px; }
.btn-xl { height: 58px; padding: 0 32px; font-size: 16px; gap: 10px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 34px; }

.btn.is-loading { pointer-events: none; color: transparent; position: relative; }
.btn.is-loading::after {
    content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid var(--text-2); border-top-color: transparent;
    animation: spin .7s linear infinite;
}
.btn-primary.is-loading::after, .btn-brand.is-loading::after { border-color: #fff; border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 16px; }
.label { font-size: 13px; font-weight: 600; color: var(--text); }
.hint { font-size: 12.5px; color: var(--text-3); }

.input, .select, .textarea {
    width: 100%; height: 44px; padding: 0 16px;
    font-size: 14px; color: var(--text);
    background: #F8F7FC;
    border: 1px solid #E4E3EE; border-radius: 15px;
    outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.textarea { height: auto; padding: 12px 16px; resize: vertical; min-height: 92px; line-height: 1.55; border-radius: 18px; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: #C9C7DA; background: #fff; }
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-ring);
}
.input[aria-invalid="true"] { border-color: var(--neg); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px var(--neg-soft); }
.input[disabled], .select[disabled] { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
.select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer; }
.select-wrap { position: relative; }
.select-wrap::after {
    content: ""; position: absolute; right: 15px; top: 50%; width: 8px; height: 8px;
    margin-top: -6px; border-right: 1.6px solid var(--text-2); border-bottom: 1.6px solid var(--text-2);
    transform: rotate(45deg); pointer-events: none;
}
.field-err { font-size: 12.5px; color: var(--neg); }

.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; min-width: 0; }
.input-group .btn { height: 44px; }

.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 46px; }
.pw-toggle {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    height: 32px; padding: 0 9px; display: grid; place-items: center;
    background: none; border: none; border-radius: 8px; cursor: pointer;
    color: var(--text-3); font-size: 12px; font-weight: 550;
}
.pw-toggle:hover { background: var(--surface-2); color: var(--text-2); }

/* ==========================================================================
   Surfaces
   ========================================================================== */
.card {
    background: var(--surface); border: 1px solid rgba(13, 15, 35, .06);
    border-radius: var(--r-lg); box-shadow: var(--sh-card);
}
.card-hd {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 19px 24px; border-bottom: 1px solid var(--border-soft);
}
.card-hd > svg {
    box-sizing: content-box; padding: 7px; border-radius: 10px;
    color: var(--accent); background: var(--accent-soft);
}
.card-hd h2, .card-hd h3 { margin: 0; font-size: 16.5px; }
.card-hd .spacer, .row-between .spacer { margin-left: auto; }
.card-bd { padding: 24px; }
.card-ft { padding: 14px 24px; border-top: 1px solid var(--border-soft); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* Tables that sit flush inside a card follow its rounded corners (the wrap
   already scrolls, so a radius on it clips the header fill and row hover). */
.card > .table-wrap:first-child { border-top-left-radius: calc(var(--r-lg) - 1px); border-top-right-radius: calc(var(--r-lg) - 1px); }
.card > .table-wrap:last-child  { border-bottom-left-radius: calc(var(--r-lg) - 1px); border-bottom-right-radius: calc(var(--r-lg) - 1px); }

.section { margin-bottom: 30px; }
.section-hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.section-hd h2 { font-size: 19px; }
.section-hd .spacer { margin-left: auto; }

.divider { height: 1px; background: var(--border); border: 0; margin: 20px 0; }

/* Profile header on reports: a brand wash behind the avatar. */
.profile-hero { position: relative; overflow: hidden; }
.profile-hero::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 150px; pointer-events: none;
    background:
        radial-gradient(560px 170px at 0% 0%, rgba(124, 92, 255, .17), transparent 70%),
        radial-gradient(460px 170px at 100% 0%, rgba(255, 122, 154, .15), transparent 70%);
}
.profile-hero > * { position: relative; }
.profile-hero h2 { font-size: 22px; }

/* Welcome card (overview): the night-sky stage every brand moment sits on. */
.hero-card {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
    padding: 30px 32px; border-radius: var(--r-xl); color: #fff;
    background:
        radial-gradient(460px 260px at 92% -10%, rgba(255, 122, 154, .46), transparent 70%),
        radial-gradient(560px 300px at 58% 130%, rgba(124, 92, 255, .62), transparent 70%),
        radial-gradient(380px 240px at 0% 0%, rgba(96, 72, 255, .34), transparent 70%),
        linear-gradient(135deg, #171A40 0%, #0B0D20 100%);
    box-shadow: 0 28px 60px -30px rgba(30, 22, 100, .75), inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.hero-card::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(70% 120% at 85% 0%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(70% 120% at 85% 0%, #000 0%, transparent 75%);
}
.hero-card > * { position: relative; z-index: 1; }
.hero-text { flex: 1; min-width: 240px; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .62);
}
.hero-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #5EEAA5; box-shadow: 0 0 0 4px rgba(94, 234, 165, .18); }
.hero-card h1 { margin-top: 10px; font-size: 34px; font-weight: 800; letter-spacing: -.035em; color: #fff; }
.hero-card p { margin-top: 8px; color: rgba(255, 255, 255, .72); font-size: 14.5px; max-width: 52ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-orb { --s: 76px; filter: drop-shadow(0 18px 30px rgba(124, 92, 255, .55)); }

/* Small square icon tile used in cards and steps */
.icon-tile {
    display: grid; place-items: center; width: 40px; height: 40px; flex: none;
    border-radius: 12px; background: var(--brand-soft); color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .10);
}

/* Pricing cards (billing) */
.plan-card { transition: box-shadow var(--t), border-color var(--t); }
.plan-card.is-featured {
    border: 1px solid transparent;
    background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-grad) border-box;
    box-shadow: 0 14px 34px -16px rgba(124, 92, 255, .45);
}
.plan-card.is-current { box-shadow: 0 0 0 3px var(--pos-soft), var(--sh-card); border-color: #BFE6CF; }

/* Quick-action list (overview) */
.quick-list { display: flex; flex-direction: column; padding: 8px; }
.quick-item {
    display: flex; align-items: center; gap: 13px; padding: 11px 12px; border-radius: 14px;
    color: inherit; text-decoration: none; transition: background var(--t-fast), transform var(--t-fast);
}
.quick-item:hover { background: var(--surface-2); text-decoration: none; }
.quick-text { flex: 1; min-width: 0; }
.quick-text b { display: block; font-size: 14px; font-weight: 600; }
.quick-text span { display: block; font-size: 12.5px; color: var(--text-3); }
.quick-go { color: var(--text-3); transition: transform var(--t-fast), color var(--t-fast); }
.quick-item:hover .quick-go { color: var(--accent); transform: translateX(3px); }

/* ==========================================================================
   Badges / chips / avatar
   ========================================================================== */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    height: 23px; padding: 0 10px;
    font-size: 11.5px; font-weight: 650; border-radius: var(--r-full); white-space: nowrap;
    background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.badge-pos    { background: var(--pos-soft);    color: var(--pos);    border-color: transparent; }
.badge-neg    { background: var(--neg-soft);    color: var(--neg);    border-color: transparent; }
.badge-warn   { background: var(--warn-soft);   color: var(--warn);   border-color: transparent; }
.badge-info   { background: var(--info-soft);  color: var(--info);   border-color: transparent; }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }

.chip {
    display: inline-flex; align-items: center; gap: 5px;
    height: 30px; padding: 0 12px; font-size: 12.5px; font-weight: 550; color: var(--text-2);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-full);
    transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
/* Period picker states: the selected range, and ranges the plan doesn't cover
   (dimmed but still clickable — they lead to the pricing page). */
a.chip:hover        { border-color: #BFC3D3; color: var(--text); text-decoration: none; background: var(--surface-2); }
.chip.is-active     { background: var(--ink-grad); border-color: transparent; color: #fff; font-weight: 650; box-shadow: 0 8px 16px -10px rgba(11, 13, 32, .8), inset 0 1px 0 rgba(255, 255, 255, .12); }
.chip.is-active:hover { color: #fff; background: var(--ink-grad); }
.chip.is-locked     { opacity: .55; }
.chip.is-locked:hover { opacity: 1; }

.avatar {
    width: 40px; height: 40px; border-radius: 50%; flex: none;
    background: var(--brand-soft); border: 1px solid rgba(106, 76, 255, .12);
    display: grid; place-items: center; overflow: hidden;
    font-family: var(--font-display); font-weight: 800; color: var(--accent-press);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; font-size: 12.5px; }
.avatar-lg, .avatar-xl {
    border: 3px solid transparent;
    background:
        var(--brand-soft) padding-box,
        var(--brand-grad) border-box;
    box-shadow: 0 10px 24px -10px rgba(124, 92, 255, .6);
}
.avatar-lg { width: 76px; height: 76px; font-size: 27px; }
.avatar-xl { width: 92px; height: 92px; font-size: 32px; }
.avatar-lg img, .avatar-xl img { border-radius: 50%; border: 2px solid #fff; }

/* ==========================================================================
   KPI
   ========================================================================== */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi {
    --kpi-c: #6A4CFF; --kpi-soft: #F1EEFF; --kpi-glow: rgba(124, 92, 255, .13);
    position: relative; min-width: 0;
    background:
        radial-gradient(170px 120px at 100% 0%, var(--kpi-glow), transparent 72%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 18px 20px 17px;
    box-shadow: var(--sh-card);
    transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.kpi:hover { border-color: var(--border-2); box-shadow: var(--sh-md); transform: translateY(-2px); }
.kpi-row > .kpi:nth-child(4n+2) { --kpi-c: #1F7AE8; --kpi-soft: #EAF3FF; --kpi-glow: rgba(46, 144, 250, .13); }
.kpi-row > .kpi:nth-child(4n+3) { --kpi-c: #0E9C8D; --kpi-soft: #E4F7F4; --kpi-glow: rgba(18, 179, 162, .13); }
.kpi-row > .kpi:nth-child(4n+4) { --kpi-c: #E4578F; --kpi-soft: #FFECF3; --kpi-glow: rgba(255, 122, 154, .16); }
.kpi-top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.kpi-ic {
    display: grid; place-items: center; width: 36px; height: 36px; flex: none;
    border-radius: 11px; background: var(--kpi-soft); color: var(--kpi-c);
    box-shadow: inset 0 0 0 1px rgba(13, 15, 35, .03);
}
.kpi-label { font-size: 13px; font-weight: 550; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-val {
    margin-top: 14px; font-family: var(--font-display);
    font-size: 34px; font-weight: 700; letter-spacing: -.045em;
    font-variant-numeric: tabular-nums; line-height: 1.06;
}
.kpi-sub { margin-top: 8px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; font-size: 12.5px; line-height: 1.4; color: var(--text-3); }
.kpi-sub a { font-weight: 600; }
/* KPIs nested inside a card read as part of it, not as cards of their own. */
.card .kpi { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card .kpi:hover { border-color: var(--border); box-shadow: none; transform: none; }
.card .kpi-val { font-size: 25px; }

.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta-pos  { color: var(--pos); }
.delta-neg  { color: var(--neg); }
.delta-flat { color: var(--text-3); }

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left; padding: 12px 18px; white-space: nowrap;
    font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-3); background: var(--surface-2);
    border-bottom: 1px solid var(--border-soft);
}
.table td { padding: 14px 18px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: #FAF9FF; }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.num { white-space: nowrap; }
.table .col-actions { text-align: right; white-space: nowrap; }

/* ==========================================================================
   Tabs + segmented control
   ========================================================================== */
.tabs {
    display: flex; gap: 4px; width: fit-content; max-width: 100%;
    padding: 5px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none;
    background: #fff; border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--sh-xs);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    position: relative; background: none; border: 0; cursor: pointer;
    padding: 8px 15px; border-radius: 11px;
    font-size: 13.5px; font-weight: 600; color: var(--text-2);
    white-space: nowrap; transition: color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.tab:hover { color: var(--text); background: var(--surface-3); }
.tab[aria-selected="true"] {
    color: #fff; background: var(--ink-grad);
    box-shadow: 0 8px 16px -10px rgba(11, 13, 32, .85), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.tabpanel[hidden] { display: none; }
.tabpanel { animation: fadeUp var(--t-slow) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.seg { display: inline-flex; padding: 4px; background: var(--surface-3); border-radius: 12px; }
.seg button, .seg a {
    background: none; border: 0; cursor: pointer; border-radius: 9px; text-decoration: none;
    padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-2);
    transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.seg button:hover, .seg a:hover { color: var(--text); text-decoration: none; }
.seg [aria-pressed="true"], .seg .active { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }

/* ==========================================================================
   States: empty / error / skeleton / alert
   ========================================================================== */
.state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 24px; gap: 6px; }
.state-icon {
    width: 60px; height: 60px; border-radius: 19px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--accent); margin-bottom: 10px;
    box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .12), 0 14px 28px -16px rgba(124, 92, 255, .55);
}
.state-icon svg { width: 24px; height: 24px; }
.state-title { font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: -.022em; }
.state-text { font-size: 14px; color: var(--text-2); max-width: 440px; }
.state-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.state-err .state-icon { background: var(--neg-soft); color: var(--neg); box-shadow: none; }

.skel { background: var(--surface-3); border-radius: 8px; position: relative; overflow: hidden; }
.skel::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .8), transparent);
    animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-line  { height: 10px; }
.skel-title { height: 16px; width: 40%; }
.skel-kpi   { height: 104px; border-radius: var(--r-lg); }
.skel-chart { height: 260px; border-radius: var(--r-lg); }

.alert {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 13px 16px; border-radius: 14px; font-size: 13.5px; line-height: 1.55;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    margin-bottom: 16px; box-shadow: var(--sh-xs);
}
.alert > svg { flex: none; margin-top: 2px; }
.alert-error   { background: #FFF6F5; border-color: #F7D3CF; color: #8F1D16; }
.alert-error > svg { color: var(--neg); }
.alert-success { background: #F3FBF6; border-color: #C5EBD5; color: #075E3A; }
.alert-success > svg { color: var(--pos); }
.alert-info    { background: #F5F3FF; border-color: #DDD5FF; color: #3A2A99; }
.alert-info > svg { color: var(--accent); }
.alert-warning { background: #FFF9F0; border-color: #F6DDB8; color: #7A3E08; }
.alert-warning > svg { color: var(--warn); }
.alert a { font-weight: 600; }

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-backdrop {
    position: fixed; inset: 0; background: var(--overlay); z-index: 60;
    display: grid; place-items: center; padding: 20px; animation: fadeIn var(--t) both;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    width: 100%; max-width: 440px; background: var(--surface);
    border-radius: var(--r-lg); box-shadow: var(--sh-lg); overflow: hidden;
    animation: modalIn var(--t-slow) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-hd { padding: 22px 24px 0; }
.modal-bd { padding: 10px 24px 22px; font-size: 13.5px; color: var(--text-2); }
.modal-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; background: var(--surface-2); border-top: 1px solid var(--border-soft); }

/* ==========================================================================
   Brand mark
   ========================================================================== */
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -.045em;
    color: var(--text); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
    position: relative; width: 32px; height: 32px; border-radius: 10px; flex: none;
    display: grid; place-items: center;
    background: var(--brand-grad); color: #fff;
    box-shadow: 0 8px 18px -8px rgba(184, 77, 235, .85), inset 0 1px 0 rgba(255, 255, 255, .34), inset 0 -6px 10px -6px rgba(60, 20, 120, .45);
}
.brand-mark svg { width: 17px; height: 17px; filter: drop-shadow(0 1px 1px rgba(60, 20, 120, .35)); }

/* ==========================================================================
   App shell (authenticated)
   A night-sky frame; on top of it the dock — brand, six places as pills, the
   rest behind "Yana", credits, language, the account — and under the dock
   the page itself: one light sheet with round corners. No side menu on a
   wide screen; a narrow one gets a drawer and a floating bottom bar.
   ========================================================================== */
.app {
    /* The sky. It used to be background-attachment: fixed, which makes Chrome
       repaint the whole screen on every scroll frame and scroll on the main
       thread (measured 2026-12-02: 202 repaints and 129 dropped frames for one
       swipe down Analiz). Now it is an ordinary background, and the dock — the
       only place the sky stays in view — carries its own copy, sized to the
       viewport so the two meet without a seam. */
    --sky:
        radial-gradient(900px 340px at 9% -130px, rgba(108, 76, 255, .66), transparent 70%),
        radial-gradient(760px 300px at 93% -120px, rgba(255, 122, 154, .38), transparent 70%),
        radial-gradient(640px 260px at 52% -160px, rgba(184, 77, 235, .44), transparent 70%);
    --gut: 12px;
    min-height: 100vh; min-height: 100dvh; padding: 0 var(--gut) var(--gut);
    background: var(--sky), var(--frame);
    background-size: 100vw 100vh, 100vw 100vh, 100vw 100vh, auto;
    background-repeat: no-repeat;
}

.dock {
    position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
    display: flex; align-items: center; gap: 14px;
    margin: 0 calc(-1 * var(--gut)); padding: 0 calc(6px + var(--gut)) 0 calc(10px + var(--gut));   /* edge to edge, so its sky lines up with the frame's */
    background: var(--sky), var(--frame);
    background-size: 100vw 100vh, 100vw 100vh, 100vw 100vh, auto;
    background-repeat: no-repeat;
}
/* the sheet keeps its round shoulders while it scrolls under the dock: two
   corner pieces painted with the same sky, shifted to where they sit */
.dock::before, .dock::after {
    content: ""; position: absolute; top: 100%; width: 30px; height: 30px; pointer-events: none;
    background: var(--sky), var(--frame);
    background-size: 100vw 100vh, 100vw 100vh, 100vw 100vh, auto;
    background-repeat: no-repeat;
}
.dock::before { left: var(--gut); background-position: calc(-1 * var(--gut)) calc(-1 * var(--topbar-h));
    -webkit-mask-image: radial-gradient(circle at 100% 100%, transparent 29.5px, #000 30px); mask-image: radial-gradient(circle at 100% 100%, transparent 29.5px, #000 30px); }
.dock::after  { right: var(--gut); background-position: calc(30px + var(--gut) - 100vw) calc(-1 * var(--topbar-h));
    -webkit-mask-image: radial-gradient(circle at 0% 100%, transparent 29.5px, #000 30px); mask-image: radial-gradient(circle at 0% 100%, transparent 29.5px, #000 30px); }
.dock .brand { color: #fff; flex: none; }

.dk-nav {
    display: flex; align-items: center; gap: 2px; margin: 0 auto; padding: 5px; border-radius: 999px;
    background: rgba(255, 255, 255, .075); border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 30px -18px rgba(0, 0, 0, .7);
}
.dk-link {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px;
    font-size: 13.5px; font-weight: 600; letter-spacing: -.008em; color: rgba(255, 255, 255, .76); white-space: nowrap;
    cursor: pointer; list-style: none; user-select: none;
    transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t);
}
.dk-link::-webkit-details-marker { display: none; }
.dk-link > svg { flex: none; color: rgba(255, 255, 255, .5); transition: color var(--t-fast); }
.dk-link:hover { color: #fff; background: rgba(255, 255, 255, .10); text-decoration: none; }
.dk-link:hover > svg { color: rgba(255, 255, 255, .9); }
.dk-link.active { color: var(--navy); background: #fff; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .7), inset 0 -1px 0 rgba(13, 15, 35, .08); }
.dk-link.active > svg { color: var(--accent); }
.dk-link .dk-caret { margin-left: -3px; opacity: .7; transition: transform var(--t); }
details[open] > .dk-link .dk-caret { transform: rotate(180deg); }

.dk-more, .dk-user { position: relative; }
.dk-pop {
    position: absolute; top: calc(100% + 12px); right: -6px; z-index: 60; width: 300px; padding: 8px;
    border-radius: 22px; background: #fff; border: 1px solid rgba(13, 15, 35, .06); box-shadow: var(--sh-lg);
    display: flex; flex-direction: column; gap: 2px; animation: dk-pop .18s var(--ease) both;
}
@keyframes dk-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.dk-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; color: var(--text); transition: background var(--t-fast); }
.dk-item:hover { background: var(--surface-2); text-decoration: none; }
.dk-item-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--accent); }
.dk-item-tx { min-width: 0; display: flex; flex-direction: column; }
.dk-item-tx b { font-size: 14px; font-weight: 600; }
.dk-item-tx small { font-size: 12px; color: var(--text-3); line-height: 1.35; }
.dk-item.active { background: var(--accent-soft); }
.dk-item.active b { color: var(--accent-text); }
.dk-out .dk-item-ic { background: var(--neg-soft); color: var(--neg); }

.dk-side { display: flex; align-items: center; gap: 8px; flex: none; }
.dk-credits {
    display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 15px 0 12px; border-radius: 999px; color: #fff;
    background: rgba(255, 255, 255, .075); border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); transition: background var(--t-fast), border-color var(--t-fast);
}
.dk-credits:hover { background: rgba(255, 255, 255, .13); text-decoration: none; }
.dk-credits svg { color: #FFD479; }
.dk-credits b { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dk-credits span { font-size: 12px; color: rgba(255, 255, 255, .56); }
.dk-credits.is-low { border-color: rgba(255, 170, 90, .55); }
.dk-credits.is-low b { color: #FFC37A; }
.dock .lang-menu > summary {
    height: 42px; padding: 0 13px; border-radius: 999px; color: rgba(255, 255, 255, .86);
    background: rgba(255, 255, 255, .075); border: 1px solid rgba(255, 255, 255, .10); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.dock .lang-menu > summary:hover, .dock .lang-menu[open] > summary { color: #fff; background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .2); }
.dk-user > summary { list-style: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; background: var(--brand-grad); box-shadow: 0 10px 20px -8px rgba(184, 77, 235, .9); transition: transform var(--t-fast), box-shadow var(--t); }
.dk-user > summary::-webkit-details-marker { display: none; }
.dk-user > summary:hover { transform: scale(1.05); }
.dk-user > summary.active, .dk-user[open] > summary { box-shadow: 0 0 0 3px rgba(255, 255, 255, .28), 0 10px 20px -8px rgba(184, 77, 235, .9); }
.dk-user > summary .avatar { width: 36px; height: 36px; border: 2px solid var(--frame); background: var(--brand-grad); color: #fff; font-size: 13px; }
.dk-me { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border-soft); }
.dk-me .avatar { background: var(--brand-grad); color: #fff; border: 0; }
.dk-me b { display: block; font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-me small { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-me .sb-plan { font-style: normal; color: var(--text-2); background: var(--surface-3); }
.dk-me .sb-plan.is-paid { color: #fff; background: var(--brand-grad); }

/* the sheet */
.main {
    position: relative; min-width: 0; display: flex; flex-direction: column;
    min-height: calc(100vh - var(--topbar-h) - 12px); min-height: calc(100dvh - var(--topbar-h) - 12px);
    border-radius: 30px;
    background:
        radial-gradient(980px 420px at 100% 0%, rgba(124, 92, 255, .11), transparent 70%),
        radial-gradient(760px 360px at 0% 0%, rgba(255, 122, 154, .09), transparent 70%),
        var(--bg);
}
/* the line above a page: where you are, and what you can do here */
.topbar { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 24px 36px 0; }
.topbar h1 {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--text-3);
}
.topbar h1::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-grad); box-shadow: 0 0 0 4px rgba(184, 77, 235, .13); }
.topbar .spacer { margin-left: auto; }
.page { padding: 16px 36px 72px; width: 100%; max-width: var(--page-max); margin: 0 auto; }
.page-intro { margin-bottom: 26px; }
.page-intro h1 { font-size: clamp(30px, 3.2vw, 42px); font-weight: 700; letter-spacing: -.045em; line-height: 1.06; }
.page-intro p { margin-top: 10px; color: var(--text-2); font-size: 15.5px; line-height: 1.55; max-width: 74ch; }

/* Moving between pages. Nothing "arrives": a page is simply there. Where the
   browser can, the old page stays on screen until the new one is ready and
   the two cross-fade (cross-document view transitions); the dock and the
   bottom menu are named, so they hold still while the sheet changes. */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }   /* sign-in card only */
@view-transition { navigation: auto; }
::view-transition-group(root), ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 170ms; }
.dock { view-transition-name: aq-dock; }
.mobile-nav { view-transition-name: aq-tabs; }
::view-transition-group(aq-dock), ::view-transition-old(aq-dock), ::view-transition-new(aq-dock),
::view-transition-group(aq-tabs), ::view-transition-old(aq-tabs), ::view-transition-new(aq-tabs) { animation-duration: 170ms; }
html:has(.app) { background: var(--frame); }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* A click answers at once: the pressed place gives, the pill moves to it
   (layout.php), and a thin line runs along the top while the page is on its way. */
.dk-link:active, .mn-link:active, .sb-link:active, .dk-item:active, .qt:active, .dh-kpi:active { transform: scale(.97); }
.nav-prog {
    position: fixed; left: 0; top: 0; z-index: 300; width: 0; height: 3px; opacity: 0; pointer-events: none;
    border-radius: 0 3px 3px 0; background: var(--brand-grad-h); box-shadow: 0 0 12px rgba(184, 77, 235, .85);
}
html.is-nav .nav-prog { opacity: 1; width: 88%; transition: width 2.6s cubic-bezier(.1, .7, .2, 1) .12s, opacity .1s linear .12s; }

/* the drawer: a narrow screen's menu (the dock's pills do not fit there) */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 70; width: var(--sidebar-w); max-width: 88vw;
    display: none; flex-direction: column; overflow: hidden; border-radius: 0 30px 30px 0;
    background:
        radial-gradient(320px 260px at 0% 0%, rgba(124, 92, 255, .40), transparent 70%),
        radial-gradient(280px 260px at 110% 104%, rgba(255, 122, 154, .22), transparent 70%),
        linear-gradient(180deg, #171A40 0%, #0B0D20 100%);
    color: rgba(255, 255, 255, .72);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .07);
    transform: translateX(-104%); transition: transform var(--t-slow);
}
.sidebar.open { transform: none; }
.sidebar > * { position: relative; }
.sb-brand { display: flex; align-items: center; gap: 9px; height: 72px; padding: 0 22px; flex: none; }
.sidebar .brand { color: #fff; }
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 12px 14px; display: flex; flex-direction: column; gap: 3px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
.sb-group { margin: 18px 0 6px; padding: 0 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: rgba(255, 255, 255, .34); }
.sb-link {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 14px;
    font-size: 14.5px; font-weight: 550; color: rgba(255, 255, 255, .72); text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast);
}
.sb-link svg { flex: none; color: rgba(255, 255, 255, .46); }
.sb-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.sb-link.active { color: var(--navy); font-weight: 650; background: #fff; box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .8); }
.sb-link.active svg { color: var(--accent); }
.sb-admin { margin: 0 12px 8px; }
.sb-promo {
    position: relative; overflow: hidden; margin: 0 12px 12px; padding: 15px; border-radius: 18px;
    background:
        radial-gradient(180px 110px at 100% 0%, rgba(255, 122, 154, .38), transparent 70%),
        linear-gradient(135deg, rgba(124, 92, 255, .36), rgba(124, 92, 255, .10));
    border: 1px solid rgba(196, 180, 255, .22);
}
.sb-promo b { display: flex; align-items: center; gap: 6px; color: #fff; font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.sb-promo span { display: block; margin-top: 5px; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, .66); }
.sb-promo .btn { margin-top: 11px; width: 100%; }
.sb-foot { padding: 10px 12px 14px; border-top: 1px solid rgba(255, 255, 255, .07); flex: none; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; text-decoration: none; color: inherit; background: rgba(255, 255, 255, .045); }
.sb-user .avatar { background: var(--brand-grad); color: #fff; border: 0; }
.sb-user .who { min-width: 0; flex: 1; }
.sb-user .who b { display: block; font-size: 13px; font-weight: 650; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user .who-sub { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 2px; font-size: 11.5px; color: rgba(255, 255, 255, .46); }
.sb-plan { flex: none; height: 18px; padding: 0 7px; border-radius: 999px; font-size: 10px; font-weight: 750; letter-spacing: .03em; line-height: 18px; color: #fff; background: rgba(255, 255, 255, .13); }
.sb-plan.is-paid { background: var(--brand-grad); }
.sidebar .btn-ghost { color: rgba(255, 255, 255, .5); }
.sidebar .btn-ghost:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.sb-scrim { position: fixed; inset: 0; z-index: 65; background: var(--overlay); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sb-toggle {
    display: none; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; border-radius: 50%; cursor: pointer; color: #fff;
    background: rgba(255, 255, 255, .075); border: 1px solid rgba(255, 255, 255, .10);
}
.sup-top { display: none; }
.mobile-nav { display: none; }

/* ==========================================================================
   Charts
   ========================================================================== */
.chart { width: 100%; height: auto; display: block; }
.chart-empty { padding: 40px; text-align: center; color: var(--text-3); font-size: 13.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend-item b { color: var(--text); font-variant-numeric: tabular-nums; }

.barlist { display: flex; flex-direction: column; }
.barlist-row { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.barlist-row:last-child { border-bottom: 0; }
.barlist-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.barlist-label { font-size: 13.5px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.barlist-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist-val { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.barlist-track { height: 7px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.barlist-track i { display: block; height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, #7C5CFF, #A66BF5); }

.meter { height: 8px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #7C5CFF, #B84DEB); border-radius: var(--r-full); }
/* Marked variant: a tick showing where the size-adjusted median sits. */
.meter-marked { position: relative; overflow: visible; }
.meter-marked .meter-tick {
    position: absolute; top: -3px; width: 2px; height: 14px; margin-left: -1px;
    background: var(--text-2); border-radius: 1px;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
    .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-main { grid-template-columns: minmax(0, 1fr); }
}
/* the dock gives way to the drawer before its pills start to crowd */
@media (max-width: 1180px) {
    .dk-nav { display: none; }
    .dk-side { margin-left: auto; }
    .sb-toggle { display: grid; }
    .sidebar { display: flex; }
}
@media (min-width: 1181px) {
    .sb-scrim { display: none !important; }
}
@media (max-width: 1320px) and (min-width: 1181px) {
    .dk-link { padding: 0 12px; gap: 7px; }
    .dk-credits span { display: none; }
}
@media (max-width: 900px) {
    .app { --gut: 6px; }
    .dock { height: 62px; padding: 0 calc(6px + var(--gut)); gap: 10px; }
    .dock::before, .dock::after { width: 24px; height: 24px; }
    .dock::after { background-position: calc(24px + var(--gut) - 100vw) calc(-1 * var(--topbar-h)); }
    .dock::before { -webkit-mask-image: radial-gradient(circle at 100% 100%, transparent 23.5px, #000 24px); mask-image: radial-gradient(circle at 100% 100%, transparent 23.5px, #000 24px); }
    .dock::after  { -webkit-mask-image: radial-gradient(circle at 0% 100%, transparent 23.5px, #000 24px); mask-image: radial-gradient(circle at 0% 100%, transparent 23.5px, #000 24px); }
    :root { --topbar-h: 62px; }
    .dock .brand { font-size: 17px; }
    .dk-credits { height: 38px; padding: 0 12px 0 10px; }
    .dk-credits span { display: none; }
    .dk-user { display: none; }
    .sup-top { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
    .sup-top .ai-orb { --s: 34px; }
    .dock .lang-menu > summary { height: 38px; padding: 0 11px; }
    .sb-toggle { width: 38px; height: 38px; }
    .main { border-radius: 24px; min-height: calc(100vh - 68px); min-height: calc(100dvh - 68px); }
    .topbar { padding: 18px 16px 0; }
    .page { padding: 14px 16px 120px; }
    /* The bottom menu floats: a glass pill above the home indicator. */
    .mobile-nav {
        display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
        position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
        padding: 5px; border-radius: 26px;
        background: rgba(13, 15, 36, .86); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
        border: 1px solid rgba(255, 255, 255, .10);
        box-shadow: 0 22px 44px -16px rgba(8, 9, 24, .8), inset 0 1px 0 rgba(255, 255, 255, .08);
    }
    .mn-link {
        position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
        padding: 9px 4px 8px; border-radius: 21px; font-size: 10.5px; font-weight: 650;
        color: rgba(255, 255, 255, .58); text-decoration: none; transition: color var(--t-fast), background var(--t-fast);
    }
    .mn-link.active { color: var(--navy); background: #fff; }
    .mn-link.active svg { color: var(--accent); }
    .mn-link:hover { text-decoration: none; }
    .hero-card { padding: 24px 22px; border-radius: 26px; }
    .hero-card h1 { font-size: 27px; }
    .hero-orb { --s: 56px; }
}
@media (max-width: 560px) {
    .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .kpi { padding: 15px; border-radius: 18px; }
    .kpi-val { font-size: 23px; margin-top: 11px; }
    .kpi-ic { width: 30px; height: 30px; border-radius: 9px; }
    .kpi-ic svg { width: 15px; height: 15px; }
    .kpi-top { align-items: flex-start; }
    .kpi-label { white-space: normal; line-height: 1.3; font-size: 12.5px; }
    .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .card { border-radius: 22px; }
    .card-hd, .card-bd { padding: 16px 18px; }
    h1 { font-size: 24px; }
    .page-intro h1 { font-size: 28px; }
    .hero-actions { width: 100%; }
    .hero-actions .btn { flex: 1; }
}
@media (max-width: 420px) {
    .input-group { flex-direction: column; align-items: stretch; }
    .input-group .input { flex: none; }
    .input-group .btn { width: 100%; justify-content: center; }
}
@media (max-width: 360px) {
    .kpi-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ==========================================================================
   Public (logged-out) header — used by app pages viewed without a session
   ========================================================================== */
.pub-bar { position: sticky; top: 12px; z-index: 20; height: 60px; margin: 12px 16px 0; display: flex; align-items: center; pointer-events: none; }
.pub-wrap {
    pointer-events: auto; width: 100%; max-width: 1160px; height: 60px; margin: 0 auto; padding: 0 10px 0 18px;
    display: flex; align-items: center; gap: 8px; border-radius: 20px; color: #fff;
    background: rgba(13, 15, 36, .96);
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: 0 20px 44px -20px rgba(8, 9, 24, .75), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.pub-wrap .brand { color: #fff; }
.pub-nav { display: flex; gap: 2px; margin-left: 14px; }
.pub-nav a { padding: 8px 13px; border-radius: 11px; color: rgba(255, 255, 255, .72); font-size: 14px; font-weight: 550; transition: background var(--t-fast), color var(--t-fast); }
.pub-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
.pub-cta { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.pub-cta .btn-ghost { color: rgba(255, 255, 255, .82); }
.pub-cta .btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.pub-cta .btn-primary { --btn-fg: var(--navy); background: #fff; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .55); }
.pub-cta .btn-primary:hover { background: #F3F0FF; }
.pub-cta .lang-menu > summary { color: rgba(255, 255, 255, .82); background: transparent; border-color: rgba(255, 255, 255, .16); box-shadow: none; }
.page-narrow { max-width: 900px; margin: 0 auto; padding-top: 28px; }
.pub-foot { border-top: 1px solid var(--border); background: var(--surface); }
.pub-foot-in {
    max-width: 1180px; margin: 0 auto; padding: 24px;
    display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
    font-size: 12.5px; color: var(--text-3);
}
.pub-foot-in a { color: var(--text-2); }
.pub-foot-in .copy { margin-left: auto; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.crumbs {
    display: flex; align-items: center; gap: 7px;
    font-size: 12.5px; color: var(--text-3); margin-bottom: 10px;
}
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }

/* ==========================================================================
   Form helpers
   ========================================================================== */
.field-hint { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.field-hint code,
.card-bd code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    font-size: 12px; padding: 1px 6px; border-radius: 6px;
    background: var(--surface-3); color: var(--text-2);
    overflow-wrap: anywhere;
}

/* Two-column form page: main fields left, contextual help right. */
.form-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }

/* Toggle switch — a real checkbox, visually replaced. */
.switch-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.switch { position: relative; display: inline-flex; flex: none; }
.switch input {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; margin: 0; cursor: pointer;
}
.switch-track {
    width: 42px; height: 24px; border-radius: 999px; background: var(--surface-3);
    border: 1px solid var(--border-2); display: block; position: relative;
    transition: background var(--t), border-color var(--t), box-shadow var(--t);
}
.switch-knob {
    position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(13, 15, 35, .25);
    transition: transform var(--t);
}
.switch input:checked + .switch-track { background: linear-gradient(90deg, #7C5CFF, #A45BF2); border-color: transparent; box-shadow: 0 6px 12px -6px rgba(124, 92, 255, .8); }
.switch input:checked + .switch-track .switch-knob { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==========================================================================
   DM preview (rule reply template)
   ========================================================================== */
.dm-preview { display: flex; flex-direction: column; gap: 8px; }
.dm-from { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.dm-bubble {
    background: var(--brand-grad); color: #fff;
    padding: 10px 14px; border-radius: 18px 18px 18px 5px;
    font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
    max-width: 100%;
}

@media (max-width: 1180px) {
    .form-cols { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
    .form-cols { grid-template-columns: minmax(0, 1fr); }
}

/* Logged-out header: the marketing links drop on small screens, the auth
   buttons stay. Declared last so it beats the base .pub-nav display. */
@media (max-width: 760px) {
    .pub-nav { display: none; }
    .pub-bar { margin: 8px 10px 0; top: 8px; }
    .pub-wrap { gap: 8px; padding: 0 8px 0 14px; }
    .pub-cta .btn-ghost { display: none; }
}

/* ===== exact insights, tracking, rating ===== */
.split-track { display: flex; height: 10px; gap: 2px; border-radius: var(--r-full); overflow: hidden; background: var(--surface-3); }
.split-track i { display: block; height: 100%; }
.post-thumb { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; background: var(--surface-3); display: block; flex: none; }
.post-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.post-cell:hover { text-decoration: none; }
.post-cell:hover .truncate { color: var(--accent-text); }
.table.sortable th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.table.sortable th[data-sort]:hover { color: var(--text); }
.table.sortable th[data-dir="desc"]::after { content: " ↓"; color: var(--accent); }
.table.sortable th[data-dir="asc"]::after  { content: " ↑"; color: var(--accent); }
.src-exact { display: inline-flex; align-items: center; gap: 5px; height: 22px; font-size: 11.5px; font-weight: 600; color: var(--pos); background: var(--pos-soft); border-radius: var(--r-full); padding: 0 9px; }
.src-est   { display: inline-flex; align-items: center; gap: 5px; height: 22px; font-size: 11.5px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border-radius: var(--r-full); padding: 0 9px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border-soft); }
.kv:first-child { border-top: 0; }
.kv b { font-variant-numeric: tabular-nums; }
.mini-spark { width: 90px; height: 26px; display: block; }
.rank-n { font-variant-numeric: tabular-nums; color: var(--text-3); width: 28px; font-weight: 600; }
.ext-card { position: fixed; right: 18px; bottom: 18px; z-index: 50; }
@media (max-width: 640px) {
    .post-thumb { width: 36px; height: 36px; }
    .hide-sm { display: none; }
}

/* ==========================================================================
   AI assistant
   ========================================================================== */
.ai-head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.ai-head-main { flex: 1; min-width: 260px; display: flex; gap: 14px; align-items: flex-start; }
.ai-head-ic {
    display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px;
    background: var(--brand-grad); color: #fff; box-shadow: 0 10px 22px -10px rgba(184, 77, 235, .8);
}
.ai-head h1 { font-size: 26px; }
.ai-head p { margin-top: 4px; color: var(--text-2); font-size: 14px; max-width: 70ch; }
.ai-quota { width: 220px; padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-xs); }
.ai-quota-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--text-2); margin-bottom: 7px; }
.ai-quota-top b { font-family: var(--font-display); font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.ai-quota .meter { height: 6px; }
.ai-quota .meter i { background: var(--brand-grad); transition: width var(--t-slow); }

/* mode cards */
.ai-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ai-mode {
    position: relative; display: flex; align-items: flex-start; gap: 12px; text-align: left;
    padding: 14px 15px; border-radius: var(--r-md); cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-card);
    transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.ai-mode:hover { border-color: var(--border-2); box-shadow: var(--sh-md); }
.ai-mode-ic {
    display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px;
    background: var(--surface-2); color: var(--text-2); transition: background var(--t-fast), color var(--t-fast);
}
.ai-mode-text { min-width: 0; }
.ai-mode-text b { display: block; font-family: var(--font-display); font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.ai-mode-text span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--text-3); }
.ai-mode-tag { position: absolute; top: 10px; right: 10px; height: 18px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 18px; color: var(--pos); background: var(--pos-soft); }
.ai-mode[aria-selected="true"] {
    border: 1px solid transparent;
    background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-grad) border-box;
    box-shadow: 0 12px 28px -16px rgba(124, 92, 255, .6);
}
.ai-mode[aria-selected="true"] .ai-mode-ic { background: var(--brand-grad); color: #fff; }
.ai-mode:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* workspace */
.ai-work { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; align-items: start; }
.ai-out-col { position: sticky; top: calc(var(--topbar-h) + 16px); }
/* On tall screens the form follows a long answer instead of leaving a gap. */
@media (min-width: 1181px) and (min-height: 820px) {
    .ai-form-col { position: sticky; top: calc(var(--topbar-h) + 16px); }
}
.ai-form { display: flex; flex-direction: column; gap: 16px; }
.ai-form .field + .field { margin-top: 0; }
.ai-form .grid-2 { gap: 12px; }
.req { font-style: normal; color: var(--neg); }
.field-foot { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.ai-count { flex: none; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ai-count.is-near { color: var(--warn); }
.textarea[aria-invalid="true"] { border-color: var(--neg); }

.ai-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--border); }
.ai-presets-lbl { display: inline-flex; align-items: center; gap: 5px; margin-right: 2px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.ai-presets-lbl svg { color: var(--accent); }
.ai-presets .chip, .ai-suggest .chip { cursor: pointer; font-family: inherit; }
.ai-presets .chip:hover, .ai-suggest .chip:hover { border-color: #C2C7D5; color: var(--text); background: var(--surface-2); }
.ai-presets .chip.is-active { background: var(--accent-soft); border-color: #D9D0FF; color: var(--accent-text); box-shadow: none; font-weight: 600; }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip-sm { height: 25px; padding: 0 9px; font-size: 12px; }

.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 14px; pointer-events: none; }
.input-prefix .input { padding-left: 29px; }

/* segmented radio */
.ai-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 11px; background: var(--surface-3); width: fit-content; max-width: 100%; }
.ai-seg label { position: relative; cursor: pointer; }
.ai-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ai-seg span { display: block; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.ai-seg label:hover span { color: var(--text); }
.ai-seg input:checked + span { background: var(--surface); color: var(--accent-text); box-shadow: var(--sh-sm); }
.ai-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* account picker */
.ai-pick { display: flex; flex-direction: column; gap: 8px; }
.ai-pick-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); transition: border-color var(--t-fast), background var(--t-fast);
}
.ai-pick-item input { position: absolute; opacity: 0; pointer-events: none; }
.ai-pick-item span { flex: 1; font-weight: 600; font-size: 13.5px; }
.ai-pick-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-2); flex: none; transition: border var(--t-fast); }
.ai-pick-item:has(input:checked) { border-color: var(--accent); background: #FBFAFF; }
.ai-pick-item:has(input:checked) .ai-pick-dot { border: 5px solid var(--accent); }

.ai-note { display: flex; gap: 9px; padding: 11px 13px; border-radius: 11px; background: var(--surface-2); font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.ai-note svg { flex: none; margin-top: 1px; color: var(--text-3); }

.ai-submit { display: flex; flex-direction: column; gap: 8px; align-items: center; padding-top: 4px; }
.ai-submit-hint { font-size: 12px; color: var(--text-3); text-align: center; }
kbd {
    display: inline-block; min-width: 18px; padding: 0 5px; margin: 0 1px; border-radius: 5px;
    font: 600 11px/17px var(--font-body); color: var(--text-2); text-align: center;
    background: var(--surface); border: 1px solid var(--border-2); box-shadow: 0 1px 0 var(--border-2);
}

/* result panel */
.ai-result { min-height: 560px; display: flex; flex-direction: column; }
.ai-result > .card-bd { flex: 1; }
.ai-result-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-grad); color: #fff; }
.ai-actions { display: flex; gap: 6px; }
.btn.is-copied { color: var(--pos); border-color: #BFE6CF; }

.ai-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 34px 12px 8px; }
.ai-empty-ic {
    display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px;
    background: radial-gradient(circle at 30% 20%, #fff 0%, #F3EEFF 60%); color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .16), 0 10px 26px -14px rgba(124, 92, 255, .6);
}
.ai-empty h4 { margin-top: 16px; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.ai-empty > p { margin-top: 5px; font-size: 13.5px; color: var(--text-2); }
.ai-deliver { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; text-align: left; width: 100%; max-width: 400px; }
.ai-deliver li { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 11px; background: var(--surface-2); font-size: 13.5px; }
.ai-deliver svg { flex: none; margin-top: 2px; color: var(--pos); }
.ai-ghost { width: 100%; max-width: 400px; margin-top: 22px; display: flex; flex-direction: column; gap: 10px; opacity: .7; }
.ai-ghost-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ai-ghost-row .skel { height: 64px; border-radius: 11px; }
.ai-empty .ai-ghost .skel::after { animation: none; }

.ai-loading { padding: 8px 4px; }
.ai-loading-top { display: flex; align-items: center; gap: 14px; }
.ai-loading-top b { display: block; font-family: var(--font-display); font-size: 15.5px; }
/* The AI's own character: a white glossy ball with a dark visor — a glowing
   magenta-to-cyan rim — and two bright eyes. Sized by --s.

   The head turns like a real ball: the visor and the eyes sit on its
   surface, so a turn of --orb-yaw / --orb-pitch moves each along the
   sphere (x = R·sin θ), narrows it by cos θ, and the far eye thins as it
   nears the edge. The page's script (layout.php) puts the visor and the
   eyes inside every .ai-orb (.is-live); without it — or in a browser
   without CSS sin()/cos() — the plain front-facing face below is drawn
   with pseudo-elements instead.

   Moods (a class on .ai-orb; window.aniqlabOrb(el, mood, backAfterMs) switches them):
   default    thinking: looks up and about, eyes narrowed, the rim's colours travel (every AI wait)
   .is-idle   floats, looks left and right, smiles, winks (headers, empty states, the corner button)
   .is-watch  watching videos: eyes wide, sweeping left to right (Tahlil while the AI watches)
   .is-happy  smiling arcs and a hop (an answer is ready)
   .is-sad    drooping eyes, head down (not enough credits)
   .is-cry    the same with tears (the AI could not answer, a run failed)
   .is-sleep  closed eyes, slow breathing (the AI is switched off)
   .is-wow    big eyes, a start (something to look at) */
@property --orb-a     { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --orb-yaw   { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --orb-pitch { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --orb-roll  { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --orb-py    { syntax: '<angle>'; inherits: true; initial-value: 0deg; }   /* towards the pointer */
@property --orb-pp    { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --orb-bl    { syntax: '<number>'; inherits: true; initial-value: 1; }     /* left / right eye, 1 = open */
@property --orb-br    { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --orb-smile { syntax: '<percentage>'; inherits: true; initial-value: 0%; } /* 0 = round eyes, ~74% = smiling arcs */
@property --orb-sleep { syntax: '<percentage>'; inherits: true; initial-value: 0%; } /* ~74% = closed, sleeping arcs */
@property --orb-sad   { syntax: '<percentage>'; inherits: true; initial-value: 0%; } /* ~30% = outer corners drooping */
@property --orb-big   { syntax: '<number>'; inherits: true; initial-value: 1; }     /* eye size, 1.38 = astonished */
.ai-orb {
    --s: 40px;
    position: relative; display: inline-block; flex: none; box-sizing: border-box; overflow: hidden;
    width: var(--s); height: var(--s); border-radius: 50%;
    background: radial-gradient(circle at 36% 24%, #FFFFFF 0%, #F6F8FC 42%, #DDE4F0 76%, #BCC7DB 100%);
    box-shadow: inset 0 calc(var(--s) * -.05) calc(var(--s) * .12) rgba(112, 130, 175, .28),
                0 calc(var(--s) * .07) calc(var(--s) * .2) rgba(38, 48, 92, .2),
                0 0 0 1px rgba(126, 142, 188, .16);   /* keeps the white ball's edge on a white card */
    transition: --orb-py .35s ease-out, --orb-pp .35s ease-out;
}
/* the visor (both drawings share it) */
.ai-orb:not(.is-live)::before, .orb-visor {
    content: ""; position: absolute; left: 7%; top: 22%; width: 86%; height: 58%; box-sizing: border-box;
    border-radius: calc(var(--s) * .27);
    border: calc(var(--s) * .045) solid transparent;
    background:
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(70, 90, 170, .32), rgba(70, 90, 170, 0) 70%) padding-box,
        linear-gradient(#090C1A, #05070F) padding-box,
        conic-gradient(from calc(180deg + var(--orb-a)), #4A6BFF, #D64BF0 14%, #F048E8 25%, #8A5CFF 40%, #4F7BFF 55%, #27C6F5 75%, #3F9BFF 88%, #4A6BFF) border-box;
    box-shadow: 0 0 calc(var(--s) * .07) rgba(122, 92, 255, .4);
}
/* --- plain face (no script): one bright oval, its twin and both glows as shadows --- */
.ai-orb:not(.is-live)::before { animation: orb-turn 2.2s linear infinite; }
.ai-orb:not(.is-live)::after {
    content: ""; position: absolute; left: 25.5%; top: 41.5%; width: 14%; height: 19%; border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 calc(var(--s) * .08) calc(var(--s) * .022) rgba(168, 198, 255, .95),
                calc(var(--s) * .35) 0 0 0 #fff,
                calc(var(--s) * .35) 0 calc(var(--s) * .08) calc(var(--s) * .022) rgba(168, 198, 255, .95);
    animation: orb-blink 4.2s infinite, orb-look 2.6s ease-in-out infinite;
}
.ai-orb.is-idle:not(.is-live) { animation: orb-float 3.4s ease-in-out infinite; }
.ai-orb.is-idle:not(.is-live)::before { animation: none; }
.ai-orb.is-idle:not(.is-live)::after { animation: orb-blink 4.8s infinite; }
/* --- the turning head --- */
.orb-head {
    position: absolute; inset: 0; border-radius: 50%; rotate: var(--orb-roll);
    /* The turn the face shows: the animation's plus the glance at the pointer, held to what still looks right. */
    --y: clamp(-26deg, calc(var(--orb-yaw) + var(--orb-py)), 26deg);
    --p: clamp(-16deg, calc(var(--orb-pitch) + var(--orb-pp)), 16deg);
}
/* A patch of the sphere 59° wide and 35.5° tall each way. Each of its four edges
   is placed on its own — x = X·sin(angle·g) — and eases to a stop a little
   inside the ball's outline (X = .93 R, Y = .80 R) instead of running over it:
   turned to the side the visor squeezes up against the edge with its whole rim
   still showing, where a plain projection had the ball's outline cut it off. */
.orb-visor {
    --xr: sin(min(calc((var(--y) + 59deg) * 1.138), 90deg));
    --xl: sin(max(calc((var(--y) - 59deg) * 1.138), -90deg));
    --yt: sin(min(calc((var(--p) + 35.5deg) * 1.309), 90deg));
    --yb: sin(max(calc((var(--p) - 35.5deg) * 1.309), -90deg));
    translate: calc((var(--xr) + var(--xl)) * var(--s) * .2325) calc((var(--yt) + var(--yb)) * var(--s) * -.2);
    scale: calc((var(--xr) - var(--xl)) * .5426) calc((var(--yt) - var(--yb)) * .6897);
}
/* Each eye is a point 20.5° either side of the nose, eased the same way so the far
   one stays clear of the rim (never past .70 R); its width narrows by the cos of its angle. */
.orb-eye {
    position: absolute; left: 43%; top: 41.5%; width: 14%; height: 19%;
    translate: calc(sin(clamp(-90deg, calc((var(--y) + var(--a)) * 1.463), 90deg)) * var(--s) * .35) calc(sin(var(--p)) * var(--s) * -.5);
    scale: calc(cos(calc(var(--y) + var(--a))) / .937) cos(var(--p));
    filter: drop-shadow(0 0 calc(var(--s) * .03) rgba(196, 216, 255, .95)) drop-shadow(0 0 calc(var(--s) * .07) rgba(150, 186, 255, .8));
}
.orb-eye-l { --a: -20.5deg; }
.orb-eye-r { --a: 20.5deg; }
/* The eye itself. Its shape is what is left after three cuts (the glow follows the shape):
   a bite from below makes a smile, a bite from above a sleeping eye, a slanted cut of the
   outer top corner a sad one. */
.orb-eye i {
    position: absolute; inset: 0; border-radius: 50%; background: #fff;
    -webkit-mask: radial-gradient(ellipse 80% 64% at 50% calc(172% - var(--orb-smile)), transparent 96%, #000 100%),
                  radial-gradient(ellipse 80% 64% at 50% calc(-72% + var(--orb-sleep)), transparent 96%, #000 100%),
                  linear-gradient(var(--sad-dir), transparent var(--orb-sad), #000 calc(var(--orb-sad) + 3%));
    -webkit-mask-composite: source-in;
            mask: radial-gradient(ellipse 80% 64% at 50% calc(172% - var(--orb-smile)), transparent 96%, #000 100%),
                  radial-gradient(ellipse 80% 64% at 50% calc(-72% + var(--orb-sleep)), transparent 96%, #000 100%),
                  linear-gradient(var(--sad-dir), transparent var(--orb-sad), #000 calc(var(--orb-sad) + 3%));
            mask-composite: intersect;
}
.orb-eye-l i { --sad-dir: 135deg; scale: var(--orb-big) calc(var(--orb-bl) * var(--orb-big)); }
.orb-eye-r i { --sad-dir: 225deg; scale: var(--orb-big) calc(var(--orb-br) * var(--orb-big)); }
/* Tears: one under each eye, running down the visor's glass. */
.orb-tear {
    position: absolute; left: 47.25%; top: 60%; width: 5.5%; height: 9%; opacity: 0;
    border-radius: 50% 50% 50% 50% / 36% 36% 64% 64%;
    background: linear-gradient(#C8EEFF, #58C6FF);
    box-shadow: 0 0 calc(var(--s) * .03) rgba(118, 206, 255, .9);
    translate: calc(sin(clamp(-90deg, calc((var(--y) + var(--a)) * 1.463), 90deg)) * var(--s) * .35) calc(sin(var(--p)) * var(--s) * -.5);
}
.orb-tear-l { --a: -20.5deg; }
.orb-tear-r { --a: 20.5deg; }
.ai-orb.is-cry .orb-tear { animation: orb-tear 1.5s cubic-bezier(.5, 0, .9, .6) infinite; }
.ai-orb.is-cry .orb-tear-r { animation-delay: .7s; }
.ai-orb.is-sleep .orb-visor { filter: saturate(.5) brightness(.82); }
.ai-orb.is-sleep .orb-eye { opacity: .78; }

.ai-orb.is-live:not(.is-idle, .is-watch, .is-happy, .is-sad, .is-cry, .is-sleep, .is-wow) { animation: orb-think 4.4s infinite; }
.ai-orb.is-live:not(.is-idle, .is-happy, .is-sad, .is-cry, .is-sleep, .is-wow) .orb-visor { animation: orb-turn 2.2s linear infinite; }
.ai-orb.is-live.is-idle  { animation: orb-float 3.4s ease-in-out infinite, orb-idle 14s infinite; }
.ai-orb.is-live.is-watch { animation: orb-watch 2.6s infinite; }
.ai-orb.is-live.is-happy { animation: orb-happy 2.6s infinite; }
.ai-orb.is-live.is-sad   { animation: orb-sad 3.4s ease-in-out infinite; }
.ai-orb.is-live.is-cry   { animation: orb-sad 3.4s ease-in-out infinite, orb-sob 1.5s infinite; }
.ai-orb.is-live.is-sleep { animation: orb-sleep 4.8s ease-in-out infinite; }
.ai-orb.is-live.is-wow   { animation: orb-wow 3.2s infinite; }
@keyframes orb-turn { to { --orb-a: 360deg; } }
@keyframes orb-blink { 0%, 91%, 97%, 100% { scale: 1 1; } 94% { scale: 1 .12; } }
@keyframes orb-look { 0%, 100% { translate: 0 0; } 30% { translate: -38% 0; } 70% { translate: 38% 0; } }
@keyframes orb-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7%; } }
/* Idle: a look to the right, a look to the left, a smile with a tilt, a wink, a glance down. */
@keyframes orb-idle {
    0%, 2.5%  { --orb-yaw: 0deg; --orb-pitch: 0deg; --orb-roll: 0deg; --orb-bl: 1; --orb-br: 1; --orb-smile: 0%; animation-timing-function: ease-in-out; }
    3.5%      { --orb-bl: .1; --orb-br: .1; }
    4.5%, 9%  { --orb-yaw: 0deg; --orb-pitch: 0deg; --orb-roll: 0deg; --orb-bl: 1; --orb-br: 1; animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
    15%, 20%  { --orb-yaw: 24deg; --orb-pitch: 5deg; --orb-roll: 5deg; --orb-bl: 1; --orb-br: 1; }
    21%       { --orb-yaw: 24deg; --orb-pitch: 5deg; --orb-roll: 5deg; --orb-bl: .1; --orb-br: .1; }
    22%, 27%  { --orb-yaw: 24deg; --orb-pitch: 5deg; --orb-roll: 5deg; --orb-bl: 1; --orb-br: 1; animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
    35%, 44%  { --orb-yaw: -24deg; --orb-pitch: -4deg; --orb-roll: -5deg; --orb-smile: 0%; animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
    50%, 52%  { --orb-yaw: 0deg; --orb-pitch: 0deg; --orb-roll: 0deg; --orb-smile: 0%; animation-timing-function: cubic-bezier(.4, 0, .2, 1.4); }
    56%, 68%  { --orb-yaw: 0deg; --orb-pitch: 9deg; --orb-roll: -9deg; --orb-smile: 74%; animation-timing-function: ease-in-out; }
    72%, 78%  { --orb-yaw: 0deg; --orb-pitch: 0deg; --orb-roll: 0deg; --orb-smile: 0%; --orb-br: 1; }
    79.5%     { --orb-br: .1; --orb-roll: 6deg; }
    81.5%, 86% { --orb-br: 1; --orb-roll: 0deg; --orb-pitch: 0deg; --orb-yaw: 0deg; animation-timing-function: ease-in-out; }
    91%       { --orb-pitch: -13deg; --orb-yaw: -10deg; }
    97%, 100% { --orb-yaw: 0deg; --orb-pitch: 0deg; --orb-roll: 0deg; --orb-bl: 1; --orb-br: 1; --orb-smile: 0%; }
}
/* Thinking: head up, a slow look from side to side, eyes narrowed; a blink on the way back. */
@keyframes orb-think {
    0%        { --orb-yaw: -20deg; --orb-pitch: 12deg; --orb-roll: -4deg; --orb-bl: .62; --orb-br: .62; animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
    42%, 48%  { --orb-yaw: 20deg; --orb-pitch: 12deg; --orb-roll: 4deg; --orb-bl: .62; --orb-br: .62; }
    50%       { --orb-yaw: 20deg; --orb-pitch: 12deg; --orb-roll: 4deg; --orb-bl: .1; --orb-br: .1; }
    52%       { --orb-yaw: 20deg; --orb-pitch: 12deg; --orb-roll: 4deg; --orb-bl: .62; --orb-br: .62; animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
    94%, 100% { --orb-yaw: -20deg; --orb-pitch: 12deg; --orb-roll: -4deg; --orb-bl: .62; --orb-br: .62; }
}
/* Watching: eyes wide, a steady sweep from side to side, a blink at the turn. */
@keyframes orb-watch {
    0%        { --orb-yaw: -19deg; --orb-pitch: -3deg; --orb-big: 1.1; --orb-bl: 1; --orb-br: 1; animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
    44%       { --orb-yaw: 19deg; --orb-pitch: -3deg; --orb-big: 1.1; --orb-bl: 1; --orb-br: 1; }
    48%       { --orb-yaw: 19deg; --orb-pitch: -3deg; --orb-big: 1.1; --orb-bl: .1; --orb-br: .1; }
    52%       { --orb-yaw: 19deg; --orb-pitch: -3deg; --orb-big: 1.1; --orb-bl: 1; --orb-br: 1; animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
    96%, 100% { --orb-yaw: -19deg; --orb-pitch: -3deg; --orb-big: 1.1; --orb-bl: 1; --orb-br: 1; }
}
/* Happy: smiling arcs, two hops, the head rocking from side to side. */
@keyframes orb-happy {
    0%, 100%  { translate: 0 0; --orb-smile: 74%; --orb-pitch: 8deg; --orb-roll: -7deg; animation-timing-function: cubic-bezier(.3, 0, .3, 1); }
    14%       { translate: 0 -12%; --orb-smile: 74%; --orb-pitch: 8deg; --orb-roll: 0deg; }
    28%       { translate: 0 0; --orb-smile: 74%; --orb-pitch: 8deg; --orb-roll: 7deg; }
    42%       { translate: 0 -8%; --orb-smile: 74%; --orb-pitch: 8deg; --orb-roll: 0deg; }
    56%, 92%  { translate: 0 0; --orb-smile: 74%; --orb-pitch: 8deg; --orb-roll: -7deg; }
}
/* Sad: head down, eyes drooping, a slow shake. Crying adds the tears and a sob. */
@keyframes orb-sad {
    0%, 100%  { translate: 0 0; --orb-sad: 30%; --orb-pitch: -9deg; --orb-roll: -4deg; --orb-bl: .84; --orb-br: .84; }
    50%       { translate: 0 2%; --orb-sad: 30%; --orb-pitch: -11deg; --orb-roll: 4deg; --orb-bl: .84; --orb-br: .84; }
}
@keyframes orb-sob { 0%, 30%, 100% { scale: 1 1; } 8% { scale: 1.02 .97; } 16% { scale: .99 1.01; } 22% { scale: 1.015 .98; } }
@keyframes orb-tear {
    0%   { opacity: 0; transform: translateY(-40%) scale(.5); }
    15%  { opacity: 1; transform: translateY(0) scale(1); }
    80%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(calc(var(--s) * .13)) scale(.9); }
}
/* Asleep: closed eyes, head dropped to one side, slow breathing. */
@keyframes orb-sleep {
    0%, 100%  { scale: 1; --orb-sleep: 74%; --orb-pitch: -10deg; --orb-roll: 9deg; }
    50%       { scale: 1.035; --orb-sleep: 74%; --orb-pitch: -12deg; --orb-roll: 9deg; }
}
/* Astonished: the eyes pop, the head jumps back, a blink, and down again. */
@keyframes orb-wow {
    0%        { translate: 0 0; --orb-big: 1; --orb-pitch: 0deg; --orb-bl: 1; --orb-br: 1; animation-timing-function: cubic-bezier(.2, 1.6, .4, 1); }
    10%, 68%  { translate: 0 -6%; --orb-big: 1.38; --orb-pitch: 9deg; --orb-bl: 1; --orb-br: 1; }
    72%       { translate: 0 -6%; --orb-big: 1.38; --orb-pitch: 9deg; --orb-bl: .1; --orb-br: .1; }
    76%, 90%  { translate: 0 -6%; --orb-big: 1.38; --orb-pitch: 9deg; --orb-bl: 1; --orb-br: 1; animation-timing-function: ease-in-out; }
    100%      { translate: 0 0; --orb-big: 1; --orb-pitch: 0deg; --orb-bl: 1; --orb-br: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .ai-orb, .ai-orb::before, .ai-orb::after, .ai-orb .orb-visor, .ai-orb .orb-tear { animation: none !important; }
    .ai-orb.is-happy { --orb-smile: 74%; }
    .ai-orb.is-sad, .ai-orb.is-cry { --orb-sad: 30%; --orb-pitch: -9deg; }
    .ai-orb.is-cry .orb-tear { opacity: 1; }
    .ai-orb.is-sleep { --orb-sleep: 74%; }
}
/* The character where an icon used to be: empty and error states, alerts, the credit notice. */
.state-orb { margin-bottom: 10px; }
.state-orb .ai-orb { --s: 64px; }
.alert > .ai-orb { --s: 30px; margin-top: -3px; }
.credit-short > .ai-orb { --s: 46px; }
.th-prog.is-fail .ai-orb { --s: 40px; }
/* The corner button: the character itself, one click from the AI assistant (wide screens only —
   a phone has the bottom menu there, and nothing may sit on top of the page). */
.orb-fab {
    position: fixed; right: 22px; bottom: 22px; z-index: 40; display: grid; place-items: center;
    width: 64px; height: 64px; border-radius: 50%; text-decoration: none;
    padding: 0; border: 0; background: none; cursor: pointer;
    transition: scale var(--t, .18s) ease;
}
.orb-fab .ai-orb { --s: 56px; }
.orb-fab:hover, .orb-fab:focus-visible { scale: 1.08; }
.orb-fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.orb-fab-tip {
    position: absolute; right: 74px; top: 50%; translate: 6px -50%; white-space: nowrap; pointer-events: none;
    padding: 7px 11px; border-radius: 10px; background: #14132B; color: #fff; font-size: 12.5px; font-weight: 600;
    opacity: 0; transition: opacity .15s, translate .15s;
}
.orb-fab:hover .orb-fab-tip, .orb-fab:focus-visible .orb-fab-tip { opacity: 1; translate: 0 -50%; }
@media (max-width: 900px) { .orb-fab { display: none; } }
body:has(.pz-quiz-fab) .orb-fab, body:has(.vmodal:not([hidden])) .orb-fab { display: none; }
.ai-steps { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ai-steps li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-3); transition: color var(--t); }
.ai-steps li i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-2); flex: none; position: relative; transition: all var(--t); }
.ai-steps li.is-active { color: var(--text); font-weight: 600; }
.ai-steps li.is-active i { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.ai-steps li.is-done { color: var(--text-2); }
.ai-steps li.is-done i { border-color: var(--pos); background: var(--pos); }
.ai-steps li.is-done i::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ai-loading .ai-ghost { max-width: none; margin-top: 24px; opacity: 1; }
.ai-inline-loading { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text-2); }
.ai-inline-loading .ai-orb { --s: 26px; }
.ai-head-orb { --s: 52px; }
.ai-empty-orb { --s: 64px; }

/* tips under the workspace */
.ai-tips .card-bd { padding: 18px 20px; }

/* ---------- rendered answer (.air) — also used by the report AI card ---------- */
.air { display: flex; flex-direction: column; gap: 16px; }
.air-plain { display: none; }
.air-summary {
    display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px;
    background: linear-gradient(135deg, #F5F1FF 0%, #FDF2F8 100%); border: 1px solid #ECE4FF;
}
.air-summary-ic { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--brand-grad); color: #fff; }
.air-summary p { font-size: 14px; line-height: 1.6; color: var(--text); }
.air-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.air-box { padding: 13px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.air-box-hd { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.air-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.air-box li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.air-box li svg { flex: none; margin-top: 2px; }
.air-good li svg { color: var(--pos); }
.air-bad li svg  { color: var(--warn); }
.air-tip li svg  { color: var(--accent); }
.air-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 4px; }
.air-sec h4 { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.air-sec span { font-size: 12px; color: var(--text-3); }

.air-ideas { display: flex; flex-direction: column; gap: 8px; }
.air-idea { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.air-idea[open] { border-color: #DCD3FF; box-shadow: 0 8px 22px -16px rgba(106, 76, 255, .55); }
.air-idea summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.air-idea summary::-webkit-details-marker { display: none; }
.air-idea summary:hover .air-idea-title { color: var(--accent-text); }
.air-num {
    display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 7px;
    font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface-3);
}
.air-idea[open] .air-num { background: var(--accent); color: #fff; }
.air-fmt { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; flex: none; }
.air-fmt-reels    { color: #C0267E; background: #FDEBF5; }
.air-fmt-carousel { color: #1D6FD8; background: #EAF3FF; }
.air-fmt-post     { color: var(--accent-text); background: var(--accent-soft); }
.air-fmt-stories  { color: #B45F06; background: #FFF3E0; }
.air-idea-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; transition: color var(--t-fast); }
.air-chev { color: var(--text-3); transition: transform var(--t); }
.air-idea[open] .air-chev { transform: rotate(180deg); }
.air-idea-bd { padding: 2px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.air-hook { padding: 10px 12px; border-left: 3px solid var(--accent); border-radius: 4px 10px 10px 4px; background: #FAF8FF; }
.air-hook > span, .air-caption-hd > span { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.air-hook p { margin-top: 3px; font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.air-caption { padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.air-caption-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.air-caption-text { font-size: 13.5px; line-height: 1.65; white-space: pre-line; word-break: break-word; }
.air-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.air-tags span { font-size: 12px; font-weight: 500; color: #1D6FD8; background: #EEF5FF; padding: 2px 8px; border-radius: 999px; }
.air-why { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.air-why svg { flex: none; margin-top: 2px; color: var(--pos); }

.air-plan { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.air-plan-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-top: 1px solid var(--border); }
.air-plan-row:first-child { border-top: 0; }
.air-day {
    display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px;
    font-family: var(--font-display); font-size: 12.5px; font-weight: 700; color: var(--accent-text); background: var(--accent-soft);
}
.air-plan-text { min-width: 0; }
.air-plan-text b { display: block; font-size: 13.5px; }
.air-plan-text b span { font-weight: 600; color: var(--accent-text); margin-left: 4px; font-variant-numeric: tabular-nums; }
.air-plan-text > span { display: block; margin-top: 1px; font-size: 13px; color: var(--text-2); line-height: 1.45; }

.air-caps { display: flex; flex-direction: column; gap: 12px; }
.air-cap { padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--sh-xs); }
.air-cap-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.air-cap-hd b { flex: 1; min-width: 0; font-size: 13.5px; }
.air-cap-len { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.air-cap .air-caption-text { padding: 12px; border-radius: 10px; background: var(--surface-2); }

.air-meta { display: flex; gap: 7px; align-items: flex-start; padding-top: 12px; border-top: 1px solid var(--border); font-size: 11.5px; line-height: 1.5; color: var(--text-3); }
.air-meta svg { flex: none; margin-top: 2px; }

@media (max-width: 1180px) {
    .ai-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-work { grid-template-columns: minmax(0, 1fr); }
    .ai-out-col { position: static; }
    .ai-result { min-height: 0; }
}
@media (max-width: 560px) {
    .ai-head { align-items: stretch; }
    .ai-quota { width: 100%; }
    .ai-head-ic { width: 40px; height: 40px; border-radius: 12px; }
    .ai-head-orb { --s: 42px; }
    .ai-head h1 { font-size: 22px; }
    .ai-mode { flex-direction: column; gap: 9px; padding: 12px; }
    .ai-mode-ic { width: 34px; height: 34px; }
    .ai-mode-text b { font-size: 13.5px; }
    .ai-mode-text span { font-size: 11.5px; }
    .air-cols { grid-template-columns: minmax(0, 1fr); }
    .air-cap-hd { flex-wrap: wrap; }
    .ai-actions .btn-ghost span, .ai-actions #ai-copy-all { display: none; }
}

/* ==========================================================================
   Report v3 — window picker, hints, plain-language summary, accuracy, months
   ========================================================================== */
.period { display: flex; flex-direction: column; gap: 10px; }
.period-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.period-lbl { flex: none; width: 52px; font-size: 12px; color: var(--text-3); }
.period-chips { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.period-chips::-webkit-scrollbar { display: none; }
.period-chips .chip { flex: none; }
.period-form { flex-wrap: wrap; }
.period-form .input { width: auto; height: 32px; font-size: 13px; padding: 0 10px; border-radius: 8px; }
.period-now { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.period-now > svg { color: var(--accent); flex: none; }

.hint {
    position: relative; flex: none; display: inline-grid; place-items: center;
    width: 17px; height: 17px; margin-left: auto; border-radius: 50%;
    font-size: 11px; font-weight: 700; line-height: 1; color: var(--text-3);
    background: var(--surface-3); cursor: help; outline: none;
}
.hint:hover, .hint:focus { background: var(--accent-soft); color: var(--accent-text); }
.hint-pop {
    position: absolute; z-index: 30; top: calc(100% + 8px); right: -6px;
    width: 260px; max-width: 70vw; padding: 10px 12px; border-radius: 10px;
    background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 450; line-height: 1.5;
    box-shadow: var(--sh-md); text-align: left; white-space: normal;
    opacity: 0; visibility: hidden; transform: translateY(-3px);
    transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
}
.hint:hover .hint-pop, .hint:focus .hint-pop { opacity: 1; visibility: visible; transform: none; }

.sum-card .card-hd > svg { color: var(--accent); }
.sum-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sum-list li { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; line-height: 1.55; color: var(--text); }
.sum-list b { font-weight: 650; }
.sum-ic { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); margin-top: -1px; }
.sum-pos  .sum-ic { background: var(--pos-soft);  color: var(--pos); }
.sum-neg  .sum-ic { background: var(--neg-soft);  color: var(--neg); }
.sum-warn .sum-ic { background: var(--warn-soft); color: var(--warn); }

.acc-card > summary { list-style: none; cursor: pointer; border-bottom: 0; }
.acc-card > summary::-webkit-details-marker { display: none; }
.acc-card[open] > summary { border-bottom: 1px solid var(--border); }
.acc-chev { display: inline-flex; color: var(--text-3); transition: transform var(--t-fast); }
.acc-chev { transform: rotate(90deg); }
.acc-card[open] .acc-chev { transform: rotate(-90deg); }
.acc-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.acc-list li { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.acc-list li .badge { flex: none; min-width: 98px; justify-content: center; }
.acc-list li b { color: var(--text); font-weight: 600; }

.table-months td { padding-top: 10px; padding-bottom: 10px; }
.table-months th { line-height: 1.25; }
.table-months tr.is-current { background: var(--accent-soft); }
.table-months tr.is-current:hover { background: var(--accent-soft); }
.mt-growth { min-width: 150px; }
.mt-bar { height: 5px; border-radius: 3px; background: var(--surface-3); margin-bottom: 5px; max-width: 160px; overflow: hidden; }
.mt-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--pos); }
.mt-bar > span.neg { background: var(--neg); }
.src-dot { color: var(--pos); font-size: 9px; vertical-align: 1px; }

@media (max-width: 640px) {
    .period-row { align-items: flex-start; flex-direction: column; gap: 6px; }
    .period-lbl { width: auto; }
    .period-chips { width: 100%; }
    .period-form { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .period-form .period-lbl { flex-basis: 100%; }
    .period-form .input { flex: 1 1 0; min-width: 0; height: 36px; }
    .hint-pop { right: -8px; width: 230px; }
    .acc-list li { flex-direction: column; gap: 4px; }
}
.ai-link-card .card-bd { padding-top: 14px; padding-bottom: 14px; }
.ai-link-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-grad); color: #fff; }

/* ==========================================================================
   AI council v3 — three AIs, one agreed answer; shoot-ready scripts
   ========================================================================== */
.ai-modes { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ai-council-badge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.ai-council-badge > span:first-child { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--text-2); }
.ai-cb-m { height: 22px; line-height: 22px; padding: 0 9px; border-radius: 999px; font-weight: 650; font-size: 11.5px; }
.ai-cb-m.is-on  { color: var(--pos); background: var(--pos-soft); }
.ai-cb-m.is-off { color: var(--text-3); background: var(--surface-3); text-decoration: line-through; }

.ai-steps li > div { flex: 1; min-width: 0; }
.ai-live { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.ai-live-m { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.ai-live-m i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.ai-live-m em { font-style: normal; font-weight: 500; color: var(--text-3); }
.ai-live-m.is-ok { color: var(--pos); border-color: #BFE8D2; background: var(--pos-soft); }
.ai-live-m.is-ok i { animation: none; border-color: var(--pos); background: var(--pos); }
.ai-live-m.is-fail { color: var(--neg); border-color: #F7D3CF; background: var(--neg-soft); }
.ai-live-m.is-fail i { animation: none; border-color: var(--neg); background: var(--neg); }
.ai-loading-inline { padding: 14px; border-radius: 12px; background: var(--surface-2); }
.ai-loading-inline .ai-ghost { display: none; }

.air-council { padding: 12px 14px; border-radius: 12px; border: 1px solid #E3DCFF; background: linear-gradient(180deg, #FAF8FF, #FFFFFF); display: flex; flex-direction: column; gap: 8px; }
.air-council-hd { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.air-council-hd > b { font-size: 13px; }
.air-council-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-text); }
.air-council-members { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; }
.air-member { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; }
.air-member.is-ok { color: var(--pos); background: var(--pos-soft); }
.air-member.is-fail { color: var(--neg); background: var(--neg-soft); }
.air-council-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.air-council-drafts summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--accent-text); }
.air-council-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 8px; }
.air-council-grid b { font-size: 12px; }
.air-council-grid ol { margin: 4px 0 0; padding-left: 16px; font-size: 12px; line-height: 1.45; color: var(--text-2); }
.air-council.is-compact { padding: 9px 12px; }

.air-agree { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 650; color: var(--text-2); background: var(--surface-3); }
.air-agree.is-all  { color: var(--pos); background: var(--pos-soft); }
.air-agree.is-some { color: #1D6FD8; background: #EAF3FF; }
.air-pot { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.air-pot-ok    { color: var(--text-2); background: var(--surface-3); }
.air-pot-high  { color: #1D6FD8; background: #EAF3FF; }
.air-pot-viral { color: #fff; background: var(--brand-grad); }
.air-base { display: flex; gap: 6px; align-items: flex-start; margin: -6px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.air-base svg { flex: none; margin-top: 2px; }
.air-concept { font-size: 13.5px; line-height: 1.6; }
.air-hookbox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.air-hookbox > div { padding: 9px 11px; border-radius: 10px; background: #FAF8FF; border-left: 3px solid var(--accent); }
.air-hookbox span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.air-hookbox b { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.45; }
.air-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.air-facts span { display: inline-flex; align-items: center; gap: 5px; }
.air-facts svg { color: var(--text-3); flex: none; }
.air-ref { display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; padding: 6px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.air-ref:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; }
.air-similar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.air-similar a { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: #EEF5FF; color: #1D6FD8; font-weight: 600; text-decoration: none; }
.air-similar a:hover { background: #DCEAFF; }
.air-script-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 4px; }
.air-cap-src, .ais-hook-hd em { font-style: normal; font-size: 11px; font-weight: 650; color: var(--accent-text); background: var(--accent-soft); padding: 1px 7px; border-radius: 999px; }

/* the script */
.ais { width: 100%; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid #E3DCFF; background: #FFFFFF; box-shadow: 0 10px 28px -22px rgba(106, 76, 255, .7); }
.ais.ais-standalone { padding: 0; border: 0; box-shadow: none; }
.ais-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ais-hd h5 { margin-top: 3px; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
.ais-kicker { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; color: #C0267E; }
.ais-hd-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ais-pot-why { display: flex; gap: 6px; margin: -4px 0 0; font-size: 12.5px; color: var(--text-2); }
.ais-pot-why svg { flex: none; margin-top: 2px; color: var(--pos); }
.ais-sec { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; margin-top: 6px; }
.ais-sec h6 { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; }
.ais-step { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.ais-hooks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.ais-hook { padding: 11px 12px; border-radius: 11px; background: #FAF8FF; border: 1px solid #ECE6FF; }
.ais-hook-hd { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.ais-hook-hd b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 11.5px; }
.ais-hook-hd em { margin-left: auto; }
.ais-hook dl { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.ais-hook dt { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-top: 4px; }
.ais-hook dd { margin: 0; font-size: 13px; line-height: 1.5; }
.ais-ovl { font-weight: 700; color: var(--text); }
.ais-beats { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ais-beat { display: flex; gap: 12px; padding: 11px 12px; border-top: 1px solid var(--border); }
.ais-beat:first-child { border-top: 0; background: #FFFBFE; }
.ais-time { flex: none; width: 62px; font-size: 12px; font-weight: 700; color: #C0267E; font-variant-numeric: tabular-nums; padding-top: 1px; }
.ais-beat-bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ais-row { display: flex; gap: 8px; font-size: 13px; line-height: 1.5; }
.ais-row > span { flex: none; width: 66px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); padding-top: 2px; }
.ais-row p { margin: 0; min-width: 0; }
.ais-voice p { font-weight: 600; }
.ais-edit p { color: var(--text-2); font-size: 12.5px; }
.ais-end { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ais-end > div, .ais-mini > div { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.ais-end span, .ais-mini span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.ais-end p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; }
.ais-cta { background: var(--pos-soft) !important; border-color: #BFE8D2 !important; }
.ais-cta p { font-weight: 700; color: #075E3A; }
.ais-mini { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
.ais-mini b { display: block; margin-top: 3px; font-size: 13px; font-weight: 600; line-height: 1.45; }
.air .mt-8 { margin-top: 8px; }

@media (max-width: 1180px) { .ai-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
    .ai-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .air-hookbox, .ais-end, .ais-mini { grid-template-columns: minmax(0, 1fr); }
    .ais-beat { flex-direction: column; gap: 6px; }
    .ais-time { width: auto; }
    .ais-row { flex-direction: column; gap: 1px; }
    .ais-row > span { width: auto; padding-top: 0; }
    .air-idea summary { flex-wrap: wrap; }
    .air-idea-title { flex-basis: calc(100% - 80px); }
    .air-council-members { margin-left: 0; }
    .air-idea-bd { padding: 2px 10px 12px; }
    .air-idea .ais { padding: 10px; margin: 0 -4px; }
    .ais-beats { border-radius: 10px; }
}

/* ==========================================================================
   Pricing v2 — five credit plans
   ========================================================================== */
.pz-wrap { max-width: 1320px; }
.pz-toggle { display: inline-flex; gap: 4px; padding: 4px; margin-top: 18px; border-radius: 12px; background: var(--surface-3); }
.section-hd .pz-toggle { margin-top: 0; }
.pz-toggle button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.pz-toggle button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }
.pz-save { font-size: 11px; font-weight: 700; color: var(--pos); background: var(--pos-soft); padding: 2px 7px; border-radius: 999px; }

.pz-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 28px; align-items: stretch; }
.pz-card { position: relative; display: flex; flex-direction: column; padding: 20px 18px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-card); }
.pz-card.is-featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-grad) border-box;
    box-shadow: 0 24px 48px -28px rgba(106, 76, 255, .65); transform: translateY(-8px); }
.pz-card.is-current { outline: 2px solid var(--pos); outline-offset: 2px; }
.pz-ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
    padding: 5px 12px; border-radius: 999px; background: var(--brand-grad); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 6px 16px -6px rgba(184, 77, 235, .7); }
.pz-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pz-hd h3 { font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: -.015em; }
.pz-tag { margin-top: 3px; font-size: 12.5px; color: var(--text-3); min-height: 34px; line-height: 1.4; }
.pz-price { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.pz-price b { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.pz-price span { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.pz-sub { margin-top: 4px; font-size: 12px; color: var(--text-2); min-height: 18px; }
.pz-sub s { color: var(--text-3); }
.pz-credits { margin-top: 14px; padding: 11px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.pz-card.is-featured .pz-credits { background: var(--accent-soft); border-color: #DCD3FF; }
.pz-credits > div { font-size: 13px; color: var(--text-2); }
.pz-credits > div b { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--text); }
.pz-credits > span { font-size: 11.5px; color: var(--text-3); }
.pz-credits em { font-style: normal; font-weight: 700; color: var(--pos); }
.pz-credits small { font-size: 11.5px; color: var(--text-2); line-height: 1.4; }
.pz-cta { margin-top: 14px; }
.pz-cta[aria-disabled="true"] { pointer-events: none; opacity: .6; }
.pz-fit { display: flex; gap: 6px; margin-top: 10px; font-size: 11.5px; line-height: 1.45; color: var(--text-3); }
.pz-fit svg { flex: none; margin-top: 1px; }
.pz-feat { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 8px; }
.pz-feat li { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text); }
.pz-feat li svg { flex: none; margin-top: 1px; color: var(--pos); }
.pz-feat li.off { color: var(--text-3); }
.pz-feat li.off svg { color: var(--text-3); }
.pz-trust { display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; margin-top: 22px; font-size: 12.5px; color: var(--text-3); text-align: center; }

.pz-costs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card-bd .pz-costs { grid-template-columns: minmax(0, 1fr); }
.pz-cost { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.card-bd .pz-cost { background: var(--surface-2); border-color: transparent; }
.pz-cost-ic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.pz-cost > div { flex: 1; min-width: 0; }
.pz-cost b { font-size: 13.5px; }
.pz-cost p { margin: 2px 0 0; font-size: 12px; line-height: 1.45; color: var(--text-3); }
.pz-cost-n { flex: none; text-align: right; font-family: var(--font-display); font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pz-cost-n small { display: block; font-family: var(--font-sans, inherit); font-size: 11px; font-weight: 500; color: var(--text-3); }
.pz-cost.is-free .pz-cost-ic { background: var(--pos-soft); color: var(--pos); }
.pz-cost.is-free .pz-cost-n { color: var(--pos); font-size: 15px; }

.pz-table th.is-featured, .pz-table td.is-featured { background: #FAF8FF; }
.pz-table th.is-featured { color: var(--accent-text); }
.pz-yes { display: inline-flex; color: var(--pos); }

.pz-topups { display: flex; flex-direction: column; gap: 8px; }
.pz-topup { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.pz-topup b { display: block; font-size: 14px; }
.pz-topup span { font-size: 12px; color: var(--text-3); }
.pz-topup-note { display: flex; gap: 6px; margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-2); }
.pz-topup-note svg { flex: none; margin-top: 2px; color: var(--warn); }

/* credits in the app */
.sb-credits { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 12px 10px; padding: 9px 12px; border-radius: 10px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .72); font-size: 12.5px; text-decoration: none; }
.sb-credits span { display: inline-flex; align-items: center; gap: 6px; }
.sb-credits b { color: #fff; font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.sb-credits:hover { background: rgba(255, 255, 255, .1); text-decoration: none; color: #fff; }
.sb-credits.is-low { border-color: rgba(255, 170, 90, .5); }
.sb-credits.is-low b { color: #FFC37A; }
.credit-big { margin-top: 4px; font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.credit-big span { font-size: 14px; font-weight: 600; color: var(--text-3); }
.credit-note { display: flex; gap: 7px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.credit-note svg { flex: none; margin-top: 2px; color: var(--accent); }
.credit-note b { white-space: nowrap; }
/* Analiz search card: sample profiles and the user's own accounts as two groups. */
.try-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.try-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.try-group > .t-xs { margin-right: 2px; }
.chip-tag { display: inline-flex; align-items: center; gap: 3px; margin-left: 2px; padding: 1px 6px 1px 5px; border-radius: var(--r-full); background: var(--pos-soft); color: var(--pos); font-size: 10.5px; font-weight: 600; line-height: 1.4; }
.credit-short { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 14px; background: linear-gradient(180deg, #FFF8EE, #FFFFFF); border: 1px solid #F5D9B5; }
.credit-short-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px; background: var(--warn-soft); color: var(--warn); }
.credit-short b { font-size: 15px; }
.credit-short p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }

@media (max-width: 1240px) {
    .pz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pz-card.is-featured { transform: none; }
}
@media (max-width: 900px) {
    .pz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .pz-costs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .pz-grid { grid-template-columns: minmax(0, 1fr); }
    .pz-tag { min-height: 0; }
    .pz-toggle button { padding: 8px 11px; }
}

/* ==========================================================================
   Pricing v3 — colour-coded plan cards on a dark stage
   ========================================================================== */
.pz-stage {
    --pz-bg: #0B0D1F;
    margin-top: 26px; padding: 34px 22px 26px; border-radius: 28px;
    background:
        radial-gradient(900px 420px at 50% -12%, rgba(124, 92, 255, .38), transparent 62%),
        radial-gradient(500px 300px at 95% 110%, rgba(255, 111, 150, .16), transparent 70%),
        var(--pz-bg);
    box-shadow: 0 30px 80px -40px rgba(15, 17, 36, .7);
}
.pz-stage .pz-grid { margin-top: 0; gap: 14px; align-items: start; }
.pz-stage .pz-card {
    --pz-acc: #A5B0D6; --pz-head: linear-gradient(160deg, #2B2F4A, #1B1E36); --pz-glow: rgba(120, 130, 200, .25);
    position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden;
    border-radius: 22px; background: #14172C; border: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 24px 50px -34px var(--pz-glow); transform: none; color: #E8EAF6;
    transition: transform .25s ease, box-shadow .25s ease;
}
.pz-stage .pz-card:hover { transform: translateY(-4px); box-shadow: 0 34px 60px -30px var(--pz-glow); }
.pz-card.pz-t-start, .pz-quiz-box.pz-t-start, .pk-card.pz-t-start { --pz-acc: #5CC8FF; --pz-head: linear-gradient(140deg, #1E6BFF 0%, #22C3EE 100%); --pz-glow: rgba(34, 160, 255, .55); }
.pz-card.pz-t-pro, .pz-quiz-box.pz-t-pro, .pk-card.pz-t-pro { --pz-acc: #E0A4FF; --pz-head: linear-gradient(140deg, #6A4CFF 0%, #B84DEB 55%, #FF6F96 100%); --pz-glow: rgba(184, 77, 235, .8); }
.pz-card.pz-t-business, .pz-quiz-box.pz-t-business, .pk-card.pz-t-business { --pz-acc: #5BE39A; --pz-head: linear-gradient(140deg, #059669 0%, #34D399 100%); --pz-glow: rgba(16, 185, 129, .55); }
.pz-card.pz-t-enterprise, .pz-quiz-box.pz-t-enterprise, .pk-corp.pz-t-enterprise { --pz-acc: #FCC45A; --pz-head: linear-gradient(140deg, #F59E0B 0%, #F97316 100%); --pz-glow: rgba(249, 140, 22, .5); }
.pz-stage .pz-card.is-featured { transform: translateY(-12px); border-color: rgba(224, 164, 255, .35); }
.pz-stage .pz-card.is-featured:hover { transform: translateY(-16px); }
.pz-stage .pz-card.is-current { outline: 2px solid #5BE39A; outline-offset: 3px; }
.pz-stage .pz-card.is-picked { animation: pz-pick 1.2s ease 2; }
@keyframes pz-pick { 50% { box-shadow: 0 0 0 4px var(--pz-acc), 0 30px 60px -20px var(--pz-glow); } }

.pz-head { position: relative; padding: 20px 18px 18px; background: var(--pz-head); color: #fff; }
.pz-head::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(240px 120px at 85% -10%, rgba(255, 255, 255, .28), transparent 70%); }
.pz-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pz-title h3 { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: #fff; }
.pz-badge { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .26); }
.pz-badge.is-cur { background: rgba(10, 30, 20, .35); }
.pz-stage .pz-tag { margin-top: 6px; min-height: 34px; font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .82); }
.pz-stage .pz-price { position: relative; z-index: 1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-top: 10px; }
.pz-stage .pz-price s { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: rgba(255, 255, 255, .6); text-decoration-thickness: 2px; }
.pz-stage .pz-price s:empty { display: none; }
.pz-stage .pz-price b { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -.035em; line-height: 1; color: #fff; }
.pz-stage .pz-price span { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .8); }
.pz-stage .pz-sub { position: relative; z-index: 1; min-height: 32px; margin-top: 6px; font-size: 11.5px; line-height: 1.4; color: rgba(255, 255, 255, .78); }
.pz-stage .pz-cta {
    position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 8px;
    min-height: 46px; margin-top: 12px; padding: 8px 12px; border-radius: 13px; text-decoration: none;
    background: #fff; color: #101326; font-weight: 750; font-size: 14px;
    box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .55); transition: transform .15s ease, box-shadow .15s ease;
}
.pz-stage .pz-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(0, 0, 0, .6); text-decoration: none; color: #101326; }
.pz-stage .pz-t-free .pz-cta { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.pz-stage .pz-t-free .pz-cta:hover { color: #fff; background: rgba(255, 255, 255, .18); }
.pz-stage .pz-cta[aria-disabled="true"] { pointer-events: none; opacity: .75; }
.pz-pill { font-style: normal; font-size: 11px; font-weight: 750; color: #fff; padding: 3px 8px; border-radius: 999px;
    background: linear-gradient(90deg, #FF3D7F, #FF6A3D); white-space: nowrap; }
.pz-pill[hidden] { display: none; }

.pz-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 18px; }
.pz-stage .pz-card .pz-credits, .pz-stage .pz-card.is-featured .pz-credits {
    display: flex; flex-direction: row; gap: 10px; align-items: flex-start; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
.pz-stage .pz-card .pz-credits > div { font-size: inherit; color: inherit; }
.pz-dot { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--pz-acc); color: #14172C; margin-top: 1px; }
.pz-stage .pz-credits b { font-size: 15.5px; font-weight: 800; color: var(--pz-acc); font-family: var(--font-display); }
.pz-stage .pz-credits span { font-size: 12.5px; color: rgba(232, 234, 246, .6); }
.pz-stage .pz-credits i { display: block; margin-top: 2px; font-style: normal; font-size: 11.5px; color: rgba(232, 234, 246, .55); }
.pz-tree { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.pz-tree li { position: relative; padding-left: 18px; font-size: 12.5px; color: #E8EAF6; }
.pz-tree li::before { content: ""; position: absolute; left: 4px; top: -6px; width: 8px; height: 14px;
    border-left: 1.5px solid rgba(232, 234, 246, .3); border-bottom: 1.5px solid rgba(232, 234, 246, .3); border-bottom-left-radius: 4px; }
.pz-group { padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.pz-group-hd { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(232, 234, 246, .45); margin-bottom: 8px; }
.pz-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pz-group li { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: #E8EAF6; }
.pz-ic { display: grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 50%;
    background: color-mix(in srgb, var(--pz-acc) 22%, transparent); color: var(--pz-acc); margin-top: 0; }
.pz-group li.hl { color: var(--pz-acc); font-weight: 650; }
.pz-group li.hl .pz-ic { background: var(--pz-acc); color: #14172C; }
.pz-group li.off { color: rgba(232, 234, 246, .38); }
.pz-group li.off .pz-ic { background: rgba(255, 255, 255, .06); color: rgba(232, 234, 246, .4); }
.pz-stage .pz-fit { margin-top: 2px; color: rgba(232, 234, 246, .5); }

/* the 30-second plan picker */
.pz-quiz-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 13px 18px; border: 0;
    border-radius: 14px; background: var(--brand-grad); color: #fff; font: inherit; font-weight: 750; font-size: 14px; cursor: pointer;
    box-shadow: 0 16px 34px -12px rgba(184, 77, 235, .75); }
.pz-quiz-fab:hover { transform: translateY(-1px); }
.pz-quiz { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(8, 10, 24, .62); backdrop-filter: blur(4px); }
.pz-quiz[hidden] { display: none; }
.pz-quiz-box { --pz-acc: #E0A4FF; position: relative; width: 100%; max-width: 440px; padding: 26px 22px 22px; border-radius: 22px; background: #14172C; color: #E8EAF6;
    border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); }
.pz-quiz-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; display: grid; place-items: center; }
.pz-q-step { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pz-acc); }
.pz-q h4 { margin-top: 6px; font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -.015em; color: #fff; }
.pz-q-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.pz-q-opts button { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04);
    color: #E8EAF6; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pz-q-opts button:hover { border-color: var(--pz-acc); background: rgba(255, 255, 255, .08); }
.pz-result h4 { font-size: 30px; color: var(--pz-acc); }
.pz-result p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: rgba(232, 234, 246, .8); }
.pz-result .pz-r-price { font-weight: 750; color: #fff; }
.pz-result .btn { margin-top: 12px; }
.pz-result .btn-ghost { color: #E8EAF6; }

@media (max-width: 1240px) {
    .pz-stage .pz-card.is-featured { transform: none; }
}
@media (max-width: 560px) {
    .pz-stage { padding: 22px 12px 16px; border-radius: 20px; margin-left: -4px; margin-right: -4px; }
    .pz-stage .pz-tag, .pz-stage .pz-sub { min-height: 0; }
    .pz-quiz-fab { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); padding: 11px 14px; font-size: 13px; }
}
/* wider stage on marketing pages; flexible columns inside the app */
.lp .lp-wrap.pz-wrap { max-width: 1480px; }
.main .pz-stage .pz-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.pz-stage .pz-pill { white-space: normal; text-align: center; font-size: 10.5px; line-height: 1.3; }
@media (min-width: 1241px) {
    .pz-stage .pz-price b { font-size: 30px; }
}
.link-st { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 170px; max-width: 260px; }
.link-st .t-xs { line-height: 1.4; white-space: normal; }

/* ---------- Pro lock: advice blurred for Free/Start ---------- */
.pro-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px 2px 6px; border-radius: 999px;
           font-size: 11px; font-weight: 700; letter-spacing: .02em; color: #fff; background: var(--brand-grad); }
.pro-lock { position: relative; min-height: 210px; border-radius: 12px; overflow: hidden; }
.pro-lock-body { filter: blur(5px); opacity: .75; pointer-events: none; user-select: none; -webkit-user-select: none; }
.pro-lock-cta { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
                gap: 6px; padding: 16px; text-align: center;
                background: radial-gradient(120% 90% at 50% 50%, rgba(255,255,255,.92) 0%, rgba(255,255,255,.7) 55%, rgba(255,255,255,.35) 100%); }
.pro-lock-ic { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 12px;
               color: #fff; background: var(--brand-grad); box-shadow: 0 10px 22px -10px rgba(106, 76, 255, .8); }
.pro-lock-cta b { font-size: 14.5px; color: var(--text); }
.pro-lock-cta p { max-width: 300px; margin: 0 0 6px; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.pro-lock-timing { min-height: 260px; }

/* ---------- AI: source videos beside the answer ---------- */
.ai-side { margin-top: 16px; }
.ai-side .air-vids { margin: 0; }
.ai-out-col .air-vids { margin-top: 20px; }
@media (min-width: 1181px) { .ai-out-col [data-air-side] { display: none; } }
.ai-side > * + * { margin-top: 16px; }
@media (max-width: 1180px) { .ai-side { display: none !important; } }

.air-vids { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: 0 1px 2px rgba(16, 19, 38, .04); }
.air-vids-hd { display: flex; align-items: flex-start; gap: 11px; flex-wrap: wrap; }
.air-vids-hd h4 { font-size: 15px; line-height: 1.3; }
.air-vids-hd p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); }
.air-vids-ic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; color: #fff; background: var(--brand-grad); }
.air-vids-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; }
.air-vids-kpis div { padding: 9px 11px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.air-vids-kpis span { display: block; font-size: 11px; color: var(--text-3); }
.air-vids-kpis b { display: block; margin-top: 2px; font-size: 16px; font-variant-numeric: tabular-nums; }

.air-vids-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.air-vid { display: flex; gap: 13px; padding: 11px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.air-vid:hover { border-color: var(--border-2); box-shadow: 0 6px 18px -12px rgba(16, 19, 38, .35); }
.air-vid-th { position: relative; flex: none; width: 92px; height: 132px; border-radius: 10px; overflow: hidden; background: linear-gradient(160deg, #EDE8FF, #FBE9F3); }
.air-vid-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.air-vid-ph { position: absolute; inset: 0; display: none; place-items: center; color: var(--accent); opacity: .7; }
.air-vid-th.is-noimg .air-vid-ph { display: grid; }
.air-vid-p { position: absolute; top: 6px; left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(13, 15, 30, .72); }
.air-vid-play { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: rgba(13, 15, 30, .6); }
.air-vid-bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.air-vid-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.air-vid-date { font-size: 12px; color: var(--text-3); }
.air-vid-mult { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; color: var(--pos); background: var(--pos-soft); }
.air-vid-cap { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.air-vid-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.air-vid-stats div { padding: 6px 8px; border-radius: 8px; background: var(--surface-2); min-width: 0; }
.air-vid-stats b { display: block; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.air-vid-stats span { display: flex; align-items: center; gap: 4px; margin-top: 1px; font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.air-vid-stats svg { flex: none; }
.air-vid-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; margin-top: auto; }
.air-vid-ideas { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.air-vid-ideas svg { color: var(--accent); }
.air-vid-ideas button { height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--accent-ring); background: var(--accent-soft); color: var(--accent-text); font: inherit; font-size: 11.5px; font-weight: 650; cursor: pointer; }
.air-vid-ideas button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.air-vid-open { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.air-vid-open:hover { text-decoration: underline; }
.air-vids-note { display: flex; gap: 7px; align-items: flex-start; margin: 12px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--text-3); }
.air-vids-note svg { flex: none; margin-top: 2px; }
.air-idea { scroll-margin-top: calc(var(--topbar-h, 60px) + 14px); }
.air-idea.is-flash { animation: air-flash 1.4s ease-out; }
@keyframes air-flash { 0% { box-shadow: 0 0 0 3px var(--accent-ring); border-color: var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 560px) {
    /* Cover beside the title, every number full width below it. */
    .air-vid { display: grid; grid-template-columns: 78px minmax(0, 1fr); column-gap: 11px; row-gap: 8px; padding: 10px; align-items: start; }
    .air-vid-bd { display: contents; }
    .air-vid-th { width: 78px; height: 112px; grid-row: 1 / span 2; }
    .air-vid-top, .air-vid-cap { grid-column: 2; }
    .air-vid-cap { -webkit-line-clamp: 4; }
    .air-vid-stats, .air-vid-foot { grid-column: 1 / -1; }
    .air-vid-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
    .air-vid-stats div { padding: 6px 7px; }
    .air-vid-stats b { font-size: 12.5px; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
    .air-vids { padding: 13px; }
}

/* ---------- AI: strongest videos in the niche ---------- */
.air-niche-ic { background: linear-gradient(135deg, #0EA5E9, #6A4CFF); }
.air-niche-accs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 14px; }
.air-niche-acc { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 10px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-decoration: none; }
.air-niche-acc:hover { border-color: var(--accent); text-decoration: none; }
.air-niche-acc img { width: 30px; height: 30px; flex: none; border-radius: 50%; object-fit: cover; }
.air-niche-acc span { display: flex; flex-direction: column; min-width: 0; }
.air-niche-acc b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.air-niche-acc em { font-style: normal; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.air-vid-user { font-size: 12.5px; font-weight: 700; color: var(--text); }
.air-niche-empty { display: flex; gap: 9px; align-items: flex-start; margin: 14px 0 0; padding: 12px; border-radius: 11px; background: var(--surface-2); font-size: 13px; line-height: 1.5; color: var(--text-2); }
.air-niche-empty svg { flex: none; margin-top: 2px; color: var(--text-3); }
.air-niche-skel { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.air-niche-skel i { display: block; height: 92px; border-radius: 13px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: air-skel 1.3s linear infinite; }
@keyframes air-skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.air-niche-slot:empty { display: none; }

/* ==========================================================================
   Reels tahlili (.rv) — the AI's review of one Reel, and the Reel picker
   ========================================================================== */
.ai-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .ai-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.rv-src { margin-bottom: 14px; }
.ai-pick.ai-pick-row { flex-direction: row; flex-wrap: wrap; }
.ai-pick-row .ai-pick-item { flex: 1 1 170px; }

/* picker: covers with views */
.rv-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px 8px; max-height: 372px; overflow-y: auto; padding: 3px; margin: -3px; }
.rv-pick-item { position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; cursor: pointer; }
.rv-pick-item input { position: absolute; opacity: 0; pointer-events: none; }
.rv-pick-th { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--surface-3); border: 2px solid transparent; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.rv-pick-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rv-pick-ph { position: absolute; inset: 0; display: none; place-items: center; color: var(--text-3); }
.rv-pick-th.is-noimg .rv-pick-ph { display: grid; }
.rv-pick-ok { position: absolute; top: 6px; right: 6px; display: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; }
.rv-pick-item:hover .rv-pick-th { border-color: var(--border-2); }
.rv-pick-item:has(input:checked) .rv-pick-th { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.rv-pick-item:has(input:checked) .rv-pick-ok { display: grid; }
.rv-pick-item:has(input:focus-visible) .rv-pick-th { outline: 2px solid var(--accent); outline-offset: 2px; }
.rv-pick-meta { display: flex; justify-content: space-between; gap: 4px; font-size: 11px; color: var(--text-3); }
.rv-pick-meta b { font-size: 12px; color: var(--text); }
.rv-pick-skel i { display: block; aspect-ratio: 9 / 16; border-radius: 10px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: air-skel 1.3s linear infinite; }
.rv-pick-empty { display: flex; gap: 9px; align-items: flex-start; padding: 12px; border-radius: 11px; background: var(--surface-2); font-size: 13px; line-height: 1.5; color: var(--text-2); }
.rv-pick-empty svg { flex: none; margin-top: 2px; color: var(--text-3); }
.rv-btn { color: var(--accent-text); }
.rv-btn svg { margin-right: 2px; }

/* the review */
.rv-hero { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; align-items: start; }
.rv-cover { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: var(--navy-2); }
.rv-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rv-cover-ph { position: absolute; inset: 0; display: none; place-items: center; color: rgba(255, 255, 255, .55); }
.rv-cover.is-noimg .rv-cover-ph { display: grid; }
.rv-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; transform: translate(-50%, -50%); background: rgba(15, 17, 36, .55); color: #fff; }
.rv-dur { position: absolute; right: 7px; bottom: 7px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(15, 17, 36, .68); font-variant-numeric: tabular-nums; }
.rv-hero-bd { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rv-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.rv-who b { font-size: 14px; color: var(--text); }
.rv-score { display: flex; align-items: center; gap: 14px; }
.rv-ring-wrap { position: relative; flex: none; width: 80px; height: 80px; }
.rv-ring-wrap b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.rv-ring-bg { stroke: var(--surface-3); }
.rv-good .rv-ring-fg { stroke: var(--pos); }
.rv-mid .rv-ring-fg  { stroke: var(--warn); }
.rv-bad .rv-ring-fg  { stroke: var(--neg); }
.rv-score-word { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.rv-score-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); }
.rv-t-good { color: var(--pos); }
.rv-t-mid  { color: var(--warn); }
.rv-t-bad  { color: var(--neg); }
.rv-verdict { font-size: 14.5px; line-height: 1.6; color: var(--text); }

.rv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(98px, 1fr)); gap: 8px; }
.rv-kpi { min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.rv-kpi span { display: block; font-size: 11.5px; color: var(--text-3); }
.rv-kpi b { display: block; margin-top: 2px; font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.rv-kpi i { display: block; margin-top: 1px; font-size: 11.5px; font-style: normal; color: var(--text-2); }
.rv-k-good { border-color: transparent; background: var(--pos-soft); }
.rv-k-good i { color: var(--pos); }
.rv-k-bad { border-color: transparent; background: var(--neg-soft); }
.rv-k-bad i { color: var(--neg); }

.rv-crit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rv-c { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.rv-c-hd { display: flex; align-items: center; gap: 9px; }
.rv-c-hd b { flex: 1; min-width: 0; font-size: 13.5px; }
.rv-c-ic { display: grid; flex: none; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.rv-rate { flex: none; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 22px; }
.rv-rate.rv-t-good { background: var(--pos-soft); }
.rv-rate.rv-t-mid  { background: var(--warn-soft); }
.rv-rate.rv-t-bad  { background: var(--neg-soft); }
.rv-c-ev { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.rv-c-fix { display: flex; gap: 7px; align-items: flex-start; margin-top: auto; padding: 9px 10px; border-radius: 9px; background: var(--accent-soft); font-size: 13px; line-height: 1.5; color: var(--text); }
.rv-c-fix svg { flex: none; margin-top: 2px; color: var(--accent); }

.rv-time { list-style: none; margin: 0; padding: 0; }
.rv-time li { display: grid; grid-template-columns: 86px 124px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.rv-time li:last-child { border-bottom: 0; }
.rv-tc { font-weight: 700; color: var(--text); }
.rv-tt { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; }
.rv-time .is-good .rv-tt { color: var(--pos); }
.rv-time .is-risk .rv-tt { color: var(--neg); }
.rv-tn { line-height: 1.5; color: var(--text-2); }

.rv-hooks { display: flex; flex-direction: column; gap: 8px; }
.rv-hook { display: grid; grid-template-columns: 24px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; min-width: 0; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.rv-hook-hd { display: contents; }
.rv-hook-hd .btn { grid-column: 4; grid-row: 2; justify-self: end; }
.rv-hook-row span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.rv-hook-row p, .rv-hook-row b { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; }
.rv-hook-row b { font-weight: 650; }
.rv-next b { display: block; font-size: 14px; }
.rv-next p { margin: 4px 0 10px; font-size: 13px; line-height: 1.5; color: var(--text-2); }

.rv-log { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.rv-log summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.rv-log summary::-webkit-details-marker { display: none; }
.rv-log summary > span:not(.air-chev) { flex: 1; }
.rv-log[open] summary .air-chev { transform: rotate(180deg); }
.rv-log-bd { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.rv-log-bd b { color: var(--text); }
.rv-log-sec ul { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 6px 0 0; padding: 0; }
.rv-log-sec li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
.rv-log-sec li span:first-child { color: var(--text-3); }

@media (max-width: 760px) {
    .rv-hook { grid-template-columns: 24px minmax(0, 1fr); row-gap: 8px; }
    .rv-hook-row { grid-column: 2; }
    .rv-hook-hd .btn { grid-column: 2; grid-row: auto; justify-self: start; }
}
@media (max-width: 640px) {
    .rv-hero { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
    .rv-ring-wrap { width: 64px; height: 64px; }
    .rv-ring-wrap svg { width: 64px; height: 64px; }
    .rv-ring-wrap b { font-size: 20px; }
    .rv-verdict { grid-column: 1 / -1; }
    .rv-crit { grid-template-columns: minmax(0, 1fr); }
    .rv-time li { grid-template-columns: 74px minmax(0, 1fr); row-gap: 2px; }
    .rv-time .rv-tn { grid-column: 1 / -1; }
}

/* ==========================================================================
   PDF hisobotlar (.rp)
   ========================================================================== */
.select-sm { width: auto; height: 34px; padding: 0 30px 0 11px; font-size: 13px; border-radius: 9px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23525A70' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; }
.rp-accs { display: flex; flex-direction: column; }
.rp-acc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--border); }
.rp-acc:first-child { border-top: 0; }
.rp-acc-name { flex: 1; min-width: 120px; font-size: 14px; }
.rp-err { margin: -4px 20px 10px; padding: 8px 11px; border-radius: 9px; background: var(--neg-soft); color: #8F1D16; font-size: 13px; }
.rp-note { display: flex; gap: 8px; align-items: flex-start; border-top: 1px solid var(--border); font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.rp-note svg { flex: none; margin-top: 2px; }
.rp-lock { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-2); }
.rp-lock > svg { flex: none; margin-top: 2px; color: var(--accent); }
.rp-lock b { font-size: 13.5px; }
.rp-lock p { margin: 3px 0 10px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.rp-switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 13.5px; line-height: 1.45; }
.rp-switch input { position: absolute; opacity: 0; pointer-events: none; }
.rp-switch-ui { position: relative; flex: none; width: 38px; height: 22px; margin-top: 1px; border-radius: 999px; background: var(--border-2); transition: background var(--t-fast); }
.rp-switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--sh-xs); transition: transform var(--t-fast); }
.rp-switch input:checked + .rp-switch-ui { background: var(--accent); }
.rp-switch input:checked + .rp-switch-ui::after { transform: translateX(16px); }
.rp-switch input:focus-visible + .rp-switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.rp-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-check { cursor: pointer; }
.rp-check input { accent-color: var(--accent); margin: 0 2px 0 0; }
.rp-check:has(input:checked) { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.rp-send { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.rp-inline { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); cursor: pointer; margin-top: 14px; }
.rp-inline input { accent-color: var(--accent); margin-top: 2px; }
.rp-inline.is-locked { cursor: default; color: var(--text-3); }
.rp-color { padding: 4px; height: 40px; cursor: pointer; }

/* a miniature of the PDF's first page */
.rp-preview { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 12px 14px 10px; box-shadow: var(--sh-sm); }
.rp-preview-hd { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--rp); }
.rp-preview-hd img { max-height: 26px; max-width: 90px; object-fit: contain; }
.rp-preview-hd b { flex: 1; min-width: 0; font-size: 13px; color: var(--rp); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-preview-hd span { font-size: 10px; font-weight: 700; text-align: right; color: var(--text); line-height: 1.3; }
.rp-preview-hd i { font-style: normal; font-weight: 500; color: var(--text-3); }
.rp-preview-bd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 10px 0; }
.rp-preview-bd i { display: block; height: 26px; border-radius: 5px; border: 1px solid var(--border); background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box; }
.rp-preview-bd i:first-child { background: color-mix(in srgb, var(--rp) 12%, #fff); border-color: transparent; }
.rp-preview-ft { padding-top: 6px; border-top: 1px solid var(--border); font-size: 9.5px; color: var(--text-3); }

.rp-ladder { display: flex; flex-direction: column; gap: 6px; }
.rp-step { position: relative; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.rp-step b { display: block; font-size: 13px; color: var(--text); }
.rp-step em { position: absolute; top: 9px; right: 10px; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--accent-text); }
.rp-step.is-current { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 560px) {
    .rp-acc { padding: 12px 16px; }
    .rp-acc .select-sm { flex: 1; }
}

/* ==========================================================================
   PDF hisobot page v2 (.rp2): one main action, the rest folded or compact
   ========================================================================== */
.rp2 { max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.rp2 .page-intro { margin-bottom: 4px; }
.rp2-main-bd { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 30px; align-items: center; padding: 24px 26px; }
.rp2-main-text h2 { font-size: 20px; }
.rp2-main-text > p { margin-top: 4px; }
.rp2-accs { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.rp2-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.rp2-who { display: inline-flex; flex: 1; align-items: center; gap: 9px; min-width: 150px; }
.rp2-who b { font-size: 14px; }
.rp2-hint { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; color: var(--text-3); }
.rp2-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 16px; font-size: 13.5px; color: var(--text-2); }
.rp2 .rp-err { margin: 0; }

/* the PDF's cover in miniature */
.rp2-pv { position: relative; justify-self: center; width: 164px; height: 224px; }
.rp2-pv-back { position: absolute; inset: 10px -10px -10px 10px; border-radius: 10px; border: 1px solid var(--border); background: #E8EAF3; }
.rp2-pv-page { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; padding: 12px 13px; border-radius: 10px; border: 1px solid var(--border); background: #F4F5F9; box-shadow: 0 18px 40px -18px rgba(16, 19, 38, .35); }
.rp2-pv-strip { display: block; height: 3px; border-radius: 2px; background: var(--pv); }
.rp2-pv-strip.is-grad, .rp2-pv-dash.is-grad { background: var(--brand-grad); }
.rp2-pv-top { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 9px; color: var(--text); }
.rp2-pv-top img { max-height: 14px; max-width: 72px; }
.rp2-pv-top b { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }
.rp2-pv-mark { display: grid; place-items: center; width: 13px; height: 13px; border-radius: 4px; background: var(--brand-grad); }
.rp2-pv-mark svg { width: 8px; height: 8px; }
.rp2-pv-cover { display: flex; flex-direction: column; gap: 5px; margin-top: auto; }
.rp2-pv-eyebrow { overflow: hidden; font-size: 5.5px; font-weight: 700; letter-spacing: .12em; white-space: nowrap; text-overflow: ellipsis; color: var(--pv); }
.rp2-pv-title { font-family: var(--font-display); font-size: 15px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; word-break: break-all; color: #0F1124; }
.rp2-pv-dash { display: block; width: 24px; height: 3px; margin: 3px 0; border-radius: 2px; background: var(--pv); }
.rp2-pv-stats { display: flex; gap: 6px; margin-top: 6px; padding-top: 7px; border-top: 1px solid #E2E5EE; }
.rp2-pv-stats i { display: block; flex: 1; height: 9px; border-radius: 3px; background: #DCDFEA; }

/* the secondary cards */
.rp2-card .card-hd > svg { flex: none; color: var(--text-3); }
.rp2-auto-fields { margin-top: 16px; }
.rp2-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rp2-locked { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.rp2-locked svg { flex: none; margin-top: 2px; color: var(--accent); }
.rp2-brand summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; }
.rp2-brand summary::-webkit-details-marker { display: none; }
.rp2-brand summary > svg { flex: none; color: var(--text-3); }
.rp2-brand summary > span:not(.air-chev) { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.rp2-brand summary b { font-size: 14.5px; }
.rp2-brand[open] summary { border-bottom: 1px solid var(--border); }
.rp2-brand[open] summary .air-chev { transform: rotate(180deg); }
.rp2-file { padding-top: 7px; }
.rp2-hist { list-style: none; margin: 0; padding: 0; }
.rp2-hist li { display: flex; align-items: center; gap: 10px; padding: 11px 20px; border-top: 1px solid var(--border); }
.rp2-hist li:first-child { border-top: 0; }
.rp2-hist-main { display: flex; flex: 1; flex-direction: column; min-width: 0; font-size: 13.5px; }
.rp2-hist-main .t-xs { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 640px) {
    .rp2-main-bd { grid-template-columns: minmax(0, 1fr); padding: 18px; }
    .rp2-pv { display: none; }
    .rp2-acc .select-sm { flex: 1; }
    .rp2-hist li { flex-wrap: wrap; padding: 11px 16px; }
}

/* AI yordamchi: three tabs, each tab's two forms behind one switch */
.ai-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ai-sub-hd { padding-top: 12px; padding-bottom: 12px; }
.ai-sub { width: 100%; flex-wrap: nowrap; }
.ai-sub label { flex: 1 1 0; min-width: 0; }
.ai-sub span { height: 100%; padding: 8px 10px; text-align: center; line-height: 1.3; }
@media (max-width: 640px) { .ai-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
@media (max-width: 560px) {
    .ai-mode { align-items: center; text-align: center; padding: 12px 6px; }
    .ai-mode-text span, .ai-mode-tag { display: none; }
}
.ai-mode:has(.ai-mode-tag) .ai-mode-text { padding-right: 36px; }

/* ==========================================================================
   Raqobatchilar bilan solishtirish (.cmp)
   ========================================================================== */
.cmp-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cmp-who-item { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 12px 7px 7px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.cmp-who-item:hover { border-color: var(--border-2); }
.cmp-who-item.is-me { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-grad) border-box; }
.cmp-who-item > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cmp-who-item b { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.cmp-who-item small { font-size: 11.5px; color: var(--text-3); }
.cmp-av { position: relative; display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; overflow: hidden; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 700; }
.cmp-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-av i { font-style: normal; }
.cmp-vs { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 0 2px; }
.cmp-how { display: flex; align-items: flex-start; gap: 6px; margin-top: -6px; font-size: 12px; line-height: 1.45; color: var(--text-3); }
.cmp-how svg { flex: none; margin-top: 1px; }

.cmp-pill { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 17px; white-space: nowrap; vertical-align: 1px; }
.cmp-good { color: var(--pos); background: var(--pos-soft); }
.cmp-bad { color: var(--neg); background: var(--neg-soft, #FFF0F0); }
.cmp-even { color: var(--text-2); background: var(--surface-3); }

.cmp-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.cmp-table th, .cmp-table td { padding: 9px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: 0; }
.cmp-table thead th { font-size: 11.5px; font-weight: 700; color: var(--text-3); background: var(--surface-2); }
.cmp-table tbody th { text-align: left; font-weight: 500; color: var(--text-2); position: sticky; left: 0; background: var(--surface); z-index: 1; }
.cmp-table td.is-me { background: #FBFAFF; color: var(--text); }
.cmp-table thead th.is-me { color: var(--accent-text); background: #F4F1FF; }
.cmp-table .is-med { color: var(--text-3); }

.cmp-gaps { display: flex; flex-direction: column; gap: 10px; }
.cmp-gap { padding: 13px 14px; border-radius: 12px; border: 1px solid var(--border); border-left: 3px solid var(--neg); background: var(--surface); }
.cmp-gap-hd { display: flex; align-items: center; gap: 9px; }
.cmp-gap-hd b { font-size: 14px; font-weight: 650; }
.cmp-num { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--neg); background: var(--neg-soft, #FFF0F0); }
.cmp-ev, .cmp-fix { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; font-size: 13px; line-height: 1.5; }
.cmp-ev { color: var(--text-2); }
.cmp-ev svg { flex: none; margin-top: 2px; color: var(--text-3); }
.cmp-fix svg { flex: none; margin-top: 2px; color: var(--pos); }

.cmp-steps { list-style: none; margin: 0; padding: 0; counter-reset: cmp; display: flex; flex-direction: column; gap: 8px; }
.cmp-steps li { counter-increment: cmp; position: relative; display: flex; flex-direction: column; gap: 5px; padding: 11px 14px 11px 46px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; line-height: 1.5; }
.cmp-steps li::before { content: counter(cmp); position: absolute; left: 13px; top: 11px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; font-size: 12px; font-weight: 700; color: #fff; background: var(--brand-grad); }
.cmp-steps b { display: inline-flex; align-items: center; gap: 5px; width: fit-content; font-size: 12px; font-weight: 650; color: var(--accent-text); }

.cmp-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cmp-post { display: flex; flex-direction: column; min-width: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.cmp-post:hover { border-color: var(--border-2); box-shadow: var(--sh-md); }
.cmp-post-th { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--surface-3); }
.cmp-post-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-post-th i { position: absolute; left: 7px; top: 7px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-style: normal; font-weight: 700; color: #fff; background: rgba(15, 18, 32, .62); }
.cmp-post-th em { position: absolute; right: 7px; top: 7px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-style: normal; font-weight: 700; color: #fff; background: var(--brand-grad); }
.cmp-post-bd { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px 10px; font-size: 12px; line-height: 1.4; }
.cmp-post-bd b { font-size: 12.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-post-bd small { color: var(--text-3); font-size: 11.5px; }
.cmp-post-bd > span { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 560px) {
    .cmp-who-item b { max-width: 110px; }
    .cmp-table { font-size: 12.5px; }
    .cmp-table th, .cmp-table td { padding: 8px 9px; }
    .cmp-table tbody th { white-space: normal; min-width: 104px; max-width: 118px; line-height: 1.3; }
    .cmp-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Trendlar (trends.php) and Ssenariylarim (scripts.php) — 2026-11-29
   ========================================================================== */
.tr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tr-head-main { display: flex; gap: 14px; align-items: flex-start; max-width: 760px; }
.tr-head-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--brand-grad); color: #fff; box-shadow: 0 8px 18px -8px rgba(124, 92, 255, .8); }
.tr-head h1 { font-size: 24px; }
.tr-head p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.tr-head-stats { display: flex; gap: 6px; }
.tr-head-stats > div { min-width: 86px; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-xs); }
.tr-head-stats b { display: block; font-family: var(--font-display); font-size: 17px; letter-spacing: -.01em; }
.tr-head-stats span { font-size: 11.5px; color: var(--text-3); }

.tr-niches { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tr-niches .chip { text-decoration: none; }
.tr-filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tr-filters label { display: flex; flex-direction: column; gap: 4px; }
.tr-filters label > span { font-size: 11.5px; font-weight: 650; color: var(--text-3); }
.tr-filters .select { height: 36px; width: auto; min-width: 150px; padding: 0 10px; font-size: 13px; }
.tr-filters-note { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-size: 12px; color: var(--text-3); padding-bottom: 9px; }

.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.tr-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-sm); transition: box-shadow var(--t-fast), transform var(--t-fast); }
.tr-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.tr-th { position: relative; display: block; aspect-ratio: 3 / 4; background: linear-gradient(160deg, #2A1E72, #121530); overflow: hidden; }
.tr-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tr-th::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(180deg, transparent, rgba(10, 12, 27, .72)); pointer-events: none; }
.tr-ph { position: absolute; inset: 0; display: none; place-items: center; color: rgba(255, 255, 255, .55); }
.tr-th.is-noimg .tr-ph { display: grid; }
.tr-mult { position: absolute; top: 9px; left: 9px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--accent-text); font-size: 12px; font-weight: 750; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .35); }
.tr-mult.is-hot { background: var(--brand-grad); color: #fff; }
.tr-views { position: absolute; left: 10px; bottom: 9px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; color: #fff; font-family: var(--font-display); font-size: 16px; font-weight: 750; letter-spacing: -.01em; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.tr-bd { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 11px 12px 12px; }
.tr-acc { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); text-decoration: none; }
.tr-acc:hover { text-decoration: none; }
.tr-acc > span { display: flex; flex-direction: column; min-width: 0; }
.tr-acc b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-acc small { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-cap { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tr-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: auto; }
.tr-stats span { display: inline-flex; align-items: center; gap: 4px; }
.tr-stats svg { color: var(--text-3); }
.tr-ago { margin-left: auto; color: var(--text-3); }
.tr-act { display: flex; gap: 6px; }
.tr-act .btn-primary { flex: 1; }
.tr-foot { display: flex; gap: 7px; margin: 16px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.55; }
.tr-foot svg { flex: none; margin-top: 2px; }

.tr-modal-wrap { align-items: start; overflow-y: auto; padding: 4vh 16px; }
.tr-modal { max-width: 860px; }
.tr-modal-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tr-modal-hd h3 { font-size: 18px; }
.tr-pick { display: flex; gap: 12px; align-items: center; padding: 10px; margin-bottom: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.tr-pick img { flex: none; width: 54px; height: 72px; object-fit: cover; border-radius: 8px; }
.tr-pick > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12.5px; color: var(--text-2); }
.tr-pick b { color: var(--text); font-size: 14px; }
.tr-pick small { color: var(--text-3); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tr-pick-k { font-size: 10.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); }
.tr-form { display: flex; flex-direction: column; gap: 4px; }
.tr-form-note { margin: 8px 0 0; text-align: center; }
.tr-out .ais { border: 0; box-shadow: none; padding: 0; }

/* script extras: the sample Reel, the technique, before-shoot checks, saved note */
.ais-ref { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 12px; background: #FFF8EF; border: 1px solid #F6DFC0; color: var(--text); text-decoration: none; }
.ais-ref:hover { text-decoration: none; border-color: #EFC98F; }
.ais-ref img, .ais-ref-ph { flex: none; width: 44px; height: 58px; object-fit: cover; border-radius: 7px; background: #F3E6D3; display: grid; place-items: center; color: var(--warn); }
.ais-ref-bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.ais-ref-k { font-size: 10.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); }
.ais-ref-cap { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ais-ref > svg { flex: none; color: var(--text-3); }
.ais-tech { padding: 11px 13px; border-radius: 12px; background: #F1F0FC; border: 1px solid #E2DEFA; font-size: 13px; line-height: 1.55; color: #2A2F55; }
.ais-tech p { margin: 0; }
.ais-tech b { color: #1B1F4A; }
.ais-tech-ref { display: flex; gap: 6px; margin-top: 6px !important; color: var(--text-2); font-size: 12.5px; }
.ais-tech-ref svg { flex: none; margin-top: 3px; }
.ais-before { background: #F4F7FF; border-color: #DCE5FB; }
.ais-before li svg { color: var(--info); }
.ais-saved { display: flex; gap: 7px; align-items: flex-start; padding: 9px 12px; border-radius: 10px; background: var(--pos-soft); color: #075E3A; font-size: 12.5px; line-height: 1.5; }
.ais-saved svg { flex: none; margin-top: 2px; }
.ais-saved a { font-weight: 700; color: #075E3A; text-decoration: underline; }

/* Ssenariylarim */
.scr-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 12px; position: sticky; top: 8px; z-index: 5; }
.scr-bar .spacer { margin-left: auto; }
.scr-all { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; cursor: pointer; }
.scr-list { display: flex; flex-direction: column; gap: 10px; }
.scr-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.scr-check { flex: none; display: grid; place-items: center; width: 22px; cursor: pointer; }
.scr-check input, .scr-all input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.scr-th { flex: none; position: relative; width: 48px; height: 64px; border-radius: 9px; overflow: hidden; background: linear-gradient(160deg, #2A1E72, #121530); display: grid; place-items: center; color: rgba(255, 255, 255, .6); }
.scr-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scr-bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.scr-k { font-size: 11.5px; font-weight: 650; color: #C0267E; }
.scr-t { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.scr-src { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-hook { margin: 3px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-act { flex: none; display: flex; align-items: center; gap: 6px; }
.scr-act form { margin: 0; }
.scr-open .ais { border: 0; box-shadow: none; padding: 0; }

@media (max-width: 720px) {
    .tr-niches { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .tr-niches::-webkit-scrollbar { display: none; }
    .tr-niches .chip { flex: none; }
    .tr-head h1 { font-size: 21px; }
    .tr-head-stats { width: 100%; }
    .tr-head-stats > div { flex: 1; min-width: 0; }
    .tr-filters label { flex: 1 1 140px; }
    .tr-filters .select { width: 100%; min-width: 0; }
    .tr-filters-note { margin-left: 0; padding-bottom: 0; }
    .tr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .tr-bd { padding: 9px 10px 10px; }
    .tr-act { flex-direction: column; }
    .tr-views { font-size: 14px; }
    .tr-modal-wrap { padding: 0; }
    .tr-modal { border-radius: 0; min-height: 100vh; }
    .scr-row { flex-wrap: wrap; }
    .scr-act { width: 100%; justify-content: flex-end; }
}

/* PDF hisobot inside Kuzatuv (tracking.php) — 2026-11-29 */
.rp2-in-track { max-width: none; margin: 0 0 16px; }
.rp2-sec { font-size: 17px; margin: 14px 0 -4px; }
.trk-sec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 6px 0 10px; }
.rp2-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12.5px; }
.rp2-links a { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.trk-sec h2 { font-size: 17px; }
.trk-sec span { font-size: 12.5px; color: var(--text-3); }

/* Trendlar: progress line and the admin's status panel — 2026-11-29 */
.tr-head-stats b small { font-size: 12px; font-weight: 600; color: var(--text-3); }
.tr-progress { display: flex; align-items: center; gap: 7px; margin: -6px 0 12px; font-size: 12.5px; color: var(--text-2); }
.tr-progress svg { flex: none; color: var(--accent); }
.tr-progress a { font-weight: 650; }
.tr-admin { margin-top: 18px; border-style: dashed; }
.tr-admin summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; list-style: none; font-size: 13.5px; }
.tr-admin summary::-webkit-details-marker { display: none; }
.tr-admin summary .t-faint { margin-left: auto; }
.tr-admin-bd { padding: 0 16px 16px; }
.tr-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.tr-admin-grid > div { padding: 9px 11px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; }
.tr-admin-grid span { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.tr-admin-grid b { font-family: var(--font-display); font-size: 18px; }
.tr-admin-grid small { font-size: 11.5px; color: var(--text-3); line-height: 1.4; }
.tr-admin-warn { display: flex; gap: 7px; align-items: flex-start; margin: 10px 0 0; padding: 8px 11px; border-radius: 9px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; }
.tr-admin-warn svg { flex: none; margin-top: 2px; }
.tr-admin-act { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.tr-admin-act code { font-size: 11px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }

/* ==========================================================================
   Rule builder (rule-form.php) — the inspector's fields and the customer's phone,
   2026-11-29. The phone imitates Instagram on iOS closely: system font,
   Instagram's greys and blue, the Direct bubble colours.
   ========================================================================== */


.rb-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rb-opt { position: relative; display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.rb-opt:hover { border-color: #C9CDE0; }
.rb-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rb-opt.is-on { border-color: var(--accent); background: #FAF8FF; }
.rb-opt input:focus-visible ~ .rb-opt-tx b { text-decoration: underline; }
.rb-opt-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); }
.rb-opt.is-on .rb-opt-ic { background: var(--accent); color: #fff; }
.rb-opt-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rb-opt-tx b { font-size: 14px; }
.rb-opt-tx small { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }

.rb-sub { margin: 16px 0 8px; font-size: 13px; font-weight: 650; }
.rb-sub span { font-weight: 500; color: var(--text-3); }
.rb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.rb-post { position: relative; aspect-ratio: 4 / 5; border-radius: 9px; overflow: hidden; cursor: pointer; background: linear-gradient(160deg, #2A1E72, #121530); border: 2px solid transparent; }
.rb-post input { position: absolute; opacity: 0; pointer-events: none; }
.rb-post img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rb-post-k { position: absolute; left: 5px; bottom: 5px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; font-weight: 650; }
.rb-post-ok { position: absolute; top: 5px; right: 5px; display: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; }
.rb-post.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px #fff inset; }
.rb-post.is-on .rb-post-ok { display: grid; }
.rb-note { margin: 6px 0 8px; font-size: 12.5px; color: var(--warn); }

.rb-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 44px; padding: 6px 8px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); cursor: text; }
.rb-chips:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.rb-chips.is-err { border-color: var(--neg); }
.rb-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 650; }
.rb-chip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 15px; line-height: 1; cursor: pointer; }
.rb-chip button:hover { background: rgba(106, 76, 255, .15); }
.rb-chip-in { flex: 1; min-width: 120px; border: 0; outline: 0; font: inherit; font-size: 14px; padding: 5px 4px; background: transparent; }
.rb-suggest, .rb-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 6px; }
.rb-suggest > span, .rb-presets > span { font-size: 12px; font-weight: 600; color: var(--text-3); }
.rb-presets { margin: 0 0 10px; }

.rb-msg { border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface); overflow: hidden; }
.rb-msg:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.rb-msg.is-err { border-color: var(--neg); }
.rb-msg .textarea { border: 0; box-shadow: none; border-radius: 0; min-height: 120px; font-size: 14px; line-height: 1.55; }
.rb-msg .textarea:focus { box-shadow: none; }
.rb-msg-bar { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-top: 1px solid var(--border); background: var(--surface-2); }
.rb-msg-bar .spacer { margin-left: auto; }
.rb-var { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border: 1px dashed #B9ADFF; border-radius: 8px; background: #fff; color: var(--accent-text); font-size: 12px; font-weight: 650; cursor: pointer; }
.rb-var:hover { background: var(--accent-soft); }
.rb-warn, .rb-hint { display: flex; gap: 7px; align-items: flex-start; margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; }
.rb-warn { color: var(--warn); }
.rb-hint { color: var(--text-3); }
.rb-warn svg, .rb-hint svg { flex: none; margin-top: 2px; }

.rb-final { padding: 16px 20px; border-radius: var(--r-md); background: linear-gradient(180deg, #FBFAFF, #F6F4FF); border: 1px solid #E4DDFF; }
.rb-sum-k { font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.rb-sum p { margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: var(--text); }
.rb-off { color: var(--warn); font-weight: 600; }
.rb-final .switch-row { border-top-color: #E4DDFF; }
.rb-final-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* the right column */
.rb-side { position: sticky; top: calc(var(--topbar-h) + 14px); }
.rb-side-in { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.rb-try { width: 100%; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.rb-try label { display: block; font-size: 12.5px; font-weight: 650; margin-bottom: 6px; }
.rb-try-row { display: flex; gap: 6px; }
.rb-try-row .input { height: 36px; font-size: 13px; }
.rb-verdict { margin: 7px 0 0; font-size: 12.5px; font-weight: 600; }
.rb-verdict.is-ok { color: var(--pos); }
.rb-verdict.is-no { color: var(--neg); }

/* ---------- the phone ---------- */
.ph { --ig-text: #000; --ig-muted: #737373; --ig-line: #DBDBDB; --ig-blue: #0095F6;
      position: relative; width: 300px; height: 620px; padding: 11px; border-radius: 50px; background: #1C1C1E;
      box-shadow: 0 0 0 2px #3A3A3C inset, 0 30px 60px -24px rgba(16, 19, 38, .55), 0 10px 22px -10px rgba(16, 19, 38, .35); flex: none; }
.ph-screen { position: relative; width: 100%; height: 100%; border-radius: 40px; overflow: hidden; background: #fff; color: var(--ig-text);
             font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 13px; line-height: 1.35; -webkit-font-smoothing: antialiased; }
.ph-status { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 4px 24px 0 30px; }
.ph-status b { font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.ph-island { position: absolute; left: 50%; top: 9px; width: 88px; height: 26px; margin-left: -44px; border-radius: 20px; background: #000; }
.ph-icons { display: flex; gap: 5px; align-items: center; }
.ph-icons svg { fill: currentColor; }
.ph-home { position: absolute; left: 50%; bottom: 7px; z-index: 6; width: 104px; height: 4.5px; margin-left: -52px; border-radius: 3px; background: #000; }

.ph-banner { position: absolute; top: 8px; left: 9px; right: 9px; z-index: 8; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 20px;
             background: rgba(245, 245, 245, .86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .35);
             transform: translateY(-140%); transition: transform .45s cubic-bezier(.2, .9, .25, 1.1); }
.ph.is-banner .ph-banner { transform: translateY(0); }
.ph-app { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.ph-banner-tx { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.ph-banner-top { display: flex; justify-content: space-between; color: #666; font-size: 12px; }
.ph-banner-top b { font-weight: 600; text-transform: uppercase; font-size: 11.5px; letter-spacing: .02em; }
.ph-banner-who { font-weight: 650; }
.ph-banner-msg { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.ig { position: absolute; inset: 44px 0 0; display: flex; flex-direction: column; background: #fff; transition: transform .45s cubic-bezier(.3, .8, .3, 1), opacity .3s; }
.ig-dm { transform: translateX(100%); }
.ph[data-scene="dm"] .ig-post { transform: translateX(-28%); opacity: .4; }
.ph[data-scene="dm"] .ig-dm { transform: translateX(0); }

.ig-nav { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 10px; }
.ig-nav-t { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.ig-nav-t small { font-size: 10.5px; color: var(--ig-muted); font-weight: 600; }
.ig-nav-t b { font-size: 15px; font-weight: 700; }
.ig-ph { display: flex; align-items: center; gap: 9px; padding: 6px 12px; }
.ig-ph b { font-size: 13px; font-weight: 600; }
.ig-more { margin-left: auto; }
.ig-av { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: #EFEFEF; color: #555; overflow: hidden; font-weight: 700; font-size: 13px; }
.ig-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ig-av i { font-style: normal; }
.ig-ring { padding: 2px; background: linear-gradient(45deg, #FEDA75, #FA7E1E, #D62976, #962FBF, #4F5BD5); }
.ig-ring img, .ig-ring i { border: 2px solid #fff; border-radius: 50%; width: 100%; height: 100%; display: grid; place-items: center; background: #EFEFEF; }
.ig-av-s { width: 30px; height: 30px; font-size: 12px; }
.ig-av-m { width: 30px; height: 30px; }
.ig-av-l { width: 76px; height: 76px; font-size: 28px; }
.ig-av-xs { width: 24px; height: 24px; font-size: 10px; align-self: flex-end; }
.ig-me { background: linear-gradient(135deg, #FFD1DC, #C7B8FF); color: #4B2C83; }
.ig-media { position: relative; width: 100%; aspect-ratio: 4 / 5; flex: none; background: linear-gradient(150deg, #E9E4FF, #FFE0EC 55%, #FFF1D6); overflow: hidden; }
.ig-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ig-acts { display: flex; align-items: center; gap: 14px; padding: 9px 12px 4px; }
.ig-acts .spacer { margin-left: auto; }
.ig-likes { padding: 2px 12px; font-size: 13px; }
.ig-likes b { font-weight: 650; }
.ig-cap { padding: 2px 12px; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ig-cap b { font-weight: 650; }
.ig-all, .ig-time { padding: 2px 12px; color: var(--ig-muted); font-size: 13px; }
.ig-time { font-size: 11px; }

.ig-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 66%; z-index: 4; display: flex; flex-direction: column; background: #fff; border-radius: 16px 16px 0 0;
            box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, .35); transform: translateY(105%); transition: transform .45s cubic-bezier(.3, .8, .3, 1); }
.ph.is-sheet .ig-sheet { transform: translateY(0); }
.ig-grab { display: block; width: 36px; height: 4px; margin: 8px auto 6px; border-radius: 2px; background: #C7C7C7; }
.ig-sheet-t { display: block; text-align: center; font-size: 14.5px; font-weight: 700; padding-bottom: 9px; border-bottom: .5px solid var(--ig-line); }
.ig-cmts { list-style: none; margin: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 14px; flex: 1; overflow: hidden; }
.ig-cmts li { display: flex; gap: 10px; align-items: flex-start; }
.ig-cmts li > div { flex: 1; min-width: 0; }
.ig-cmts b { font-size: 12.5px; font-weight: 650; }
.ig-cmts small { color: var(--ig-muted); font-size: 11.5px; }
.ig-cmts p { margin: 1px 0 2px; font-size: 13px; word-break: break-word; }
.ig-cmts li > svg { flex: none; margin-top: 12px; color: var(--ig-muted); }
.ig-rep { font-weight: 600; }
.ig-new { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; background: transparent; }
.ph.is-posted .ig-new { opacity: 1; transform: none; animation: igFlash 1.6s ease-out; }
@keyframes igFlash { 0% { background: #EAF4FF; } 100% { background: transparent; } }
.ig-emoji { display: flex; justify-content: space-between; padding: 8px 14px; border-top: .5px solid var(--ig-line); font-size: 19px; }
.ig-input { display: flex; align-items: center; gap: 10px; padding: 8px 12px 22px; }
.ig-input-tx { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 34px; padding: 0 12px; border: .5px solid var(--ig-line); border-radius: 20px; font-size: 13px; overflow: hidden; white-space: nowrap; }
.ig-caret { display: none; width: 1.5px; height: 16px; background: var(--ig-blue); animation: igCaret 1s steps(1) infinite; }
.ph.is-typing .ig-caret { display: inline-block; }
.ph.is-typing .ig-ph-tx { display: none; }
.ig-ph-tx { color: var(--ig-muted); }
@keyframes igCaret { 50% { opacity: 0; } }
.ig-post-btn { color: var(--ig-blue); font-size: 13.5px; font-weight: 650; opacity: .4; }
.ph.is-typing .ig-post-btn { opacity: 1; }

/* Direct */
.igd-top { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 12px; border-bottom: .5px solid var(--ig-line); }
.igd-top .spacer { margin-left: auto; }
.igd-who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.igd-who b { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.igd-who small { font-size: 11.5px; color: var(--ig-muted); }
.igd-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 12px; overflow-y: auto; scrollbar-width: none; }
.igd-body::-webkit-scrollbar { display: none; }
.igd-intro { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-bottom: auto; padding-top: 8px; text-align: center; }
.igd-intro b { font-size: 16px; font-weight: 700; margin-top: 6px; }
.igd-intro small { font-size: 12px; color: var(--ig-muted); }
.igd-btn { margin-top: 8px; padding: 6px 12px; border-radius: 8px; background: #EFEFEF; font-size: 12.5px; font-weight: 650; }
.igd-ctx { align-self: flex-start; max-width: 80%; margin-left: 32px; }
.igd-ctx small { display: block; font-size: 11.5px; color: var(--ig-muted); margin-bottom: 4px; }
.igd-quote { padding: 7px 11px; border-radius: 14px; border: 1px solid var(--ig-line); color: #262626; font-size: 12.5px; }
.igd-row { display: flex; gap: 8px; align-items: flex-end; }
.igd-msg { max-width: 78%; padding: 8px 12px; border-radius: 18px 18px 18px 4px; background: #EFEFEF; font-size: 13.5px; line-height: 1.38; white-space: pre-wrap; word-break: break-word; }
.igd-dots { display: none; gap: 3px; padding: 11px 13px; border-radius: 18px; background: #EFEFEF; }
.igd-dots i { width: 6px; height: 6px; border-radius: 50%; background: #9B9B9B; animation: igDots 1s infinite; }
.igd-dots i:nth-child(2) { animation-delay: .15s; }
.igd-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes igDots { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
.ph.is-dots .igd-dots { display: flex; }
.ph.is-dots .igd-msg { display: none; }
.ph[data-scene="dm"] .igd-msg { animation: igIn .35s ease-out; }
@keyframes igIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.igd-input { display: flex; align-items: center; gap: 10px; margin: 6px 10px 22px; padding: 5px 10px 5px 5px; border-radius: 24px; background: #EFEFEF; color: #262626; }
.igd-cam { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ig-blue); }
.igd-ph { flex: 1; color: var(--ig-muted); font-size: 13.5px; }

@media (max-width: 1100px) {
    .ph { transform: scale(.92); transform-origin: top center; margin-bottom: -50px; }
}
@media (max-width: 900px) {
    .ph { transform: scale(.82); transform-origin: top center; margin-bottom: -112px; }
}


/* ==========================================================================
   Rule builder: the Direct funnel (2026-11-29)
   ========================================================================== */
.rb-tag { font-style: normal; margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: var(--pos-soft); color: var(--pos); font-size: 10.5px; font-weight: 750; vertical-align: 1px; }
.rb-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.rb-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }
.rb-check span { display: flex; flex-direction: column; gap: 1px; }
.rb-check b { font-size: 13.5px; }
.rb-check small { font-size: 12.5px; color: var(--text-3); }
.rb-rule { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 12px; padding: 10px 12px; border-radius: 10px; background: #EEF5FF; color: #1E4E8C; font-size: 12.5px; line-height: 1.5; }
.rb-rule svg { flex: none; margin-top: 2px; }
.rb-btnfield { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; border-radius: 8px; border: 1px solid #CFC4FF; background: #fff; color: var(--accent-text); }
.rb-btnfield input { width: 150px; border: 0; outline: 0; font: inherit; font-size: 13px; font-weight: 650; color: var(--accent-text); background: transparent; padding: 3px 2px; }
.rb-btnfield:focus-within { box-shadow: 0 0 0 3px var(--accent-ring); }
.rb-switchline { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.rb-switchline > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.rb-switchline b { font-size: 13.5px; }
.rb-switchline small { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.rb-switchline + div { margin-top: 10px; }
.rb-linkrow { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.rb-linkrow label, .rb-media, .rb-name { display: flex; flex-direction: column; gap: 4px; }
.rb-linkrow span, .rb-media span, .rb-name span { font-size: 12px; font-weight: 650; color: var(--text-2); }
.rb-linkrow small, .rb-media small, .rb-name small { font-weight: 500; color: var(--text-3); }
.rb-media { margin-top: 10px; }
.input.is-err { border-color: var(--neg); }
.rb-replies { display: flex; flex-direction: column; gap: 6px; }
.rb-reply { display: flex; gap: 6px; align-items: center; }
.rb-reply .input { height: 36px; font-size: 13px; }
.rb-replies > .btn { align-self: flex-start; }
.rb-minsel { width: auto; height: 34px; font-size: 13px; margin-bottom: 6px; }
.rb-name { margin-bottom: 12px; }

/* the phone: the conversation */
.igd-thread { display: flex; flex-direction: column; gap: 6px; }
.igd-thread .igd-dots { display: flex; }
.igd-mine { justify-content: flex-end; }
.igd-msg-me { background: linear-gradient(135deg, #6B4CFE, #3B82F6) !important; color: #fff; border-radius: 18px 18px 4px 18px !important; }
.igd-card { max-width: 80%; display: flex; flex-direction: column; border-radius: 18px 18px 18px 4px; background: #EFEFEF; overflow: hidden; animation: igIn .35s ease-out; }
.igd-card .igd-msg { max-width: none; border-radius: 0; background: transparent; animation: none; }
.igd-cta { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 10px; border-top: 1px solid #DBDBDB; font-size: 13px; font-weight: 650; color: #000; background: #F7F7F7; transition: background .15s; }
.igd-cta.is-link { color: #0095F6; }
.igd-cta.is-press { background: #DADADA; }
.igd-label { align-self: center; margin: 6px 0 2px; font-size: 11px; color: #8E8E8E; font-weight: 600; }
.igd-media { display: grid; place-items: center; width: 130px; height: 160px; border-radius: 16px; background: linear-gradient(150deg, #2A1E72, #6A4CFF 60%, #FF7A9A); color: #fff; font-size: 26px; animation: igIn .35s ease-out; }
.igd-play { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.25); font-size: 16px; }
.igd-row .ig-av-xs i:empty { display: block; width: 100%; height: 100%; }

/* the public reply under the comment */
.ig-reply { display: none; gap: 8px; margin-top: 8px; }
.ig-reply > div { min-width: 0; }
.ig-reply p { margin: 1px 0 0; font-size: 12.5px; }
.ph.has-reply.is-replied .ig-reply { display: flex; animation: igIn .35s ease-out; }

@media (max-width: 640px) {
    .rb-linkrow { grid-template-columns: 1fr; }
    .rb-btnfield input { width: 110px; }
}

/* ==========================================================================
   Rule builder v3 (2026-12-04): one screen, three panes. Left — the rule's
   path: its steps top to bottom on a coloured rail, the chosen one opens
   like a tab into the editor. Middle — that step's settings, messages
   written as Direct bubbles. Right — the customer's phone on a stage,
   shrunk to fit. On a wide window the workspace takes the rest of the
   screen and each pane scrolls on its own (JS sets the height).
   ========================================================================== */
.page:has(> .qs-wrap > .qs.is-fit) { padding-bottom: 16px; }
.qs-wrap { container: qs / inline-size; }
.qs { display: grid; grid-template-columns: clamp(248px, 26%, 290px) minmax(0, 1fr) clamp(264px, 29%, 340px); grid-template-rows: auto minmax(0, 1fr);
      border: 1px solid var(--border); border-radius: 26px; overflow: hidden; background: var(--surface); box-shadow: var(--sh-md); }

/* the bar */
.qs-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.qs-back { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--border); color: var(--text-2); transition: color var(--t-fast), border-color var(--t-fast); }
.qs-back:hover { color: var(--text); border-color: var(--border-2); }
.qs-back svg { transform: rotate(180deg); }
.qs-name { flex: 1; min-width: 120px; height: 38px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; outline: 0;
           font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--text); transition: border-color var(--t-fast), background var(--t-fast); }
.qs-name::placeholder { color: var(--text-3); font-weight: 600; }
.qs-name:hover { background: var(--surface-2); }
.qs-name:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-ring); }
.qs-title { flex: 1; padding-left: 4px; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.rbn-acc { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 4px 13px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 650; }
.rbn-acc .ig-av { width: 28px; height: 28px; font-size: 11px; }
.qs-live { display: inline-flex; align-items: center; gap: 9px; flex: none; margin-left: 6px; padding: 0 6px; font-size: 13px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.qs-top .btn { flex: none; }

/* left: the path */
.qs-main { container: qsmain / inline-size; display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 16px 0 16px 14px; overflow-y: auto; scrollbar-width: thin;
           background: var(--surface-2); box-shadow: inset -1px 0 0 var(--border); }
.qs-mode { display: flex; gap: 3px; margin-right: 14px; padding: 3px; border-radius: 13px; background: var(--surface-3); }
.qs-mode label { flex: 1; position: relative; cursor: pointer; }
.qs-mode input { position: absolute; opacity: 0; pointer-events: none; }
.qs-mode span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 6px; border-radius: 10px; font-size: 12.5px; font-weight: 650; color: var(--text-2); white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
.qs-mode label:hover span { color: var(--text); }
.qs-mode input:checked + span { background: var(--surface); color: var(--accent-text); box-shadow: var(--sh-sm); }
.qs-mode input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.qs-mode-hint { margin: -6px 14px 0 4px; font-size: 12px; line-height: 1.45; color: var(--text-2); }

.st-list { position: relative; display: flex; flex-direction: column; gap: 2px; }
.st-list::before { content: ""; position: absolute; left: 29px; top: 26px; bottom: 26px; width: 2px; border-radius: 2px;
                   background: linear-gradient(180deg, #E8930C, #0EA5E9 22%, #7C5CFF 45%, #EC4899 60%, #10B981 74%, #F97316 88%, #3B82F6); opacity: .45; }
.st { position: relative; display: flex; align-items: center; border-radius: 16px 0 0 16px; transition: background var(--t-fast); }
.st[hidden] { display: none; }
.st:hover:not(.is-sel) { background: rgba(255, 255, 255, .6); }
.st-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 8px 8px 8px 12px; border: 0; background: transparent; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.st-main:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 14px; }
.st-ic { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; font-style: normal;
         background: color-mix(in srgb, var(--nc) 15%, #fff); color: var(--nc); transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.st-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.st-tx b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.25; }
.st-tx small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-tx small.is-warn { color: var(--neg); font-weight: 600; }
.st-link { margin-right: 5px; color: var(--nc); font-weight: 700; }
.st-bad { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--surface-2); background: var(--neg); color: #fff; font-size: 10px; font-weight: 800; font-style: normal; }
.st.is-err .st-tx b { color: var(--neg); }

/* a public reply branches off the comment */
.st.is-sub { margin-left: 34px; }
.st.is-sub .st-ic { width: 30px; height: 30px; border-radius: 10px; }
.st.is-sub .st-ic::before { content: ""; position: absolute; right: 100%; bottom: 50%; width: 17px; height: 32px; border: 2px solid var(--border-2); border-top: 0; border-right: 0; border-bottom-left-radius: 12px; }

/* the chosen step opens into the editor like a tab */
.st.is-sel { background: var(--surface); box-shadow: -8px 8px 22px -16px rgba(30, 24, 80, .35); }
.st.is-sel::before, .st.is-sel::after { content: ""; position: absolute; right: 0; width: 16px; height: 16px; pointer-events: none; }
.st.is-sel::before { bottom: 100%; background: radial-gradient(circle at 0 0, transparent 15.5px, var(--surface) 16px); }
.st.is-sel::after { top: 100%; background: radial-gradient(circle at 0 100%, transparent 15.5px, var(--surface) 16px); }
.st.is-sel .st-ic { background: var(--nc); color: #fff; box-shadow: 0 8px 16px -8px var(--nc); }
.st.is-sel .st-bad { border-color: var(--surface); }

/* an optional step: a small switch; off — a dashed tile */
.st-sw { flex: none; position: relative; width: 32px; height: 19px; margin-right: 12px; padding: 0; border: 0; border-radius: 10px; background: var(--border-2); cursor: pointer; transition: background var(--t-fast); }
.st-sw i { position: absolute; top: 2.5px; left: 2.5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.st-sw[aria-checked="true"] { background: var(--nc); }
.st-sw[aria-checked="true"] i { transform: translateX(13px); }
.st-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st.is-off .st-ic { background: var(--surface-2); border: 1.5px dashed color-mix(in srgb, var(--nc) 55%, #fff); color: color-mix(in srgb, var(--nc) 70%, #fff); }
.st.is-off .st-tx b { color: var(--text-2); }
.st.is-off.is-sel .st-ic { background: var(--surface); }

/* the playhead: the step the phone is showing right now */
.st.is-live .st-ic::after { content: ""; position: absolute; inset: -5px; border-radius: 15px; border: 2px solid var(--nc); pointer-events: none; animation: stLive 1.3s ease-out infinite; }
.st.is-live.is-no .st-ic::after { border-color: var(--neg); }
.st.is-sub.is-live .st-ic::after { border-radius: 13px; }
/* a narrow path: tighter rows, the mode buttons lose their icons */
@container qsmain (max-width: 272px) {
    .qs-mode span { gap: 0; padding: 7px 4px; font-size: 12px; }
    .qs-mode svg { display: none; }
    .st-main { gap: 9px; }
    .st-sw { margin-right: 9px; }
}
/* a narrow stage: the replay button keeps only its icon */
@container qsview (max-width: 300px) {
    .qs .rb-try-row .btn { gap: 0; padding: 0 10px; font-size: 0; }
}
@keyframes stLive { 0% { opacity: .9; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.18); } }

.qs-sum { margin: auto 14px 0 0; padding: 13px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.qs-sum p { font-size: 12.5px; line-height: 1.55; }

/* middle: the editor */
.qs-ed { position: relative; min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; background: var(--surface); }
.ins-p { display: none; padding: 0 26px 24px; }
.ins-p.is-sel { display: block; animation: insIn .3s ease-out; }
.ins-p[hidden] { display: none !important; }
@keyframes insIn { from { opacity: 0; transform: translateY(6px); } }
.ins-hd { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 13px; margin: 0 -26px 18px; padding: 16px 18px 15px 26px; border-bottom: 1px solid var(--border);
          background: linear-gradient(90deg, color-mix(in srgb, var(--nc) 11%, #fff), #fff 72%); }
.ins-hd .st-ic { width: 42px; height: 42px; border-radius: 13px; background: var(--nc); color: #fff; box-shadow: 0 10px 20px -10px var(--nc); }
.ins-hd > div { flex: 1; min-width: 0; }
.ins-hd em { display: block; font-style: normal; font-size: 10.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--nc) 75%, #000); }
.ins-hd h2 { font-size: 18px; letter-spacing: -.01em; }
.ins-hd p { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.ins-nav { display: inline-flex; gap: 6px; }
.ins-arw { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-2); cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast); }
.ins-arw:hover:not(:disabled) { color: var(--text); border-color: var(--border-2); }
.ins-arw[data-nav="-1"] svg { transform: rotate(180deg); }
.ins-arw:disabled { opacity: .35; cursor: default; }
.qs-ed .rb-opts { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.qs-ed .rb-switchline { padding: 13px 14px; border-radius: 14px; background: var(--surface-2); }
.qs-ed .rb-switchline + div { margin-top: 14px; }
.qs-ed .rb-rule { margin-top: 0; }
.qs-ed .rb-minsel { margin-bottom: 10px; }

/* messages are written the way they arrive: as Direct bubbles */
.qs-ed .rb-msg { border: 1.5px solid transparent; border-radius: 22px 22px 22px 7px; background: #F1F0F6; transition: background var(--t-fast), border-color var(--t-fast); }
.qs-ed .rb-msg:hover { background: #ECEBF3; }
.qs-ed .rb-msg:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.qs-ed .rb-msg.is-err { border-color: var(--neg); }
.qs-ed .rb-msg .textarea { min-height: 118px; padding: 14px 16px 8px; background: transparent; font-size: 14.5px; }
.qs-ed .rb-msg-bar { padding: 8px 10px 9px 12px; border-top: 1px dashed rgba(20, 20, 50, .12); background: transparent; }
.qs-ed .textarea[name="remind_text"], .qs-ed .textarea[name="follow_up_text"] { min-height: 84px; border-radius: 22px 22px 22px 7px; background: #F1F0F6; border-color: transparent; }
.qs-ed .textarea[name="remind_text"]:focus, .qs-ed .textarea[name="follow_up_text"]:focus { background: #fff; border-color: var(--accent); }
.ins-warn { position: sticky; bottom: 0; z-index: 3; margin: 0; padding: 11px 26px; border-top: 1px solid #F6DDBD; background: var(--warn-soft); }
.ins-warn[hidden] { display: none; }

/* right: the phone on its stage */
.qs-view { container: qsview / inline-size; display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; padding: 14px 16px 16px; border-left: 1px solid var(--border);
           background: radial-gradient(420px 360px at 50% 34%, rgba(124, 92, 255, .16), transparent 70%), radial-gradient(rgba(60, 50, 140, .09) 1px, transparent 1.4px) 0 0 / 18px 18px, #F8F7FD; }
.ph-fit { flex: 1; min-height: 0; display: grid; place-items: center; }
.qs .ph { --s: 1; transform: scale(var(--s)); transform-origin: center; margin: calc((var(--s) - 1) * 310px) calc((var(--s) - 1) * 150px); }
.qs .rb-try { flex: none; border-radius: 16px; box-shadow: var(--sh-sm); }

/* not wide enough for three panes (the workspace, not the window): stack them, the path becomes a strip */
@container qs (max-width: 879px) {
    .qs { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
    .qs-top { flex-wrap: wrap; }
    .qs-name, .qs-title { flex-basis: calc(100% - 60px); }
    .qs-acc { display: none; }
    .qs-live { margin-left: 0; margin-right: auto; padding-left: 0; }
    /* the path's parts join the stack: mode and steps on top, the short summary at the very end */
    .qs-main { display: contents; }
    .qs-mode { margin: 14px 14px 0; }
    .qs-mode-hint { margin: 8px 16px 0; }
    .st-list { flex-direction: row; gap: 8px; padding: 12px 14px 14px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
    .st-list::-webkit-scrollbar { display: none; }
    .st-list::before, .st.is-sel::before, .st.is-sel::after, .st.is-sub .st-ic::before { display: none; }
    .st { flex: none; width: 200px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
    .st.is-sub { margin-left: 0; }
    .st.is-sel { border-color: var(--nc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nc) 22%, transparent); }
    .qs-sum { order: 5; margin: 14px; }
    .qs-ed { overflow: visible; }
    .ins-hd { position: static; }
    .ins-warn { position: static; }
    .qs-view { border-left: 0; border-top: 1px solid var(--border); padding: 20px 14px; }
}
@media (max-width: 640px) {
    .qs { border-radius: 20px; }
    .qs-top { padding: 10px; }
    .qs-cancel { display: none; }
    .qs-top .btn-primary { margin-left: auto; }
    .ins-p { padding: 0 16px 18px; }
    .ins-hd { margin: 0 -16px 16px; padding: 14px 14px 14px 16px; }
    .ins-hd h2 { font-size: 16px; }
    .ins-warn { padding: 10px 16px; }
    .rb-opts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .st.is-live .st-ic::after { animation: none; }
}

/* ChatBot tabs: Qoidalar | Tarix (the old Hodisalar page), the account switch on the same row — 2026-12-04 */
.cb-bar { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cb-bar .tabs { margin-bottom: 0; }
.cb-tabs .tab { text-decoration: none; }
.cb-acc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.cb-hist .card-hd { flex-wrap: wrap; row-gap: 10px; }
.cb-hist .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cb-hist .seg::-webkit-scrollbar { display: none; }
@media (max-width: 640px) { .cb-acc { margin-left: 0; } }

/* Rules list as campaign cards, the commenters list — 2026-11-29 */
.rl-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; padding: 10px 20px; border-top: 1px solid var(--border); background: var(--warn-soft); color: var(--warn); font-size: 12.5px; }
.rl-sub.is-ok { background: var(--pos-soft); color: #075E3A; }
.rl-sub > span { flex: 1; min-width: 200px; }
.rl-inline { display: inline; margin: 0; }
.rl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; padding: 16px; }
.rl-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-xs); }
.rl-card.is-off { opacity: .66; }
.rl-hd { display: flex; align-items: center; gap: 10px; }
.rl-name { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-toggle { margin: 0; }
.rl-toggle .switch { border: 0; background: none; padding: 0; cursor: pointer; }
.rl-toggle .switch input { pointer-events: none; }
.rl-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.rl-tag { padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.rl-tag.is-kw { background: var(--accent-soft); color: var(--accent-text); }
.rl-tag.is-f { background: var(--pos-soft); color: var(--pos); }
.rl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rl-stats > div { padding: 9px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; }
.rl-stats b { font-family: var(--font-display); font-size: 19px; }
.rl-stats span { font-size: 11.5px; color: var(--text-3); }
.rl-stat-wide { grid-column: span 2; justify-content: center; }
.rl-msg { font-size: 12.5px !important; color: var(--text-2) !important; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rl-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rl-act .js-del { margin-left: auto; }
.rl-leads-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.rl-leads-hd h1 { font-size: 24px; }
.rl-stats-top { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
@media (max-width: 640px) { .rl-grid { grid-template-columns: 1fr; padding: 12px; } .rl-stats-top { grid-template-columns: repeat(2, 1fr); width: 100%; } }

/* ==========================================================================
   Admin panel (admin/index.php) — 2026-11-29: sections on the left, one at a
   time; the health list with a fix beside each line.
   ========================================================================== */
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.adm-head h1 { font-size: 26px; }
.adm-head p { margin-top: 4px; color: var(--text-2); font-size: 14px; }
.adm-kpis { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-kpis > div { min-width: 104px; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-xs); }
.adm-kpis b { display: block; font-family: var(--font-display); font-size: 18px; }
.adm-kpis span { font-size: 11.5px; color: var(--text-3); }
.adm-body { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; }
.adm-nav { position: sticky; top: calc(var(--topbar-h) + 14px); display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-xs); }
.adm-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.adm-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.adm-nav a.is-on { background: var(--accent-soft); color: var(--accent-text); }
.adm-nav a span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-nav a .adm-nb { flex: none; overflow: visible; }
.adm-nb { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 750; background: var(--warn-soft); color: var(--warn); }
.adm-nb.is-bad { background: var(--neg-soft); color: var(--neg); }
.adm-nb.is-muted { background: var(--surface-3); color: var(--text-3); }
.adm-main { min-width: 0; }
.adm-sec + .adm-sec { margin-top: 28px; }
.adm.is-js .adm-sec + .adm-sec { margin-top: 0; }
.adm-sec-hd { margin-bottom: 14px; }
.adm-sec-hd h2 { font-size: 20px; }
.adm-sec-hd p { margin-top: 4px; font-size: 13.5px; color: var(--text-2); line-height: 1.55; max-width: 760px; }
.adm-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 22px 0 10px; font-size: 15px; }
.adm-sub span { font-size: 12px; font-weight: 500; color: var(--text-3); }

.adm-health { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-xs); overflow: hidden; }
.adm-h { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 16px; border-top: 1px solid var(--border); }
.adm-h:first-child { border-top: 0; }
.adm-h-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.adm-h.is-ok .adm-h-ic { background: var(--pos-soft); color: var(--pos); }
.adm-h.is-warn .adm-h-ic { background: var(--warn-soft); color: var(--warn); }
.adm-h.is-bad .adm-h-ic { background: var(--neg-soft); color: var(--neg); }
.adm-h.is-bad { background: #FFF8F7; }
.adm-h-tx b { font-size: 14px; }
.adm-h-tx p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.adm-h-act form { margin: 0; }
.adm-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.adm-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.adm-stat { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.adm-stat span { font-size: 11.5px; font-weight: 650; color: var(--text-3); }
.adm-stat b { font-family: var(--font-display); font-size: 20px; }
.adm-stat .adm-stat-sm { font-size: 14px; }
.adm-stat small { font-size: 11.5px; color: var(--text-3); }

.adm-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.adm-tools-in { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.adm-tools form { margin: 0; }
.adm-search { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 380px; height: 38px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); color: var(--text-3); }
.adm-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 14px; background: transparent; color: var(--text); }
.adm-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.adm-table td { vertical-align: middle; }
.adm-acts { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.adm-more { position: relative; display: inline-block; text-align: left; }
.adm-more > summary { list-style: none; }
.adm-more > summary::-webkit-details-marker { display: none; }
.adm-more[open] > summary { background: var(--accent-soft); border-color: #CFC4FF; color: var(--accent-text); }
.adm-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 380px; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-lg); }
.adm-pop-f { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.adm-pop-f + .adm-pop-f { padding-top: 10px; border-top: 1px solid var(--border); }
.adm-pop-f b { font-size: 13px; }
.adm-pop-f small { font-size: 11.5px; color: var(--text-3); }
.adm-row { display: flex; gap: 6px; }
.adm-row .input, .adm-row .select, .adm-pop-f > .select { height: 34px; font-size: 13px; padding: 0 9px; }
.adm-row .input { min-width: 0; flex: 1; }
.adm-row .select { width: auto; }
.adm-sec .card > .table-wrap { overflow: visible; }

.adm-src { padding: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.adm-src p { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.5; flex: 1; }
.adm-src-hd { display: flex; align-items: center; gap: 8px; width: 100%; }
.adm-src-hd b { flex: 1; font-size: 14px; }
.adm-src-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); }
.adm-fold { margin-top: 12px; }
.adm-fold > summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; list-style: none; font-size: 13.5px; }
.adm-fold > summary::-webkit-details-marker { display: none; }
.adm-fold > summary .t-faint { margin-left: auto; }

.adm-niches { display: flex; flex-direction: column; }
.ns-group { border-top: 1px solid var(--border); }
.ns-group:first-child { border-top: 0; }
.ns-group > summary { display: flex; align-items: center; gap: 10px; padding: 11px 16px; cursor: pointer; list-style: none; font-size: 13.5px; }
.ns-group > summary::-webkit-details-marker { display: none; }
.ns-group > summary .t-faint { flex: 1; }
.ns-group[open] > summary .air-chev svg { transform: rotate(180deg); }
.ns-group > .ns-chips, .ns-group > .input { margin: 0 16px 12px; width: calc(100% - 32px); }
.ns-group > .input { height: 34px; font-size: 13px; }
.ns-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ns-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; text-decoration: none; border: 1px solid var(--border); color: var(--text-2); }
.ns-chip:hover { text-decoration: none; }
.ns-chip b { font-weight: 600; }
.ns-ok { background: var(--pos-soft); color: var(--pos); border-color: transparent; }
.ns-low { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.ns-bad { background: var(--neg-soft); color: var(--neg); border-color: transparent; text-decoration: line-through; opacity: .75; }
.ns-new { color: var(--text); opacity: .6; }

.adm-aip { padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.adm-lbl { margin-top: 8px; font-size: 12px; font-weight: 650; color: var(--text-2); }
.adm-aip .input { height: 36px; font-size: 13px; }
.adm-aip-ft { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.adm-ai-common { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-top: 12px; padding: 14px; }
.adm-ai-ed { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 650; color: var(--text-2); }
.adm-ai-ed .select { width: 200px; height: 36px; }
.adm-ai-common .rb-switchline { flex: 1; min-width: 240px; align-items: center; }

.adm-list { display: flex; flex-direction: column; }
.adm-li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); margin: 0; }
.adm-li:first-child { border-top: 0; }
.adm-li .rb-switchline { align-items: center; gap: 8px; }
.adm-cron { justify-content: flex-start; }
.adm-cron > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-cron code { font-size: 12px; background: var(--surface-3); padding: 3px 7px; border-radius: 6px; overflow-wrap: anywhere; align-self: flex-start; }
.adm-cron small { font-size: 12px; color: var(--text-3); }
.adm-cron-w { flex: none; width: 112px; font-size: 12px; font-weight: 700; color: var(--accent-text); }
.adm-log { margin: 0; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; white-space: pre-wrap; }
.adm-envs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-env { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--pos); }
.adm-env span { flex: 1; color: var(--text); }
.adm-env code { font-size: 11px; color: var(--text-3); }
.adm-env.is-no { color: var(--warn); }

@media (max-width: 1100px) { .adm-grid3 { grid-template-columns: 1fr; } .adm-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .adm-body { grid-template-columns: 1fr; gap: 14px; }
    .adm-nav { position: static; flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: none; }
    .adm-nav::-webkit-scrollbar { display: none; }
    .adm-nav a { flex: none; padding: 8px 10px; }
    .adm-h { grid-template-columns: 28px minmax(0, 1fr); }
    .adm-h-act { grid-column: 2; }
    .adm-sec .card > .table-wrap { overflow-x: auto; }
    .adm-pop { position: static; width: auto; min-width: 280px; margin-top: 6px; box-shadow: none; }
    .adm-envs { grid-template-columns: 1fr; }
    .adm-cron { flex-wrap: wrap; }
    .adm-cron-w { width: 100%; }
}

/* ---------- Outlier score, free tip, invite card (2026-11-29) ---------- */
.mult { display: inline-flex; align-items: center; gap: 3px; height: 21px; padding: 0 7px; border-radius: 999px;
    font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.mult-hi  { background: var(--pos-soft); color: var(--pos); }
.mult-up  { background: var(--pos-soft); color: var(--pos); opacity: .85; }
.mult-low { background: transparent; color: var(--text-3); }
.post-cell .mult { flex: none; }
.advice-free { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 11.5px; font-weight: 600;
    color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; }
.ref-link { display: flex; gap: 8px; align-items: center; }
.ref-link .input { flex: 1; min-width: 0; font-size: 13px; }
.advice-more { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2);
    color: var(--text-2); font-size: 12.5px; line-height: 1.45; text-decoration: none; }
.advice-more:hover { color: var(--accent); }
.advice-more svg { flex: none; margin-top: 2px; color: var(--accent); }

/* ==========================================================================
   Report v4 (2026-11-30) — big numbers first, words on demand.
   Four tiles a reader takes in at a glance, two large charts under them,
   everything else in tabs; explanations live behind the "?" hints.
   ========================================================================== */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
    position: relative; min-width: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 20px 22px 18px; box-shadow: var(--sh-card);
}
.stat-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stat-ic { display: inline-grid; place-items: center; flex: none; color: var(--text-3); }
.stat-label { font-size: 15px; font-weight: 650; color: var(--text); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-val {
    margin-top: 16px; font-family: var(--font-display); font-size: 40px; font-weight: 700;
    letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.stat-sub { margin-top: 12px; min-height: 22px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 14.5px; line-height: 1.35; color: var(--text-3); }
.stat-note { color: var(--text-2); font-weight: 500; }
.stat-note b { color: var(--text); font-weight: 650; }
.stat-sub .badge { font-size: 12.5px; }

.trend { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-variant-numeric: tabular-nums; }
.trend svg { flex: none; }
.trend-pos  { color: var(--pos); }
.trend-neg  { color: var(--neg); }
.trend-flat { color: var(--text-3); }
.card-hd .trend { font-size: 14.5px; }

.chart-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.chart-duo .card-hd h3, .chart-one .card-hd h3 { font-size: 16px; }
.chart-duo .card-bd { padding: 16px 18px 12px; }

.rep-head-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; flex-wrap: wrap; }
.rep-head .avatar-lg { width: 56px; height: 56px; font-size: 21px; }
.rep-id { flex: 1 1 220px; min-width: 0; }
.rep-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-name h2 { font-size: 20px; margin: 0; }
.rep-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13.5px; color: var(--text-2); }
.rep-meta b { color: var(--text); font-weight: 650; }
.rep-bio { margin-top: 6px; max-width: 64ch; font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rep-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-range { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; font-size: 13px; color: var(--text-2); white-space: nowrap; cursor: help; }
.rep-range svg { color: var(--text-3); }
.rep-side { display: flex; align-items: center; gap: 14px; }
.rep-side .gauge-mini { text-align: center; }
.seg-lg a, .seg-lg button { padding: 7px 13px; font-size: 13.5px; }
.seg a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }

/* the window switch in one line */
.pbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; }
.pbar .seg { flex: none; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.pbar .seg::-webkit-scrollbar { display: none; }
.pbar .seg a.is-locked { opacity: .5; }
.pbar-select { height: 34px; width: auto; padding: 0 30px 0 12px; font-size: 13.5px; border-radius: 9px; }
.pbar-now { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.pbar-now svg { color: var(--text-3); }
.pbar-range { position: relative; }
.pbar-range > summary { list-style: none; cursor: pointer; }
.pbar-range > summary::-webkit-details-marker { display: none; }
.pbar-range[open] > summary { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.pbar-range .period-form {
    position: absolute; z-index: 25; top: calc(100% + 6px); left: 0; display: flex; align-items: center; gap: 8px;
    padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--sh-lg); white-space: nowrap;
}
.pbar-note { padding: 0 16px 12px; margin: 0; font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }

.sum-fold > summary h3 { font-size: 15px; }
.note-fold { margin-top: 16px; }

/* search on top of an open report: one line, nothing else */
.search-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; }
.search-bar .input-group { flex: 1 1 320px; }
.search-bar .try-group { flex: none; }
.credit-mini { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }

@media (max-width: 1240px) { .stat-val { font-size: 34px; } }
@media (max-width: 1024px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chart-duo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .stats { gap: 10px; }
    .stat { padding: 14px 14px 12px; border-radius: var(--r-md); }
    .stat-label { font-size: 13.5px; }
    .stat-val { font-size: 26px; margin-top: 10px; }
    .stat-sub { font-size: 12.5px; margin-top: 8px; min-height: 0; }
    .trend svg { width: 14px; height: 14px; }
    .rep-head-row { padding: 14px; gap: 12px; }
    .rep-tools { width: 100%; }
    .rep-tools .seg { width: 100%; }
    .rep-tools .seg a { flex: 1; text-align: center; padding-left: 6px; padding-right: 6px; }
    .rep-side { width: 100%; justify-content: space-between; }
    .pbar { padding: 12px; }
    .pbar-now { margin-left: 0; width: 100%; }
    .pbar-range .period-form { position: static; margin-top: 8px; flex-wrap: wrap; white-space: normal; box-shadow: none; }
    .search-bar .credit-mini { white-space: normal; }
}
.rep-head-pbar { border-top: 1px solid var(--border); }
.rep-meta a { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-text); }
.q-score { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 12px; background: var(--surface-2); cursor: help; }
.q-val { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.q-val span { font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: 0; margin-left: 1px; }
.chart-one .card-bd { padding: 16px 18px 12px; }
.mini-fold > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.mini-fold > summary::-webkit-details-marker { display: none; }
.pbar-range .period-form { width: max-content; flex-wrap: nowrap; }
@media (max-width: 640px) { .pbar-range .period-form { width: auto; flex-wrap: wrap; } }
.seg a, .seg button { white-space: nowrap; }
@media (max-width: 640px) {
    .pbar .seg-lg a { padding: 7px 11px; }
    .rep-head .rep-head-row { align-items: flex-start; }
}
@media (max-width: 640px) { .stat-label { white-space: normal; line-height: 1.25; } }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-text .stat-val { font-size: 30px; letter-spacing: -.025em; }
.split-cap { margin-bottom: 8px; font-size: 13.5px; color: var(--text-2); }
.split-cap b { color: var(--text); }
@media (max-width: 1024px) { .stats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stat-text .stat-val { font-size: 21px; white-space: normal; } }
.stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .stats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ==========================================================================
   Post / video cards (2026-11-30)
   ========================================================================== */
.vtools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.vtools .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.vtools .seg button { padding: 7px 13px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 5px; }
.vtools .seg button:disabled { opacity: .45; cursor: default; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 16px; }
.vgrid[hidden], .vcard[hidden] { display: none; }
.vcard { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-card); transition: box-shadow var(--t-fast), transform var(--t-fast); }
.vcard:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.vthumb { position: relative; aspect-ratio: 4 / 5; background: var(--navy-2); overflow: hidden; }
.vthumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10,12,28,.38) 0%, rgba(10,12,28,0) 26%, rgba(10,12,28,0) 58%, rgba(10,12,28,.72) 100%); }
.vthumb-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.45); background: var(--brand-grad); opacity: .55; }
.vcover-link { position: absolute; inset: 0; z-index: 1; }
.vplay {
    position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center; padding-left: 3px;
    background: rgba(255,255,255,.92); color: var(--navy); box-shadow: 0 6px 20px rgba(0,0,0,.28);
    transition: transform var(--t-fast), background var(--t-fast);
}
.vplay:hover { transform: translate(-50%, -50%) scale(1.08); background: #fff; }
.vthumb .vplay::before { content: ""; position: absolute; inset: -60vh -60vw; }
.vbadge, .vmult, .vopen, .vbig { position: absolute; z-index: 3; }
.vbadge { top: 10px; left: 10px; height: 22px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 650; color: #fff; background: rgba(15,17,36,.68); }
.vmult { top: 10px; right: 42px; height: 22px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 750; color: #fff; background: var(--pos); }
.vopen { top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: rgba(15,17,36,.6); }
.vopen:hover { background: rgba(15,17,36,.7); color: #fff; }
.vbig { left: 12px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.vthumb > video { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; object-fit: contain; background: #000; }
.vthumb.is-playing .vplay, .vthumb.is-playing .vbig, .vthumb.is-playing .vmult, .vthumb.is-playing .vbadge, .vthumb.is-playing::after { display: none; }
.vfail { display: none; position: absolute; inset: 0; z-index: 6; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center; color: #fff; font-size: 13px; background: rgba(15,17,36,.82); }
.vfail a { color: #fff; font-weight: 650; text-decoration: underline; }
.vthumb.is-failed .vfail { display: flex; }
.vbody { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; }
.vcap { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.vstats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); }
.vstats span { display: inline-flex; align-items: center; gap: 4px; }
.vstats svg { color: var(--text-3); }
.vmeta { font-size: 12.5px; color: var(--text-3); line-height: 1.4; }
.vact { margin-top: auto; }
.vact .btn { width: 100%; justify-content: center; }
.vmore { display: flex; justify-content: center; margin-top: 16px; }
.vmore[hidden] { display: none; }
@media (max-width: 640px) {
    .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .vbody { padding: 10px; gap: 6px; }
    .vcap { font-size: 12.5px; }
    .vstats { font-size: 12.5px; gap: 3px 9px; }
    .vbig { font-size: 17px; left: 9px; bottom: 8px; }
    .vplay { width: 44px; height: 44px; }
    .vmult { right: 40px; }
}
.vstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 10px; }

/* ---- in-page player window (2026-11-30) ---- */
.vplay-photo { background: transparent; box-shadow: none; color: transparent; }
.vplay-photo:hover { background: transparent; }
.vplay-photo svg { display: none; }
.vthumb .vplay { cursor: pointer; }
html.vmodal-open { overflow: hidden; }
.vmodal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(8, 10, 24, .82); backdrop-filter: blur(4px); animation: fadeUp var(--t) both; }
.vmodal[hidden] { display: none; }
.vmodal-box { position: relative; display: flex; flex-direction: column; width: min(440px, 100%); max-height: calc(100vh - 40px); background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.vmodal-media { position: relative; flex: none; background: #000; display: flex; align-items: center; justify-content: center; height: min(70vh, 640px); }
.vmodal-media video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.vmodal-media.is-embed { background: #fff; }
.vmodal-media iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.vmodal-none { color: #fff; font-size: 14px; padding: 24px; text-align: center; }
.vmodal-ft { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.vmodal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vmodal-big { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.vmodal-big svg { color: var(--text-3); }
.vmodal-cap { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text); white-space: pre-line; max-height: 4.4em; overflow: hidden; }
.vmodal-stats { grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px 16px; }
.vmodal-x { position: absolute; z-index: 3; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; font-size: 24px; line-height: 1; color: #fff; background: rgba(15,17,36,.6); backdrop-filter: blur(6px); }
.vmodal-x:hover { background: rgba(15,17,36,.85); }
.vmodal-nav { position: fixed; z-index: 201; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; font-size: 34px; line-height: 1; color: #fff; background: rgba(255,255,255,.14); }
.vmodal-nav:hover { background: rgba(255,255,255,.26); }
.vmodal-nav[hidden] { display: none; }
.vmodal-prev { left: max(16px, calc(50% - 300px)); }
.vmodal-next { right: max(16px, calc(50% - 300px)); }
@media (max-width: 640px) {
    .vmodal { padding: 0; place-items: stretch; }
    .vmodal-box { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
    .vmodal-media { height: auto; flex: 1 1 auto; min-height: 0; }
    .vmodal-ft { flex: none; max-height: 34vh; }
    .vmodal-nav { top: auto; bottom: calc(34vh + 12px); transform: none; width: 40px; height: 40px; font-size: 28px; background: rgba(15,17,36,.5); }
    .vmodal-prev { left: 10px; }
    .vmodal-next { right: 10px; }
}
.vmodal-x { position: fixed; top: 16px; right: 16px; z-index: 202; width: 42px; height: 42px; font-size: 28px; background: rgba(255,255,255,.14); }
.vmodal-x:hover { background: rgba(255,255,255,.28); }
@media (max-width: 640px) {
    .vmodal { padding-top: 56px; }
    .vmodal-box { height: calc(100% - 0px); }
    .vmodal-x { top: 8px; right: 8px; width: 40px; height: 40px; }
}

/* ---- AI yordamchi, quieter (2026-11-30) ---- */
.ai-submit-hint { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.ai-submit-hint .hint { margin-left: 0; }
.ai-submit-hint .hint-pop { right: auto; left: 50%; transform: translate(-50%, -3px); }
.ai-submit-hint .hint:hover .hint-pop, .ai-submit-hint .hint:focus .hint-pop { transform: translate(-50%, 0); }
.air-sec .hint { margin-left: 6px; }
.air-vids-hd .hint { margin-left: 6px; }
.air-vid-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ais-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--accent-text); }
.ais-more > summary::-webkit-details-marker { display: none; }
.air-summary p { font-size: 16px; line-height: 1.5; }
.air-box li span { line-height: 1.45; }
@media (max-width: 640px) { .air-vid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ai-mode-text b { font-size: 15.5px; }
.ai-mode { align-items: center; }
.ai-head-main h1 { margin: 0; }

/* ---- Trendlar: "Yo'nalishingiz qanaqa?" (2026-11-30) ---- */
.tr-ask { margin-bottom: 18px; }
.tr-ask-bd, .tr-ask-run { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 44px 24px 32px; }
.tr-ask-bd[hidden], .tr-ask-run[hidden] { display: none; }
.tr-ask-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(124,92,255,.7); }
.tr-ask h2 { font-size: 26px; margin: 6px 0 0; }
.tr-ask p { margin: 0; color: var(--text-2); font-size: 15px; max-width: 52ch; }
.tr-ask-form { display: flex; gap: 10px; width: min(620px, 100%); margin-top: 10px; }
.tr-ask-form .input { flex: 1; min-width: 0; height: 52px; font-size: 16px; padding: 0 16px; border-radius: 14px; }
.tr-ask-form .btn { height: 52px; border-radius: 14px; padding: 0 22px; }
.tr-ask-ex { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 640px; }
.tr-ask-err { color: var(--neg); font-size: 14px; }
.tr-ask-foot { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-top: 8px; font-size: 13.5px; }
.tr-ask .alert { width: min(620px, 100%); text-align: left; }
.tr-ask-run .ai-steps { text-align: left; margin-top: 8px; }
.tr-me-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; font-size: 15px; color: var(--text-2); }
.tr-me-line b { color: var(--text); }
.tr-me-line > svg { color: var(--accent); }
.tr-insight { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; margin-bottom: 18px; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); }
.tr-insight-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-grad); color: #fff; }
.tr-insight b { font-size: 15px; }
.tr-insight ul { margin: 6px 0 0; padding-left: 18px; color: var(--text); font-size: 14px; line-height: 1.55; }
.tr-why { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; padding: 7px 9px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 550; line-height: 1.4; }
.tr-why svg { flex: none; margin-top: 2px; }
@media (max-width: 640px) {
    .tr-ask-bd, .tr-ask-run { padding: 30px 16px 24px; }
    .tr-ask h2 { font-size: 22px; }
    .tr-ask-form { flex-direction: column; }
    .tr-ask-form .btn { width: 100%; justify-content: center; }
}
.tr-th { position: relative; }
.tr-play { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; padding-left: 3px; background: rgba(255,255,255,.92); color: var(--navy); box-shadow: 0 6px 20px rgba(0,0,0,.28); transition: transform var(--t-fast); pointer-events: none; }
.tr-th:hover .tr-play { transform: translate(-50%, -50%) scale(1.08); }
@media (max-width: 640px) { .tr-ask-form .input { flex: none; width: 100%; height: 50px; } }

/* ==========================================================================
   Pinterest ideas, in our style (2026-11-30): mini charts, the posts behind a
   number, the chart bubble, the formats bar, niche tiles.
   ========================================================================== */
.stat-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 16px; min-width: 0; }
.stat-main .stat-val { margin-top: 0; min-width: 0; }
.spark { flex: none; width: 96px; height: 34px; margin-bottom: 4px; overflow: visible; }
.stat-sub .mini-posts { flex-basis: 100%; }
.mini-posts { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.mini-th { position: relative; width: 34px; height: 44px; border-radius: 8px; overflow: hidden; flex: none; background: var(--brand-grad); box-shadow: 0 0 0 1px var(--border); transition: transform var(--t-fast); }
.mini-th:hover { transform: translateY(-2px); }
.mini-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini-th em { position: absolute; left: 3px; bottom: 2px; z-index: 1; font-style: normal; font-size: 10px; font-weight: 750; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.mini-posts small { margin-left: 4px; font-size: 12.5px; color: var(--text-3); line-height: 1.3; }
.mini-posts small b { color: var(--text); }

.ctip { position: fixed; z-index: 120; left: 0; top: 0; transform: translate(-50%, calc(-100% - 14px)); pointer-events: none;
    display: flex; flex-direction: column; gap: 1px; padding: 7px 11px; border-radius: 10px; background: var(--navy); color: #fff;
    box-shadow: 0 8px 22px -8px rgba(15,17,36,.55); opacity: 0; visibility: hidden; transition: opacity 90ms; white-space: nowrap; }
.ctip.on { opacity: 1; visibility: visible; }
.ctip span { font-size: 11.5px; opacity: .72; }
.ctip b { font-family: var(--font-display); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ctip-hit { cursor: crosshair; }

.fmt { display: flex; flex-direction: column; gap: 14px; }
.fmt-bar { display: flex; gap: 4px; height: 10px; }
.fmt-bar i { display: block; height: 100%; border-radius: 5px; min-width: 4px; }
.fmt-rows { list-style: none; margin: 0; padding: 0; }
.fmt-rows li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 48px; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.fmt-rows li:first-child { border-top: 0; }
.fmt-rows li > i { width: 10px; height: 10px; border-radius: 50%; }
.fmt-name { font-weight: 600; min-width: 0; }
.fmt-name small { display: block; font-weight: 400; font-size: 12.5px; color: var(--text-3); }
.fmt-rows b { font-size: 15px; }
.fmt-pct { text-align: right; color: var(--text-2); font-weight: 600; font-size: 13.5px; }

.tr-ask-or { font-size: 13.5px; color: var(--text-3); margin-top: 6px; }
.tr-ask-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; width: min(760px, 100%); }
.tr-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 12px 8px;
    border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); cursor: pointer;
    font: 600 12.5px/1.25 var(--font-body); text-align: center; transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.tr-tile svg { color: var(--accent); }
.tr-tile:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); transform: translateY(-1px); }
.tr-tile.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
@media (max-width: 640px) {
    .spark { width: 72px; height: 28px; }
    .stat-main { margin-top: 10px; }
    .tr-ask-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .tr-tile { min-height: 80px; font-size: 11.5px; }
}
.stat-spark { margin-left: auto; display: inline-flex; align-items: flex-end; }
.stat-spark .spark { width: 88px; height: 30px; margin: 0; }
.stat-sub:has(.stat-spark) { min-height: 30px; }
@media (max-width: 640px) { .stat-spark .spark { width: 64px; height: 24px; } }
.tr-ask-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tr-tile-own { border-style: dashed; background: var(--surface); }
@media (max-width: 640px) { .tr-ask-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tr-tile { min-height: 76px; padding: 10px 4px; font-size: 11px; } }
@media (max-width: 640px) { .stat-top { gap: 6px; } .stat-label { font-size: 12.5px; } }

/* Trendlar: one search bar in place of the niche chips (v=45) */
.tr-search .search-bar { padding: 10px 12px; }
.tr-search .input-group { flex: 1 1 100%; }
.tr-search .tr-ask-err { margin: 0; padding: 0 14px 12px; }

/* ---------- Language picker (UZ / RU / EN) ---------- */
.lang-menu { position: relative; flex: none; }
.lang-menu > summary {
    list-style: none; display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 10px; border-radius: 9px; cursor: pointer; user-select: none;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
    font-size: 12.5px; font-weight: 650; letter-spacing: .02em;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover, .lang-menu[open] > summary { color: var(--text); border-color: var(--border-2); }
.lang-pop {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 80; min-width: 150px;
    display: flex; flex-direction: column; padding: 5px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 14px 34px -14px rgba(15, 17, 36, .28);
}
.lang-pop a { padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text); }
.lang-pop a:hover { background: var(--surface-2); text-decoration: none; }
.lang-pop a.is-on { color: var(--accent); font-weight: 650; background: var(--accent-soft); }
.lang-row { display: inline-flex; gap: 2px; }
.lang-row a { padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 650; color: inherit; opacity: .65; }
.lang-row a:hover { opacity: 1; text-decoration: none; }
.lang-row a.is-on { opacity: 1; background: rgba(127, 127, 160, .14); }
@media (max-width: 560px) {
    .lang-menu > summary { height: 30px; padding: 0 8px; }
    .lang-menu > summary svg { display: none; }
}

/* ==========================================================================
   Tahlil (tahlil.php) and AI xotirasi (xotira.php) — 2026-12-01
   ========================================================================== */
.th-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.th-top-t { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.th-top h1 { font-size: 24px; margin: 0; }
.th-top-meta { font-size: 13px; color: var(--text-3); }
.th-top-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.th-acc { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--text); }
.th-acc svg { color: var(--text-3); flex: none; }
.th-acc select { border: 0; background: transparent; font: inherit; color: inherit; padding: 0 2px; cursor: pointer; max-width: 200px; }
.th-acc select:focus { outline: none; }
.th-rebuild .t-faint { font-weight: 500; margin-left: 4px; }

.th-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.th-tab { height: 34px; padding: 0 15px; border-radius: 999px; border: 1px solid transparent; background: var(--surface-3); color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; transition: background var(--t-fast), color var(--t-fast); }
.th-tab:hover { color: var(--text); text-decoration: none; }
.th-tab.is-on { background: var(--navy); color: #fff; }
.th-about { margin: 0 0 14px; font-size: 13.5px; color: var(--text-2); }
.th-note { display: flex; align-items: center; gap: 7px; margin: 0 0 14px; font-size: 13px; color: var(--text-2); }
.th-note svg { color: var(--warn); flex: none; }

.th-split { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 18px; align-items: start; }
.th-list { display: flex; flex-direction: column; gap: 2px; }
.th-row { display: grid; grid-template-columns: minmax(0, 1fr) 128px 54px; align-items: center; gap: 14px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; font: inherit; color: var(--text); cursor: pointer; transition: background var(--t-fast); }
.th-row:hover { background: var(--surface-2); }
.th-row.is-on { background: var(--surface); box-shadow: var(--sh-sm); }
.th-row-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.th-row-t b { font-weight: 600; font-size: 14.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-row-t small { font-size: 12px; color: var(--text-3); }
.th-bar { position: relative; height: 8px; border-radius: 999px; background: var(--surface-3); }
.th-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--accent); }
.th-bar-mid i { background: #A898FF; }
.th-bar-low i { background: var(--border-2); }
.th-bar em, .th-legend em { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; border-radius: 2px; background: var(--navy); }
.th-x { text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.th-x-low { color: var(--text-3); font-weight: 600; }
.th-legend { position: relative; display: flex; align-items: center; gap: 8px; margin: 8px 12px 0; padding-left: 8px; font-size: 12px; color: var(--text-3); }
.th-legend em { position: static; display: inline-block; height: 13px; margin: 0; }
.th-few { margin: 12px 12px 0; font-size: 12.5px; line-height: 1.55; color: var(--text-3); }

.th-detail { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-card); }
.th-kick { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }
.th-pane h3 { margin: 0 0 12px; font-size: 20px; letter-spacing: -.01em; }
.th-notes { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.th-notes li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--text); }
.th-notes li svg { flex: none; margin-top: 3px; padding: 2px; width: 18px; height: 18px; border-radius: 6px; }
.th-notes .is-pos svg { color: var(--pos); background: var(--pos-soft); }
.th-notes .is-neg svg { color: var(--neg); background: var(--neg-soft); }
.th-vgrid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 12px; }
.th-vgrid .vthumb { aspect-ratio: 9 / 14; }
.th-vgrid .vbig { font-size: 17px; }
.th-vgrid .vcap { font-size: 12.5px; }
.th-vgrid .vstats { font-size: 12.5px; }
.vmult.is-mid { background: rgba(15,17,36,.6); }
.vmult.is-low { background: rgba(15,17,36,.45); color: rgba(255,255,255,.85); font-weight: 650; }

.th-formula { margin-top: 18px; }
.th-f-line { margin: 6px 0 8px; font-family: var(--font-display); font-size: 19px; line-height: 2.1; color: var(--text); }
.th-f-line b { font-weight: 700; }
.th-sel { font: inherit; font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--text); max-width: 100%; height: 38px; padding: 0 34px 0 12px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23525A70' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; cursor: pointer; vertical-align: middle; }
.th-sel:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.th-f-x { margin: 0 0 14px; font-size: 13px; color: var(--text-3); }
.th-f-act { display: flex; gap: 8px; flex-wrap: wrap; }
.th-f-out { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.th-foot { margin: 16px 2px 0; line-height: 1.6; }

.th-prog { margin-bottom: 18px; }
.th-prog-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.th-prog-hd b { display: block; font-family: var(--font-display); font-size: 15.5px; }
.th-prog-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-bottom: 10px; }
.th-prog-bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand-grad); transition: width .6s ease; }
.th-prog.is-fail .th-prog-hd { color: var(--neg); }
.th-prog.is-fail .th-prog-hd b { color: var(--text); }
.th-short { margin-top: 12px; }

.mem-scope { margin: 0; }
.mem-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.mem-grid h3 { margin: 0 0 4px; font-size: 17px; }
.mem-note .textarea { margin-top: 12px; min-height: 170px; }
.mem-note-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.mem-facts { margin: 14px 0 0; display: flex; flex-direction: column; gap: 12px; }
.mem-facts > div { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.mem-facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.mem-facts dt { font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 3px; }
.mem-facts dd { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.mem-list { margin-top: 16px; }
.mem-list h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; color: var(--text-2); }
.mem-list ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; line-height: 1.5; }
.mem-works h4 svg { color: var(--pos); }
.mem-avoid h4 svg { color: var(--neg); }

@media (max-width: 900px) {
    .th-split, .mem-grid { grid-template-columns: minmax(0, 1fr); }
    .th-detail { padding: 16px; }
}
@media (max-width: 640px) {
    .th-row { grid-template-columns: minmax(0, 1fr) 70px 46px; gap: 10px; padding: 10px; }
    .th-vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .th-f-line { font-size: 16px; line-height: 2.2; }
    .th-sel { font-size: 14px; }
    .th-top h1 { font-size: 21px; }
}
.mem-facts dd ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }

/* Reel hold estimate (ig_hold_estimate): four bars + a word; an estimate, so "≈". */
.vhold { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: help; white-space: nowrap; }
.vhold b { font-weight: 700; color: var(--text); }
.vhold-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.vhold-bars i { width: 3px; border-radius: 1px; background: var(--border-strong, rgba(127,127,127,.35)); }
.vhold-bars i:nth-child(1) { height: 4px; } .vhold-bars i:nth-child(2) { height: 7px; }
.vhold-bars i:nth-child(3) { height: 10px; } .vhold-bars i:nth-child(4) { height: 12px; }
.vhold-3 .vhold-bars i.on, .vhold-2 .vhold-bars i.on { background: var(--pos); }
.vhold-1 .vhold-bars i.on { background: var(--text-3); }
.vhold-0 .vhold-bars i.on { background: var(--warn, #d97706); }
.vhold-3 b { color: var(--pos); }

/* ==========================================================================
   The helper: the chat window the corner character opens, its button in a
   phone's top bar, and the first-visit tour (assets/js/support.js).
   ========================================================================== */
.sup-top { display: none; width: 38px; height: 38px; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; place-items: center; flex: none; }
.sup-top .ai-orb { --s: 32px; }
@media (max-width: 900px) { .sup-top { display: grid; } }
.sup-open .orb-fab-tip { display: none; }

.sup {
    position: fixed; right: 22px; bottom: 98px; z-index: 130; width: 380px; max-width: calc(100vw - 24px);
    height: min(580px, calc(100vh - 124px)); display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
    box-shadow: 0 24px 60px -18px rgba(20, 19, 43, .38), 0 2px 8px rgba(20, 19, 43, .08);
    animation: sup-in .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes sup-in { from { opacity: 0; translate: 0 10px; scale: .98; } }
.sup-hd { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--accent-soft), var(--surface)); }
.sup-hd .ai-orb { --s: 42px; }
.sup-hd-t { display: flex; flex-direction: column; min-width: 0; }
.sup-hd-t b { font-family: var(--font-display); font-size: 15px; letter-spacing: -.01em; }
.sup-hd-t span { font-size: 12.5px; color: var(--text-2); }
.sup-x { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font-size: 24px; line-height: 1; cursor: pointer; }
.sup-x:hover, .sup-x:focus-visible { background: var(--surface-2); color: var(--text); }
.sup-log { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.sup-msg { display: flex; }
.sup-msg.is-user { justify-content: flex-end; }
.sup-b { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.sup-msg.is-bot .sup-b { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 5px; }
.sup-msg.is-user .sup-b { background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.sup-msg.is-err .sup-b { background: #FFF6F5; color: #8F1D16; }
.sup-b a { color: inherit; text-decoration: underline; }
.sup-go { display: inline-block; margin-top: 8px; padding: 6px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--accent) !important; text-decoration: none !important; }
.sup-go:hover { border-color: var(--accent); }
.sup-typing { display: inline-flex; gap: 4px; align-items: center; padding: 12px 14px; }
.sup-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: sup-dot 1.1s infinite ease-in-out; }
.sup-typing i:nth-child(2) { animation-delay: .15s; } .sup-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes sup-dot { 0%, 60%, 100% { opacity: .35; translate: 0 0; } 30% { opacity: 1; translate: 0 -3px; } }
.sup-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 8px; }
.sup-chips button { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer; }
.sup-chips button:hover, .sup-chips button:focus-visible { border-color: var(--accent); color: var(--accent); }
.sup-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.sup-form textarea { flex: 1; min-width: 0; resize: none; max-height: 110px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 14px; line-height: 1.4; color: var(--text); }
.sup-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.sup-form button { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--accent); color: #fff; cursor: pointer; }
.sup-form button:hover, .sup-form button:focus-visible { filter: brightness(1.08); }
.sup-ft { display: flex; justify-content: space-between; gap: 10px; padding: 0 14px 10px; font-size: 12px; }
.sup-ft button, .sup-ft a { padding: 0; border: 0; background: none; font: inherit; color: var(--text-3); cursor: pointer; text-decoration: none; }
.sup-ft button:hover, .sup-ft a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 900px) {
    /* A phone: the window takes the screen (the top-bar button opened it). */
    .sup { inset: 0; width: auto; max-width: none; height: auto; border: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
    .sup-hd { padding-top: calc(12px + env(safe-area-inset-top)); }
    .sup-open body { overflow: hidden; }
}

/* The tour: a clear layer stops clicks, the "hole" lights one place by dimming all around it. */
.tour-shade { position: fixed; inset: 0; z-index: 300; }
.tour-hole {
    position: fixed; z-index: 301; border-radius: 14px; pointer-events: none;
    box-shadow: 0 0 0 200vmax rgba(9, 10, 26, .66), 0 0 0 2px rgba(255, 255, 255, .55), 0 0 26px 4px rgba(124, 92, 255, .55);
    transition: left .34s cubic-bezier(.4, 0, .2, 1), top .34s cubic-bezier(.4, 0, .2, 1), width .34s cubic-bezier(.4, 0, .2, 1), height .34s cubic-bezier(.4, 0, .2, 1);
}
.tour-card {
    position: fixed; z-index: 302; width: 360px; padding: 16px; border-radius: 16px;
    background: var(--surface); color: var(--text); box-shadow: 0 24px 60px -16px rgba(9, 10, 26, .55);
    transition: left .34s cubic-bezier(.4, 0, .2, 1), top .34s cubic-bezier(.4, 0, .2, 1);
}
.tour-top { display: flex; gap: 14px; align-items: flex-start; }
.tour-top .ai-orb { --s: 54px; }
.tour-title { display: block; font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
.tour-text { margin: 5px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.tour-bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.tour-dots { display: inline-flex; gap: 4px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-2, #D9D7E8); }
.tour-dots i.on { width: 16px; border-radius: 3px; background: var(--accent); }
.tour-btns { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.tour-skip { padding: 6px 8px; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--text-3); cursor: pointer; }
.tour-skip:hover, .tour-skip:focus-visible { color: var(--text); text-decoration: underline; }
.tour-on .orb-fab { z-index: 299; }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card, .sup { transition: none; animation: none; } }

/* ==========================================================================
   v4 "Studio" — the finishing layer (2026-12-01)
   The pages above were written against the tokens, so they took the new
   look by themselves; this adds what is new in v4 — the dark band of
   headline numbers, the overview's hero and bento — and brings the last
   square corners into line.
   ========================================================================== */

/* the drawer: credits with a meter */
.sb-credits {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px 8px;
    margin: 0 12px 10px; padding: 12px 14px 13px; border-radius: 18px;
    background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .72); font-size: 12.5px; font-weight: 600; text-decoration: none;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.sb-credits:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .14); }
.sb-credits span svg { color: #FFD479; }
.sb-credits b { font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; }
.sb-credits-bar { grid-column: 1 / -1; display: block; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.sb-credits-bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand-grad-h); box-shadow: 0 0 10px rgba(184, 77, 235, .8); }
.sb-credits.is-low { border-color: rgba(255, 170, 90, .45); }
.sb-credits.is-low .sb-credits-bar i { background: linear-gradient(90deg, #FFB347, #FF7A59); box-shadow: none; }

/* ---------- the band: a page's headline numbers on the night sky ---------- */
.stats.is-band {
    /* inside the band the tokens turn to their night values, so everything a
       tile can hold (trend, badge, mini chart, the posts behind a number) follows */
    --text: #fff; --text-2: rgba(255, 255, 255, .76); --text-3: rgba(255, 255, 255, .54);
    --accent: #C7B9FF; --accent-soft: rgba(255, 255, 255, .14); --accent-text: #fff;
    --pos: #5EEAA5; --pos-soft: rgba(94, 234, 165, .16);
    --neg: #FF9D96; --neg-soft: rgba(255, 157, 150, .16);
    --warn: #FFC37A; --warn-soft: rgba(255, 195, 122, .16);
    --surface-2: rgba(255, 255, 255, .10); --surface-3: rgba(255, 255, 255, .14); --border: rgba(255, 255, 255, .12);
    position: relative; isolation: isolate; gap: 0; padding: 8px; border-radius: 30px; color: #fff;
    background:
        radial-gradient(520px 280px at 4% 0%, rgba(124, 92, 255, .62), transparent 70%),
        radial-gradient(520px 300px at 100% 110%, rgba(255, 122, 154, .40), transparent 70%),
        radial-gradient(600px 260px at 56% 130%, rgba(184, 77, 235, .36), transparent 70%),
        linear-gradient(135deg, #171A40 0%, #0B0D20 100%);
    box-shadow: 0 34px 70px -34px rgba(30, 22, 100, .8), inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.stats.is-band::after {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 36px 36px;
    -webkit-mask-image: radial-gradient(60% 130% at 100% 0%, #000 0%, transparent 72%); mask-image: radial-gradient(60% 130% at 100% 0%, #000 0%, transparent 72%);
}
.stats.is-band > .stat { background: none; border: 0; box-shadow: none; border-radius: 23px; padding: 22px 24px 20px; transition: background var(--t); }
.stats.is-band > .stat:hover { background: rgba(255, 255, 255, .055); transform: none; box-shadow: none; }
.stats.is-band > .stat + .stat::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 1px; background: rgba(255, 255, 255, .11); }
.stats.is-band .stat-ic { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .11); color: #E4DCFF; }
.stats.is-band .stat-label { font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, .74); }
.stats.is-band .stat-val { margin-top: 18px; font-size: 46px; font-weight: 700; letter-spacing: -.05em; color: #fff; }
.stats.is-band .stat-sub { color: rgba(255, 255, 255, .6); }
.stats.is-band .stat-note { color: rgba(255, 255, 255, .72); }
.stats.is-band .hint { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .72); }
.stats.is-band .hint-pop { background: #fff; color: #0D0F23; box-shadow: var(--sh-lg); }
.stats.is-band .badge { background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; }
.stats.is-band .mini-th { box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }
.stats.is-band a:not(.mini-th) { color: #D9CFFF; }
@media (max-width: 1240px) { .stats.is-band .stat-val { font-size: 38px; } }
@media (max-width: 1024px) {
    .stats.is-band > .stat:nth-child(odd)::before { display: none; }
    .stats.is-band > .stat { border-radius: 0; }
    .stats.is-band > .stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .09); }
}
@media (max-width: 640px) {
    .stats.is-band { padding: 4px; border-radius: 26px; }
    .stats.is-band > .stat { padding: 16px 14px 14px; }
    .stats.is-band .stat-val { font-size: 28px; margin-top: 12px; }
    .stats.is-band .stat-ic { display: none; }
}

/* light tiles (inside the tabs) */
.stat {
    --st-c: #6A4CFF; --st-soft: #F1EEFF; --st-glow: rgba(124, 92, 255, .14);
    border-radius: var(--r-lg); border-color: rgba(13, 15, 35, .06);
    background: radial-gradient(220px 150px at 100% 0%, var(--st-glow), transparent 72%), var(--surface);
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.stats > .stat:nth-child(4n+2) { --st-c: #1F7AE8; --st-soft: #EAF3FF; --st-glow: rgba(46, 144, 250, .14); }
.stats > .stat:nth-child(4n+3) { --st-c: #0E9C8D; --st-soft: #E4F7F4; --st-glow: rgba(18, 179, 162, .14); }
.stats > .stat:nth-child(4n+4) { --st-c: #E4578F; --st-soft: #FFECF3; --st-glow: rgba(255, 122, 154, .17); }
.stat-ic { width: 32px; height: 32px; border-radius: 50%; background: var(--st-soft); color: var(--st-c); }
.stat-label { font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.stat-val { font-weight: 700; letter-spacing: -.045em; }
.card .stat { background: var(--surface-2); box-shadow: none; }
.card .stat:hover { transform: none; box-shadow: none; }
@media (max-width: 560px) { .stat-ic { width: auto; height: auto; background: none; } }

/* ---------- the overview: hello, the numbers, then a bento ---------- */
.dh {
    position: relative; overflow: hidden; isolation: isolate; border-radius: 32px; color: #fff;
    background:
        radial-gradient(520px 300px at 96% -10%, rgba(255, 122, 154, .50), transparent 70%),
        radial-gradient(640px 340px at 56% 130%, rgba(124, 92, 255, .62), transparent 70%),
        radial-gradient(420px 280px at 0% 0%, rgba(96, 72, 255, .42), transparent 70%),
        linear-gradient(135deg, #171A40 0%, #0B0D20 100%);
    box-shadow: 0 36px 72px -34px rgba(30, 22, 100, .85), inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.dh::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 38px 38px;
    -webkit-mask-image: radial-gradient(70% 120% at 88% 0%, #000 0%, transparent 74%); mask-image: radial-gradient(70% 120% at 88% 0%, #000 0%, transparent 74%);
}
.dh-top { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 38px 38px 34px; }
.hero-greet { display: flex; align-items: center; gap: 22px; flex: 1; min-width: 260px; }
.hero-greet .hero-text { min-width: 0; }
.dh h1 { margin-top: 12px; font-size: clamp(32px, 3.8vw, 50px); font-weight: 700; letter-spacing: -.05em; line-height: 1.02; color: #fff; }
.dh .hero-text p { margin-top: 10px; font-size: 16px; color: rgba(255, 255, 255, .72); }
.dh .hero-orb { --s: 92px; }
.dh-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 8px 8px; border-radius: 24px; background: rgba(255, 255, 255, .065); border: 1px solid rgba(255, 255, 255, .09); }
.dh-kpi { position: relative; display: block; padding: 20px 24px 19px; color: #fff; border-radius: 23px; transition: background var(--t); }
.dh-kpi:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.dh-kpi + .dh-kpi::before { content: ""; position: absolute; left: 0; top: 20px; bottom: 20px; width: 1px; background: rgba(255, 255, 255, .10); }
.dh-kpi span { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .66); }
.dh-kpi span svg { color: #C7B9FF; }
.dh-kpi b { display: block; margin-top: 12px; font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-kpi small { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: #D9CFFF; }
.dh-kpi small.is-muted { color: rgba(255, 255, 255, .5); font-weight: 500; }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.bento > .qt-grid { align-content: stretch; }
.bento > .b-7 > .card { height: 100%; }
.bento > .b-7 { grid-column: span 7; } .bento > .b-5 { grid-column: span 5; } .bento > .b-12 { grid-column: 1 / -1; }

/* four doors, each its own colour */
.qt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qt {
    position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; min-height: 164px; padding: 20px;
    border-radius: 26px; color: #fff; transition: transform var(--t-slow), box-shadow var(--t-slow), filter var(--t);
}
.qt:hover { transform: translateY(-4px); text-decoration: none; filter: saturate(1.08); }
.qt::after { content: ""; position: absolute; right: -40px; top: -40px; z-index: -1; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .28), transparent); }
.qt-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; background: rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); }
.qt b { display: block; margin-top: auto; padding-top: 22px; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.qt span { display: block; margin-top: 5px; font-size: 13px; line-height: 1.4; opacity: .82; }
.qt-go { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .16); transition: transform var(--t), background var(--t); }
.qt:hover .qt-go { transform: rotate(-45deg); background: rgba(255, 255, 255, .3); }
.qt-violet { background: linear-gradient(140deg, #8A6CFF 0%, #6A4CFF 55%, #5B36E8 100%); box-shadow: 0 24px 40px -22px rgba(106, 76, 255, .95); }
.qt-rose   { background: linear-gradient(140deg, #C65BF0 0%, #F0609A 60%, #FF8E7A 100%); box-shadow: 0 24px 40px -22px rgba(240, 96, 154, .9); }
.qt-navy   { background: linear-gradient(140deg, #23275A 0%, #0E1026 100%); box-shadow: 0 24px 40px -22px rgba(11, 13, 32, .9); }
.qt-light  { color: var(--text); background: #fff; border: 1px solid rgba(13, 15, 35, .06); box-shadow: var(--sh-card); }
.qt-light::after { background: radial-gradient(closest-side, rgba(124, 92, 255, .16), transparent); }
.qt-light .qt-ic { background: var(--brand-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .10); }
.qt-light .qt-go { background: var(--surface-3); color: var(--text-2); }
.qt-light span { color: var(--text-2); opacity: 1; }

@media (max-width: 1180px) {
    .bento > .b-7, .bento > .b-5 { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .dh { border-radius: 28px; }
    .dh-top { padding: 26px 22px 24px; gap: 18px; }
    .hero-greet { gap: 16px; }
    .dh .hero-orb { --s: 62px; }
    .dh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 6px 6px; }
    .dh-kpi { padding: 16px 16px 15px; }
    .dh-kpi:nth-child(odd)::before { display: none; }
    .dh-kpi { border-radius: 0; }
    .dh-kpi:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .08); }
    .dh-kpi b { font-size: 23px; margin-top: 9px; }
    .dh .hero-actions { width: 100%; }
    .dh .hero-actions .btn { flex: 1; }
}
@media (max-width: 420px) { .qt { min-height: 148px; padding: 16px; } .qt b { font-size: 16px; } }

/* ---------- small things brought into line ---------- */
.ai-head h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 700; letter-spacing: -.045em; }
.ai-head-ic { width: 54px; height: 54px; border-radius: 18px; box-shadow: 0 16px 28px -14px rgba(184, 77, 235, .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
.ai-quota { border-radius: 20px; padding: 14px 17px; box-shadow: var(--sh-card); border-color: rgba(13, 15, 35, .06); }
.ai-mode { border-radius: var(--r-lg); padding: 17px 18px; border-color: rgba(13, 15, 35, .06); }
.ai-mode-ic { width: 44px; height: 44px; border-radius: 14px; }
a.card:hover, .card.is-link:hover { box-shadow: var(--sh-md); transform: translateY(-2px); text-decoration: none; }
a.card, .card.is-link { transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.lang-menu > summary { border-radius: 999px; }
.lang-pop { border-radius: 16px; padding: 6px; }
.lang-pop a { border-radius: 11px; }

/* ==========================================================================
   Analiz dashboard v5 (2026-12-02) — after the two references the owner
   picked: a profile card with its numbers in a row (12), light KPI cards with
   a coloured icon tile, a change pill and a sparkline, chips, 2×2 tiles,
   share rows, a ranked post table and a compact heatmap (10).
   ========================================================================== */
.ax-violet { --ax: #6A4CFF; --ax-soft: #F1EEFF; }
.ax-blue   { --ax: #2E7CF6; --ax-soft: #EAF2FF; }
.ax-teal   { --ax: #0E9C8D; --ax-soft: #E2F6F2; }
.ax-rose   { --ax: #E5487A; --ax-soft: #FFEAF1; }
.ax-amber  { --ax: #E08A0B; --ax-soft: #FFF3DF; }
.ax-green  { --ax: #0F9F55; --ax-soft: #E5F7EC; }
.ax-red    { --ax: #E0362C; --ax-soft: #FEECEB; }
.ax-ic { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--ax-soft, var(--accent-soft)); color: var(--ax, var(--accent)); }

.ax-pill { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ax-pill-pos  { background: #E5F7EC; color: #0F8A4A; }
.ax-pill-neg  { background: #FEECEB; color: #C52A21; }
.ax-pill-flat { background: var(--surface-3); color: var(--text-2); }

/* cards */
.ax-card { display: flex; flex-direction: column; min-width: 0; }
.ax-hd { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 4px; }
.ax-t { flex: 1; min-width: 0; }
.ax-t h3 { font-size: 16.5px; font-weight: 750; letter-spacing: -.02em; }
.ax-t p { margin-top: 3px; font-size: 12.5px; color: var(--text-3); }
.ax-hd > .hint { margin-left: 0; margin-top: 2px; }
.ax-bd { padding: 14px 22px 22px; flex: 1; }
.ax-sub-h { margin: 20px 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.ax-sub-h.is-first { margin-top: 4px; }
.ax-sub-h small { text-transform: none; letter-spacing: 0; font-weight: 550; }
.ax-section { margin-top: 8px; }

.ax-grid-2 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.ax-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.ax-grid-half { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }

/* profile (ref 12). Not overflow:hidden — the period bar's month panel and dates
   popover open below the card; the glow keeps the round corners by itself. */
.ax-profile { overflow: visible; }
.ax-prof-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 26px; padding: 26px 28px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.ax-prof-row::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 100%; pointer-events: none; border-radius: inherit;
    background: radial-gradient(520px 200px at 0% 0%, rgba(124, 92, 255, .12), transparent 70%), radial-gradient(420px 200px at 100% 0%, rgba(255, 122, 154, .10), transparent 70%); }
.ax-prof-row > * { position: relative; }
.ax-ava { position: relative; display: block; flex: none; width: 112px; height: 112px; border-radius: 50%; background: var(--brand-grad); box-shadow: 0 18px 34px -16px rgba(184, 77, 235, .75); }
.ax-ava img, .ax-ava b { position: absolute; left: 4px; top: 4px; width: calc(100% - 8px); height: calc(100% - 8px); max-width: none; border-radius: 50%; border: 4px solid #fff; object-fit: cover; background: var(--brand-soft); }
.ax-ava b { display: grid; place-items: center; font-family: var(--font-display); font-size: 40px; font-weight: 800; color: var(--accent-press); }
.ax-prof-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ax-prof-name h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.04em; }
.ax-verified { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px 0 7px; border-radius: 999px; background: linear-gradient(135deg, #2E7CF6, #6A4CFF); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 8px 16px -8px rgba(46, 124, 246, .9); }
.ax-prof-sub { margin-top: 2px; font-size: 14px; color: var(--text-2); }
.ax-prof-nums { display: flex; flex-wrap: wrap; gap: 8px 30px; margin-top: 14px; }
.ax-prof-nums span { display: flex; flex-direction: column; font-size: 12.5px; color: var(--text-3); }
.ax-prof-nums b { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.035em; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.15; }
.ax-prof-bio { margin-top: 10px; max-width: 70ch; font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ax-prof-tools { display: flex; gap: 8px; align-self: flex-start; }
.ax-profile .rep-head-pbar { border-top: 1px solid var(--border-soft); }

/* KPI cards (ref 10) */
.ax-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ax-kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0; padding: 20px 20px 16px; border-radius: var(--r-lg);
    background: radial-gradient(240px 150px at 100% 100%, var(--ax-soft), transparent 70%), var(--surface);
    border: 1px solid rgba(13, 15, 35, .06); box-shadow: var(--sh-card); transition: transform var(--t), box-shadow var(--t); }
.ax-kpi:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.ax-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ax-kpi-val { margin-top: 18px; font-family: var(--font-display); font-size: 40px; font-weight: 800; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-kpi-lbl { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; font-weight: 550; color: var(--text-2); }
.ax-kpi-lbl .hint { margin-left: 0; }
.ax-kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; min-height: 46px; }
.ax-kpi-sub { min-width: 0; font-size: 12.5px; color: var(--text-3); line-height: 1.35; }
.ax-kpi-sub .trend { font-size: 13px; }
.ax-spark { flex: none; width: 112px; height: 42px; color: var(--ax); overflow: visible; }

/* chips */
.ax-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ax-chip { display: flex; flex-direction: column; min-width: 118px; padding: 11px 16px 10px; border-radius: 16px; background: var(--ax-soft); border: 1px solid color-mix(in srgb, var(--ax) 22%, transparent); }
.ax-chip b { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.04em; color: var(--ax); font-variant-numeric: tabular-nums; line-height: 1.15; }
.ax-chip span { margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--text-2); }

/* segmented control inside a card */
.ax-seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 4px; border-radius: 13px; background: var(--surface-3); }
.ax-seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-size: 12.5px; font-weight: 650; color: var(--text-2); white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
.ax-seg button:hover { color: var(--text); }
.ax-seg button[aria-pressed="true"] { background: var(--surface); color: var(--accent-text); box-shadow: var(--sh-sm); }

/* 2×2 tiles */
.ax-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ax-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px 15px 15px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.ax-tile .ax-ic { width: 34px; height: 34px; border-radius: 11px; }
.ax-tile-top { display: flex; align-items: center; justify-content: space-between; }
.ax-tile-pct { font-size: 12px; font-weight: 750; color: var(--ax); font-variant-numeric: tabular-nums; }
.ax-tile-body b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ax-tile-body span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.ax-tile-bar { display: block; height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--ax) 14%, transparent); overflow: hidden; }
.ax-tile-bar i { display: block; height: 100%; border-radius: 99px; background: var(--ax); }
.ax-tile.is-wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 10px; }
.ax-tile.is-wide .ax-tile-top { display: contents; }
.ax-tile.is-wide .ax-ic { grid-row: 1; grid-column: 1; }
.ax-tile.is-wide .ax-tile-body { grid-row: 1; grid-column: 2; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ax-tile.is-wide .ax-tile-body span { margin-top: 0; }
.ax-tile.is-wide .ax-tile-pct { grid-row: 1; grid-column: 3; }
.ax-tile.is-wide .ax-tile-bar { grid-row: 2; grid-column: 1 / -1; }

/* share rows */
.ax-rows { display: flex; flex-direction: column; gap: 12px; }
.ax-row { display: grid; grid-template-columns: minmax(64px, .9fr) minmax(0, 1.5fr) auto 46px; align-items: center; gap: 12px; font-size: 13.5px; }
.ax-row:has(.ax-row-ic) { grid-template-columns: 30px minmax(64px, .9fr) minmax(0, 1.4fr) auto 46px; }
.ax-row:not(:has(.ax-row-val)) { grid-template-columns: minmax(64px, .9fr) minmax(0, 1.6fr) 46px; }
.ax-row-lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 550; }
.ax-row-bar { display: block; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.ax-row-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7C5CFF, #A66BF5); }
.ax-row-val { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: right; }
.ax-row-pct { text-align: right; font-size: 13px; font-weight: 750; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.ax-row-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.ax-kv { display: flex; flex-direction: column; }
.ax-kv > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 13.5px; }
.ax-kv > div:first-child { border-top: 0; }
.ax-kv span { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.ax-kv span i { width: 8px; height: 8px; border-radius: 3px; }
.ax-kv b { font-variant-numeric: tabular-nums; color: var(--accent-text); }

/* gender (ref 10 tiles + ref 12 ratio bar) */
.ax-gender-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ax-gt { display: flex; flex-direction: column; align-items: center; padding: 14px 10px 12px; border-radius: 16px; }
.ax-gt b { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.ax-gt span { margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.ax-gt.is-f { background: #FFEAF1; } .ax-gt.is-f b { color: #E5487A; }
.ax-gt.is-m { background: #EAF2FF; } .ax-gt.is-m b { color: #2E7CF6; }
.ax-gbar { display: flex; gap: 3px; height: 12px; margin-top: 12px; border-radius: 99px; overflow: hidden; }
.ax-gbar i { display: block; height: 100%; }
.ax-gbar .is-f { background: linear-gradient(90deg, #FF8FB0, #E5487A); }
.ax-gbar .is-m { background: linear-gradient(90deg, #5B9BFF, #2E7CF6); }

/* compact heatmap (ref 10) */
.ax-heat { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 5px; align-items: center; }
.ax-heat-d { text-align: center; font-size: 11px; font-weight: 650; color: var(--text-3); }
.ax-heat-h { font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ax-heat-c { display: block; height: 26px; border-radius: 7px; background: var(--surface-2); }
.ax-heat-c.l1, .ax-heat-leg .l1 { background: #EDE8FF; }
.ax-heat-c.l2, .ax-heat-leg .l2 { background: #CFC3FF; }
.ax-heat-c.l3, .ax-heat-leg .l3 { background: #A994FF; }
.ax-heat-c.l4, .ax-heat-leg .l4 { background: #8264FF; }
.ax-heat-c.l5, .ax-heat-leg .l5 { background: #5B3DF5; }
.ax-heat-leg { display: flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 11px; color: var(--text-3); }
.ax-heat-leg i { width: 14px; height: 14px; border-radius: 4px; }
.ax-callout { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #E8F8EF; border: 1px solid #BFE9D0; color: #0B6B3A; }
.ax-callout > svg { flex: none; margin-top: 2px; }
.ax-callout b { display: block; font-size: 13.5px; }
.ax-callout span { display: block; margin-top: 1px; font-size: 12.5px; color: #2D7A52; }

/* ranked posts (ref 10) */
.ax-table { margin-top: 6px; }
.ax-table th { background: none; border-bottom: 1px solid var(--border-soft); padding-top: 10px; }
.ax-table td { padding-top: 12px; padding-bottom: 12px; }
.ax-table th, .ax-table td { padding-left: 10px; padding-right: 10px; }
.ax-table th:first-child, .ax-table td:first-child { padding-left: 22px; }
.ax-table th:last-child, .ax-table td:last-child { padding-right: 22px; }
.ax-table .post-thumb { width: 46px; height: 46px; border-radius: 12px; }
.ax-post-t { display: flex; flex-direction: column; min-width: 0; max-width: 22ch; }
.ax-post-t b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ax-post-t small { font-size: 12px; color: var(--text-3); }
.ax-fmt { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.ax-mini-bar { display: block; width: 64px; height: 4px; margin: 6px 0 0 auto; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.ax-mini-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }

/* the strip of smaller numbers */
.ax-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ax-strip > div { display: flex; flex-direction: column; padding: 18px 20px; border-left: 1px solid var(--border-soft); min-width: 0; }
.ax-strip > div:first-child { border-left: 0; }
.ax-strip span { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-strip b { margin-top: 4px; font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ax-strip small { font-size: 12px; color: var(--text-3); }

/* advice as tiles */
.ax-tips { display: flex; flex-direction: column; gap: 10px; }
.ax-tip { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--ax-soft) 70%, transparent); }
.ax-tip .ax-ic { width: 36px; height: 36px; border-radius: 12px; background: var(--surface); }
.ax-tip b { display: block; font-size: 14px; }
.ax-tip p { margin-top: 2px; font-size: 13px; color: var(--text-2); line-height: 1.5; }

@media (max-width: 1240px) { .ax-kpi-val { font-size: 34px; } }
@media (max-width: 1180px) {
    .ax-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .ax-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ax-grid-3 > :last-child { grid-column: 1 / -1; }
    .ax-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .ax-grid-3, .ax-grid-half { grid-template-columns: minmax(0, 1fr); }
    .ax-prof-row { grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 20px 18px; }
    .ax-prof-tools { grid-column: 1 / -1; }
    .ax-ava { width: 78px; height: 78px; }
    .ax-ava img, .ax-ava b { left: 3px; top: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border-width: 3px; }
    .ax-ava b { font-size: 28px; }
    .ax-prof-nums { gap: 6px 20px; margin-top: 10px; }
    .ax-prof-nums b { font-size: 18px; }
}
@media (max-width: 560px) {
    .ax-kpis { gap: 10px; }
    .ax-kpi { padding: 15px 14px 12px; border-radius: 20px; }
    .ax-kpi .ax-ic { width: 36px; height: 36px; border-radius: 12px; }
    .ax-kpi .ax-ic svg { width: 16px; height: 16px; }
    .ax-kpi-val { font-size: 26px; margin-top: 12px; }
    .ax-kpi-foot { flex-direction: column; align-items: stretch; gap: 6px; min-height: 0; }
    .ax-spark { width: 100%; height: 30px; }
    .ax-pill { height: 22px; padding: 0 7px; font-size: 11px; }
    .ax-hd { padding: 16px 16px 2px; flex-wrap: wrap; }
    .ax-bd { padding: 12px 16px 18px; }
    .ax-chip { min-width: 0; flex: 1; padding: 9px 11px; }
    .ax-chip b { font-size: 18px; }
    .ax-tile-body b { font-size: 20px; }
    .ax-strip > div { padding: 14px 16px; border-left: 0; border-top: 1px solid var(--border-soft); }
    .ax-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ax-strip > div:nth-child(-n+2) { border-top: 0; }
    .ax-strip > div:nth-child(even) { border-left: 1px solid var(--border-soft); }
    .ax-row { gap: 9px; font-size: 13px; }
    .ax-table th:first-child, .ax-table td:first-child { padding-left: 16px; }
    .ax-table th:last-child, .ax-table td:last-child { padding-right: 16px; }
    .ax-post-t { max-width: 16ch; }
}
.ax-prof-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ax-prof-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 13px; font-weight: 600; }
.ax-prof-tools { align-items: center; }
.ax-prof-tools .q-score { text-align: center; }

/* The character's moods are animations of custom properties: those run on the
   main thread and repaint the orb every frame. They hold still while the page
   is scrolling (ui_orb_script sets html.is-scrolling) and while an orb is off
   screen (.is-off), so a scroll never waits for them. */
html.is-scrolling .ai-orb, html.is-scrolling .ai-orb *,
.ai-orb.is-off, .ai-orb.is-off * { animation-play-state: paused !important; }

/* ==========================================================================
   The menu on the left (2026-12-02, the owner's call): from 1024px up the
   drawer's menu becomes a rail on the dark frame — logo, the places as pills,
   credits, language and the account at the bottom — and the sheet sits to
   its right. Narrower screens keep the top bar, the drawer and the bottom bar.
   ========================================================================== */
.sb-nav { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent); padding-bottom: 18px; }
.sb-lang { display: flex; align-items: center; gap: 8px; padding: 2px 10px 10px; color: rgba(255, 255, 255, .5); }
.sb-lang .lang-row a { color: rgba(255, 255, 255, .7); font-size: 12px; padding: 3px 8px; }
.sb-lang .lang-row a.is-on { color: #fff; background: rgba(255, 255, 255, .14); }
@media (min-width: 1024px) {
    .app { display: grid; grid-template-columns: 252px minmax(0, 1fr); align-items: start; background: var(--frame); }
    .dock { display: none; }
    .sb-scrim { display: none !important; }
    .sidebar {
        display: flex; position: sticky; top: 0; z-index: 30; width: auto; max-width: none;
        height: 100vh; height: 100dvh; margin-left: calc(-1 * var(--gut)); padding-left: var(--gut);
        transform: none; transition: none; border-radius: 0; box-shadow: none;
        background:
            radial-gradient(360px 300px at 0% 0%, rgba(108, 76, 255, .55), transparent 70%),
            radial-gradient(320px 320px at 100% 105%, rgba(255, 122, 154, .16), transparent 70%);
    }
    .sb-brand { height: 68px; padding: 0 20px; }
    .sidebar .brand { font-size: 20px; }
    .sb-nav { padding: 0 12px 18px; gap: 1px; }
    .sb-group { margin: 12px 0 4px; }
    .sb-link { padding: 8px 14px; font-size: 14px; }
    .sb-credits { margin-bottom: 8px; padding: 10px 14px 11px; }
    .sb-admin { margin-bottom: 4px; }
    .sb-foot { padding: 8px 12px 12px; }
    .main { margin-top: var(--gut); min-height: calc(100vh - 2 * var(--gut)); min-height: calc(100dvh - 2 * var(--gut)); }
    .topbar { padding-top: 26px; }
}
@media (min-width: 1024px) and (max-height: 760px) {
    .sb-promo { display: none; }
}

/* Analiz: the six tabs under the four numbers */
.ax-kpis + .tabs { margin-top: 4px; }
/* the posts heading carries two small numbers: typical views, skip rate */
.ax-posts-hd { flex-wrap: wrap; row-gap: 8px; }
.ax-hstat {
    display: inline-flex; align-items: baseline; gap: 6px; align-self: center;
    padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-soft);
    font-size: 12.5px; font-weight: 500; color: var(--text-3); white-space: nowrap; cursor: help;
}
.ax-hstats { display: inline-flex; flex-wrap: wrap; gap: 8px; align-self: center; }
.ax-hstat b { font-size: 13.5px; font-weight: 750; color: var(--text); font-variant-numeric: tabular-nums; }
/* phone: both numbers on their own row under the heading, the hint stays up top */
@media (max-width: 560px) {
    .ax-hstats { order: 3; flex-basis: 100%; gap: 6px; }
    .ax-hstat { padding: 4px 9px; font-size: 12px; gap: 5px; }
    .ax-hstat b { font-size: 13px; }
}
/* Reels tab: the side-by-side comparison and a neutral callout */
.ax-cmp th, .ax-cmp td { padding: 11px 8px; }
.ax-cmp th:first-child, .ax-cmp td:first-child { padding-left: 0; }
.ax-cmp th:last-child, .ax-cmp td:last-child { padding-right: 0; }
.ax-cmp td:first-child { font-size: 13.5px; color: var(--text-2); }
.ax-cmp td b { font-variant-numeric: tabular-nums; }
.ax-cmp .ax-pill { margin-left: 6px; vertical-align: 1px; }
.ax-cmp tbody tr:last-child td { border-bottom: 0; }
.ax-callout.is-flat { background: var(--surface-3); border-color: var(--border-soft); color: var(--text); }
.ax-callout.is-flat span { color: var(--text-3); }
/* a narrow sheet (rail + small laptop): the Reels table keeps its key columns */
@media (max-width: 1279px) {
    .ax-reels-tbl .c-md { display: none; }
    .ax-reels-tbl .ax-post-t { max-width: 15ch; }
    .ax-reels-tbl .rv-btn { font-size: 0; gap: 0; padding-left: 9px; padding-right: 9px; }
}
@media (max-width: 560px) {
    .ax-cmp td:first-child { font-size: 12.5px; }
    .ax-cmp .ax-pill { display: table; margin: 4px 0 0 auto; }
    .ax-reels-tbl .post-thumb { width: 38px; height: 38px; border-radius: 10px; }
    .ax-reels-tbl .ax-post-t { display: none; }
    .ax-reels-tbl .ax-mini-bar { display: none; }
    .ax-reels-tbl .ax-post-t small { display: none; }
    .ax-reels-tbl .col-actions { display: none; }
    .ax-reels-tbl th, .ax-reels-tbl td { padding-left: 6px; padding-right: 6px; }
}

/* ===== Mualliflar v2 (lenta.php, 2026-12-04): creators rail, brief, hits, compare, saved ===== */
.lr-count { display: inline-block; margin-left: 8px; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); font-family: var(--font-body); font-size: 14px; font-weight: 650; letter-spacing: 0; color: var(--text-3); vertical-align: middle; font-variant-numeric: tabular-nums; }
.lr { container-type: inline-size; }
.lr-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 22px; align-items: start; }
.lr-you { font-style: normal; font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: 1px; }

/* the rail */
.lr-rail { position: sticky; top: 16px; padding: 8px; background: var(--surface); border: 1px solid rgba(13, 15, 35, .06); border-radius: var(--r-lg); box-shadow: var(--sh-card); }
.lr-list { display: flex; flex-direction: column; gap: 2px; max-height: min(62vh, 640px); overflow-y: auto; scrollbar-width: thin; }
.lr-au { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; border: 0; border-radius: 14px; background: none; text-align: left; cursor: pointer; color: var(--text); transition: background var(--t-fast); }
.lr-au:hover { background: var(--surface-2); }
.lr-au[aria-pressed="true"] { background: var(--accent-soft); }
.lr-au[aria-pressed="true"] .lr-au-t b { color: var(--accent-text); }
.lr-au.is-off { opacity: .55; }
.lr-au .avatar { flex: none; }
.lr-au-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); }
.lr-au[aria-pressed="true"] .lr-au-ic { background: var(--accent); color: #fff; }
.lr-au-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.lr-au-t b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-au-t small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.lr-au-n { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: var(--pos-soft); color: var(--pos); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.lr-add { display: flex; gap: 6px; margin-top: 8px; padding: 8px 2px 0; border-top: 1px solid var(--border-soft); }
.lr-add .input { flex: 1; min-width: 0; height: 40px; font-size: 13.5px; }
.lr-add .btn { flex: none; width: 40px; height: 40px; padding: 0; justify-content: center; }
.lr-note { margin: 8px 4px 4px; font-size: 12px; line-height: 1.45; color: var(--text-3); }
.lr-alert { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 4px 4px; border-top: 1px solid var(--border-soft); }
.lr-alert-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--text-2); }
.lr-alert-t > svg { flex: none; color: var(--text-3); }
.lr-alert .switch { border: 0; background: none; padding: 0; cursor: pointer; }
.lr-alert .switch input { pointer-events: none; }

/* the brief */
.lr-main { min-width: 0; }
.lr-brief { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid rgba(13, 15, 35, .06); box-shadow: var(--sh-card); }
.lr-brief-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.lr-brief p { margin: 5px 0 0; font-size: 15px; line-height: 1.55; color: var(--text); }
.lr-link { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--accent-text); cursor: pointer; }
.lr-link:hover { text-decoration: underline; }

/* a creator's panel */
.lr-prof { margin-bottom: 16px; padding: 20px 22px; }
.lr-prof-hd { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lr-prof-hd .avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.lr-prof-who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 180px; }
.lr-prof-who h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-prof-who span { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-prof-fol { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.lr-prof-fol b { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.lr-prof-fol span { font-size: 13px; color: var(--text-3); }
.lr-prof-fol em { font-style: normal; font-size: 12.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.lr-prof-fol em.is-pos { background: var(--pos-soft); color: var(--pos); }
.lr-prof-fol em.is-neg { background: var(--neg-soft); color: var(--neg); }
.lr-prof-act { display: flex; align-items: center; gap: 6px; }
.lr-prof-off { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; font-size: 14px; color: var(--text-2); }
.lr-prof-off svg { flex: none; margin-top: 2px; color: var(--warn); }
.lr-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; border: 1px solid var(--border-soft); border-radius: 16px; overflow: hidden; }
.lr-num { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; min-width: 0; }
.lr-num + .lr-num { border-left: 1px solid var(--border-soft); }
.lr-num > span { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-3); }
.lr-num b { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-num b small { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.lr-num b.is-pos { color: var(--pos); }
.lr-num b.is-neg { color: var(--neg); }

/* the rhythm chart */
.lr-rh-box { margin-top: 18px; }
.lr-rh-hd { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.lr-rh-hd h3 { margin: 0 auto 0 0; font-size: 14.5px; }
.lr-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.lr-leg i { width: 10px; height: 10px; border-radius: 3px; }
.lr-leg i.is-hit, .lr-rh rect.is-hit { background: var(--accent); fill: var(--accent); }
.lr-leg i.is-up, .lr-rh rect.is-up { background: #B9A9FF; fill: #B9A9FF; }
.lr-leg i.is-down, .lr-rh rect.is-down { background: #CDD0DD; fill: #CDD0DD; }
.lr-rh rect.is-flop { fill: #F4A9A4; }
.lr-rh rect.is-young { opacity: .45; }
.lr-rh-plot { position: relative; padding-left: 30px; }
.lr-rh { display: block; width: 100%; height: 190px; overflow: visible; }
.lr-rh-y { position: absolute; left: 0; top: 0; bottom: 0; width: 28px; pointer-events: none; }
.lr-rh-y span { position: absolute; left: 0; transform: translateY(-50%); font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.lr-rh-y span.is-base { font-weight: 700; color: var(--text-2); }
.lr-rh-base { stroke: var(--text-3); stroke-width: 1.2; }
.lr-rh-g { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.lr-rh-g.is-2 { stroke: #C9BEFF; stroke-dasharray: 5 4; }
.lr-pt { cursor: pointer; }
.lr-bar-hit { fill: transparent; }
.lr-pt:hover .lr-bar-hit { fill: rgba(106, 76, 255, .06); }
.lr-pt:hover rect:not(.lr-bar-hit) { opacity: 1; filter: brightness(.92); }
.lr-rh-x { display: flex; justify-content: space-between; padding: 4px 0 0 30px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.lr-rh.is-mini { width: 112px; height: 30px; }
.lr-rh.is-mini .lr-rh-base { stroke-width: 1; stroke: var(--border-2); }

/* when they post */
.lr-habit { display: flex; gap: 22px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.lr-days { flex: none; display: flex; gap: 6px; align-items: flex-end; height: 64px; }
.lr-days span { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 22px; height: 100%; justify-content: flex-end; }
.lr-days i { display: block; width: 100%; max-height: calc(100% - 18px); border-radius: 5px 5px 2px 2px; background: #B9A9FF; }
.lr-days i.is-zero { background: var(--surface-3); }
.lr-days small { font-size: 11px; color: var(--text-3); line-height: 1; }
.lr-habit-t { min-width: 0; }
.lr-habit-t b { font-size: 13px; color: var(--text-3); font-weight: 600; }
.lr-habit-t p { margin: 3px 0 0; font-size: 14px; color: var(--text); }
.lr-habit-t p.lr-mix { font-size: 13px; color: var(--text-3); }

/* tabs, filters, sections */
.lr-tabs { margin-bottom: 14px; }
.lr-tn { margin-left: 2px; font-size: 12px; font-weight: 650; opacity: .6; font-variant-numeric: tabular-nums; }
.lr-tn:empty { display: none; }
.lr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.lr-bar .select { height: 40px; min-width: 0; font-size: 14px; }
.lr-spacer { flex: 1; }
.lr-when { font-size: 12.5px; color: var(--text-3); }
.lr-sec { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; font-size: 14px; }
.lr-sec svg { color: var(--accent); }
.lr-sec .hint { margin-left: 2px; }
.lr-sec .hint-pop { right: auto; left: -6px; }
#lr-hits-hd { margin-top: 22px; }
.lr-grid + .lr-sec { margin-top: 22px; }
.lr-more { display: flex; justify-content: center; margin-top: 18px; }
.lr-none { margin-bottom: 14px; }
.lr .vact { display: block; }
.lr-act { display: flex; gap: 6px; }
.lr-act .btn { width: auto; flex: 1; justify-content: center; }
.lr-act .lr-save { flex: none; width: 36px; padding: 0; }
.lr-act .lr-save.is-wide { flex: 1; width: auto; padding: 0 10px; }
.lr-save[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.lr-save[aria-pressed="true"] svg path { fill: currentColor; }
.lr .vcard[data-s-new="1"] .vbadge::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: #FF7A9A; vertical-align: 1px; }

/* compare */
.lr-tbl th button { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: inherit; line-height: 1.3; }
.lr-tbl th { white-space: normal; vertical-align: bottom; }
.lr-tbl th button:hover { color: var(--text); }
.lr-tbl th[aria-sort="descending"] button::after { content: " ↓"; }
.lr-tbl th[aria-sort="ascending"] button::after { content: " ↑"; }
.lr-tbl tbody tr { cursor: pointer; }
.lr-tbl tbody tr.is-you td { background: #FBFAFF; }
.lr-tbl tbody tr.is-sel td { background: var(--accent-soft); }
.lr-tbl th, .lr-tbl td { padding-left: 12px; padding-right: 12px; }
.lr-tbl th:first-child, .lr-tbl td:first-child { padding-left: 18px; }
.lr-tbl td { padding-top: 11px; padding-bottom: 11px; }
.lr-d { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lr-d small { font-size: 11.5px; font-weight: 600; opacity: .75; }
.lr-d.is-pos { color: var(--pos); }
.lr-d.is-neg { color: var(--neg); }
.lr-tbl-who { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.lr-tbl-who b { font-weight: 700; }

@container (max-width: 1200px) {
    .lr-col-rh { display: none; }
}
@container (max-width: 880px) {
    .lr-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .lr-rail { position: static; padding: 8px; }
    .lr-list { flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; gap: 6px; scrollbar-width: none; }
    .lr-list::-webkit-scrollbar { display: none; }
    .lr-au { flex: none; width: auto; max-width: 220px; padding: 6px 10px 6px 6px; border-radius: 999px; background: var(--surface-2); }
    .lr-au-t small { display: none; }
    .lr-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lr-num:nth-child(3) { border-left: 0; }
    .lr-num:nth-child(n+3) { border-top: 1px solid var(--border-soft); }
}
@container (max-width: 560px) {
    .lr-prof { padding: 16px; }
    .lr-prof-act { width: 100%; }
    .lr-prof-act .btn { flex: 1; justify-content: center; }
    .lr-prof-act form { flex: none; }
    .lr-rh { height: 150px; }
    .lr-habit { flex-direction: column; align-items: flex-start; gap: 12px; }
    .lr-bar .select-wrap { flex: 1 1 calc(50% - 4px); }
    .lr-bar .select { width: 100%; }
    .lr-sort { width: 100%; }
    .lr-sort button { flex: 1; }
    .lr-spacer { display: none; }
    .lr-when { flex: 1; }
    .lr-brief { padding: 14px; }
    .lr-brief p { font-size: 14.5px; }
    .lr-tbl th:first-child, .lr-tbl td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
    .lr-tbl tbody tr.is-you td:first-child { background: #FBFAFF; }
    .lr-tbl tbody tr.is-sel td:first-child { background: var(--accent-soft); }
}

/* ===== Trendlar: two ways in, and the ready collections ===== */
.tr-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.tr-mode {
    display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px;
    border-radius: 20px; background: var(--surface); border: 1.5px solid var(--border-soft); color: var(--text);
    text-decoration: none; transition: border-color .16s ease, box-shadow .16s ease;
}
.tr-mode:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); text-decoration: none; }
.tr-mode.is-on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.tr-mode-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.tr-mode.is-on .tr-mode-ic { background: var(--brand-grad); color: #fff; }
.tr-mode-t { display: flex; flex-direction: column; min-width: 0; }
.tr-mode-t b { font-size: 15.5px; font-weight: 700; }
.tr-mode-t small { margin-top: 2px; font-size: 13px; color: var(--text-3); line-height: 1.4; }

.col-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.col-q { width: 300px; max-width: 100%; height: 42px; border-radius: 999px; }
.col-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.col-chip {
    height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--surface-3);
    font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.col-chip:hover { color: var(--text); }
.col-chip[aria-pressed="true"] { background: var(--ink-grad); color: #fff; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px 20px; }
.col-card { display: flex; flex-direction: column; min-width: 0; color: var(--text); text-decoration: none; }
.col-card:hover { text-decoration: none; }
.col-card[hidden] { display: none; }
.col-cover {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; aspect-ratio: 4 / 3;
    border-radius: 18px; overflow: hidden; background: #0B0D20; transition: transform .2s ease;
}
.col-card:hover .col-cover { transform: translateY(-2px); }
.col-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.col-cover.n0 { place-items: center; padding: 16px; background: radial-gradient(120% 90% at 0% 0%, rgba(124, 92, 255, .35), transparent 60%), #0B0D20; }
.col-cover.n0 b { color: #fff; font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.03em; text-align: center; line-height: 1.15; }
/* every cover failed to load: the name on the dark card instead */
.col-cover:not(.n0):not(:has(img)) { place-items: center; padding: 16px; background: radial-gradient(120% 90% at 0% 0%, rgba(124, 92, 255, .35), transparent 60%), #0B0D20; }
.col-cover:not(.n0):not(:has(img))::before { content: attr(data-name); color: #fff; font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.03em; text-align: center; line-height: 1.15; }
.col-meta { margin-top: 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-name { margin-top: 3px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.col-n { align-self: flex-start; margin-top: 10px; padding: 5px 12px; border-radius: 999px; background: var(--surface-3); font-size: 13px; font-weight: 600; color: var(--text-2); }
.col-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.col-back svg { transform: rotate(180deg); }
.col-hd { margin-bottom: 18px; }
.col-hd h2 { margin-top: 4px; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.03em; }
.col-hd p { margin-top: 6px; max-width: 70ch; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.col-hd .col-meta { margin-top: 0; }
/* new ideas arrived while the page was open: a pill above everything, one tap shows them */
.col-new {
    position: fixed; left: 12px; right: 12px; bottom: 26px; z-index: 45; width: fit-content; margin: 0 auto; display: flex; align-items: center; gap: 14px;
    padding: 7px 7px 7px 16px; border-radius: 999px; background: var(--navy); color: #fff;
    box-shadow: 0 18px 40px -14px rgba(8, 9, 24, .7); font-size: 13.5px; white-space: nowrap; animation: fadeUp var(--t) both;
}
.col-new[hidden] { display: none; }
.col-new span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.col-new b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.col-new svg { flex: none; color: #C9B8FF; }
.col-new .btn { flex: none; border: 0; background: #fff; color: var(--navy); }
@media (max-width: 900px) { .col-new { bottom: calc(92px + env(safe-area-inset-bottom)); } }   /* above the floating bottom menu */
@media (min-width: 1024px) { .col-new { left: 264px; } }   /* centred over the sheet, not under the left menu (252px) */
.col-admin { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 24px; padding: 12px 14px; border-radius: 14px; background: var(--surface-3); font-size: 13px; color: var(--text-2); }
.col-admin span { display: inline-flex; align-items: center; gap: 6px; }
.col-admin .col-admin-last { order: 3; flex-basis: 100%; display: block; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 760px) {
    .tr-modes { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .tr-mode { padding: 12px 14px; }
    .tr-mode-ic { width: 38px; height: 38px; border-radius: 12px; }
}
@media (max-width: 560px) {
    .tr-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tr-mode { gap: 10px; padding: 10px 12px; border-radius: 16px; }
    .tr-mode-ic { width: 34px; height: 34px; border-radius: 11px; }
    .tr-mode-ic svg { width: 17px; height: 17px; }
    .tr-mode-t b { font-size: 13.5px; line-height: 1.25; }
    .tr-mode-t small { display: none; }
    .col-cover:not(.n0):not(:has(img))::before { font-size: 16px; }
    .col-q { width: 100%; }
    .col-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
    .col-chips::-webkit-scrollbar { display: none; }
    .col-chip { flex: none; height: 36px; padding: 0 14px; font-size: 13.5px; }
    .col-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
    .col-cover { border-radius: 14px; }
    .col-cover.n0 b { font-size: 16px; }
    .col-meta { font-size: 10.5px; margin-top: 8px; }
    .col-name { font-size: 15px; }
    .col-n { font-size: 12px; padding: 4px 10px; margin-top: 8px; }
}
.tr-adapt { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: #E5F7EC; color: #0B6B3A; font-size: 13px; line-height: 1.45; }
.tr-adapt b { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #0F9F55; }

/* ===== Tahlil v2: the formula first, findings, then rankings in plain numbers ===== */
.tz-hero {
    position: relative; margin-bottom: 16px; padding: 8px; border-radius: 20px; color: #fff;
    background: radial-gradient(380px 140px at 100% 0%, rgba(184, 77, 235, .26), transparent 70%), #12142E;
    box-shadow: 0 16px 36px -26px rgba(11, 13, 32, .8);
}
/* one row: what it is, the three parts, the action */
.tz-hero-row { display: flex; align-items: stretch; gap: 6px; }
.tz-lead { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 6px; }
.tz-lead-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--brand-grad); color: #fff; }
.tz-lead-t { display: flex; flex-direction: column; line-height: 1.2; }
.tz-lead-t b { font-size: 14px; font-weight: 700; white-space: nowrap; }
.tz-lead-t small { font-size: 11.5px; color: rgba(255, 255, 255, .5); white-space: nowrap; }
.tz-slots { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tz-slot {
    position: relative; display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; padding: 6px 12px;
    border-radius: 13px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09); cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.tz-slot:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .2); }
.tz-slot:focus-within { border-color: #A898FF; }
.tz-slot-k { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .48); }
.tz-slot-k b { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 750; }
.tz-sel {
    width: 100%; height: 22px; padding: 0 20px 0 0; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='white' stroke-opacity='.65' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 1px center;
    color: #fff; font: inherit; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
    appearance: none; -webkit-appearance: none; cursor: pointer;
}
.tz-sel:focus { outline: none; }
.tz-sel option { color: #12142E; }
.tz-hero .tz-hi, .tz-hero .tz-up { color: #6EE7A8; }
.tz-hero .tz-flat { color: rgba(255, 255, 255, .72); }
.tz-hero .tz-down { color: #FF9A9A; }
.tz-f-act { flex: none; display: flex; align-items: stretch; gap: 6px; }
.tz-go { height: auto; min-height: 46px; padding: 0 14px; border: 0; border-radius: 13px; background: #fff; color: #12142E; font-size: 14px; font-weight: 700; white-space: nowrap; }
.tz-go:hover { background: #F1EEFF; color: #12142E; }
.tz-go-c { margin-left: 2px; padding: 2px 7px; border-radius: 999px; background: #F1EEFF; color: var(--accent); font-size: 11.5px; font-weight: 700; }
.tz-mix { width: 46px; height: auto; min-height: 46px; padding: 0; justify-content: center; border-radius: 13px; background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .12); }
.tz-mix:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.tz-f-out { margin: 8px 0 0; padding: 18px; border-radius: 14px; background: var(--surface); color: var(--text); }
@media (max-width: 1320px) { .tz-lead-t { display: none; } .tz-lead { padding: 0 2px 0 4px; } }
@media (max-width: 1100px) {
    .tz-hero-row { flex-wrap: wrap; }
    .tz-lead { display: none; }
    .tz-slots { flex-basis: 100%; }
    .tz-f-act { flex: 1; }
    .tz-go { flex: 1; justify-content: center; min-height: 42px; }
    .tz-mix { min-height: 42px; }
}
@media (max-width: 640px) {
    .tz-hero { border-radius: 18px; }
    .tz-slots { grid-template-columns: minmax(0, 1fr); }
}

/* A Reels cover: a 9:16 box, the image filling it edge to edge (cover). */
.tz-empty { margin-top: 10px; font-size: 13.5px; color: var(--text-3); }

.tz-sec { margin: 26px 0 12px; }
.tz-sec h2 { font-size: 21px; letter-spacing: -.02em; }
.tz-tabs { margin-bottom: 14px; }
.tz-dim { padding: 8px 8px 12px; }
.tz-scale { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 8px 12px 6px calc(36% + 46px); font-size: 12px; font-weight: 600; color: var(--text-2); }
.tz-tick-lg { display: inline-block; width: 2px; height: 14px; border-radius: 2px; background: #14162B; opacity: .75; }
.tz-scale-hint { font-weight: 500; color: var(--text-3); }
.tz-rows { display: flex; flex-direction: column; }
.tz-row { border-radius: 18px; transition: background-color .3s ease; }
.tz-row + .tz-row { border-top: 1px solid var(--border-soft); }
.tz-row.is-open { background: var(--surface-2, #F7F6FC); border-top-color: transparent; }
.tz-row.is-open + .tz-row { border-top-color: transparent; }
.tz-row-hd {
    display: grid; grid-template-columns: 30px minmax(0, 36%) minmax(0, 1fr) 92px 22px; align-items: center; gap: 14px; width: 100%;
    padding: 14px 12px; border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; border-radius: 18px;
}
.tz-row-hd:hover { background: color-mix(in srgb, var(--surface-3) 55%, transparent); }
.tz-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-3); font-size: 13px; font-weight: 700; color: var(--text-2); }
.tz-name { display: flex; flex-direction: column; min-width: 0; }
.tz-name b { font-size: 15px; font-weight: 650; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tz-name small { margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.tz-bar { position: relative; height: 12px; border-radius: 999px; background: #EFEDF7; }
.tz-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.tz-bar em { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 2px; background: #14162B; opacity: .75; box-shadow: 0 0 0 2px #fff; }
.tz-bar.tz-hi i { background: linear-gradient(90deg, #8FE3B6, #12A35D); }
.tz-bar.tz-up i { background: linear-gradient(90deg, #BDEFD3, #3CC47E); }
.tz-bar.tz-flat i { background: linear-gradient(90deg, #DCD8EE, #B8B2D6); }
.tz-bar.tz-down i { background: linear-gradient(90deg, #FFD3CD, #F2897D); }
.tz-res { text-align: right; font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.tz-res.tz-hi, .tz-res.tz-up { color: #0F9F55; }
.tz-res.tz-flat { color: var(--text-3); font-size: 13px; font-family: var(--font-body); font-weight: 600; }
.tz-res.tz-down { color: #E0362C; }
.tz-chev { display: grid; place-items: center; color: var(--text-3); transition: transform .35s cubic-bezier(.32, .72, 0, 1); }
.tz-row.is-open .tz-chev { transform: rotate(90deg); }
/* Opening and closing: the script animates the body's height (tahlil.php slide()).
   While it moves (is-moving) the video strip is not painted; it fades in after. */
.tz-row-bd { height: 0; overflow: hidden; }
.tz-row.is-open .tz-row-bd { height: auto; }
.tz-row-in { padding: 0 12px 16px 56px; opacity: 0; transition: opacity .14s ease; }
.tz-row.is-open .tz-row-in { opacity: 1; transition: opacity .22s ease; }
.tz-row-in .vgrid-wrap { transition: opacity .26s ease; }
.tz-row.is-moving .vgrid-wrap, .tz-row:not(.is-open) .vgrid-wrap { opacity: 0; visibility: hidden; transition: none; }
.tz-strip .vcard { box-shadow: none; }
.tz-strip .vcard:hover { transform: none; box-shadow: none; }
.tz-say { font-size: 14.5px; color: var(--text-2); line-height: 1.5; }
.tz-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.tz-note { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-soft); }
.tz-note b { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.tz-note.is-pos b { color: #0F9F55; }
.tz-note.is-neg b { color: #E0362C; }
.tz-note p { margin-top: 5px; font-size: 13.5px; line-height: 1.5; color: var(--text); }
.vgrid.tz-strip { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 160px; gap: 12px; margin-top: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.tz-strip .vthumb { aspect-ratio: 9 / 16; }
.tz-strip .vbig { font-size: 16px; }
.tz-strip .vcap { font-size: 12.5px; }
.tz-strip .vstats, .tz-strip .vmeta { font-size: 12px; }
.tz-few { margin: 12px 12px 4px; font-size: 12.5px; line-height: 1.55; color: var(--text-3); }

@media (max-width: 1180px) {
}
@media (max-width: 760px) {
    .tz-notes { grid-template-columns: minmax(0, 1fr); }
    .tz-scale { margin: 6px 8px 2px; }
    .tz-row-hd { grid-template-columns: 26px minmax(0, 1fr) 78px 18px; grid-template-areas: "rank name res chev" "bar bar bar bar"; row-gap: 10px; gap: 10px; padding: 12px 8px; }
    .tz-rank { grid-area: rank; width: 26px; height: 26px; }
    .tz-name { grid-area: name; }
    .tz-bar { grid-area: bar; }
    .tz-res { grid-area: res; font-size: 15px; }
    .tz-chev { grid-area: chev; }
    .tz-row-in { padding: 0 8px 14px; }
    .vgrid.tz-strip { grid-auto-columns: 140px; }
}
@media (prefers-reduced-motion: reduce) {
    .tz-row, .tz-row-in, .tz-chev { transition: none !important; }
}

/* ===== the month list in the period bar: our own panel instead of the system menu ===== */
.pbar-dd { position: relative; }
.pbar-dd > summary { list-style: none; }
.pbar-dd > summary::-webkit-details-marker { display: none; }
.pbar-dd-btn {
    display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 11px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600;
    cursor: pointer; user-select: none; transition: border-color .15s ease, background-color .15s ease;
}
.pbar-dd-btn svg { color: var(--text-3); }
.pbar-dd-btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.pbar-dd-chev { display: grid; place-items: center; font-style: normal; transform: rotate(90deg); transition: transform .2s ease; }
.pbar-dd[open] .pbar-dd-chev { transform: rotate(-90deg); }
.pbar-dd[open] .pbar-dd-btn, .pbar-dd.is-set .pbar-dd-btn { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.pbar-dd.is-set .pbar-dd-btn svg { color: var(--accent); }
.pbar-dd-menu {
    position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 300px; max-width: calc(100vw - 40px); padding: 10px 10px 8px;
    background: var(--surface); border: 1px solid var(--border-soft); border-radius: 18px;
    box-shadow: 0 24px 48px -20px rgba(21, 24, 59, .35), 0 2px 6px rgba(21, 24, 59, .06);
    animation: pbar-dd-in .16s ease-out;
}
@keyframes pbar-dd-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.pbar-dd-y { margin: 4px 6px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--text-3); }
.pbar-dd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
.pbar-dd-m {
    display: grid; place-items: center; height: 38px; border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--text-2);
    text-decoration: none; white-space: nowrap; transition: background-color .12s ease, color .12s ease;
}
.pbar-dd-m:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.pbar-dd-m.is-active { background: var(--ink-grad); color: #fff; }
@media (prefers-reduced-motion: reduce) { .pbar-dd-menu { animation: none; } }

/* ===== "Sanalar": the calendar range picker ===== */
.pbar-range .dr {
    position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 620px; max-width: calc(100vw - 24px); padding: 14px;
    background: var(--surface); border: 1px solid var(--border-soft); border-radius: 20px;
    box-shadow: 0 28px 56px -24px rgba(21, 24, 59, .38), 0 2px 6px rgba(21, 24, 59, .06);
    animation: pbar-dd-in .16s ease-out;
}
.dr-presets { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--border-soft); }
.dr-presets button { height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--surface-3); font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.dr-presets button:hover { background: var(--accent-soft); color: var(--accent-text); }
.dr-cal { position: relative; }
.dr-nav { position: absolute; top: 0; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; border: 0; background: none; color: var(--text-2); cursor: pointer; }
.dr-nav:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.dr-nav:disabled { opacity: .3; cursor: default; }
.dr-prev { left: 0; }
.dr-prev svg { transform: rotate(180deg); }
.dr-next { right: 0; }
.dr-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 22px; }
.dr-title { height: 32px; display: grid; place-items: center; font-size: 14.5px; font-weight: 700; }
.dr-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; margin-top: 6px; }
.dr-wd { height: 26px; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.dr-day {
    position: relative; height: 36px; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 550; color: var(--text);
    font-variant-numeric: tabular-nums; cursor: pointer; border-radius: 10px;
}
.dr-day:hover:not(:disabled):not(.is-a):not(.is-b) { background: var(--surface-3); }
.dr-day.is-dis { color: var(--text-3); opacity: .38; cursor: default; }
.dr-day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.dr-day.is-in { background: var(--accent-soft); color: var(--accent-text); border-radius: 0; }
.dr-day.is-a, .dr-day.is-b { background: var(--ink-grad); color: #fff; font-weight: 700; }
.dr-day.is-a.is-today::after, .dr-day.is-b.is-today::after { background: #fff; }
.dr-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.dr-sum { font-size: 13px; color: var(--text-2); }
.dr-sum b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.dr-ft .btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 640px) {
    /* A phone: the calendar comes up from the bottom, over the menu, never wider than the screen. */
    .pbar-range .dr { position: fixed; left: 10px !important; right: 10px; top: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none;
        z-index: 90; padding: 12px; border-radius: 22px; box-shadow: 0 -10px 40px -12px rgba(11, 13, 32, .45), 0 0 0 1px rgba(13, 15, 35, .06); animation: dr-up .22s cubic-bezier(.2, .8, .2, 1); }
    .dr-day { height: 38px; }
    .dr-presets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 10px; padding: 0 12px 12px; }
    .dr-presets::-webkit-scrollbar { display: none; }
    .dr-presets button { flex: none; }
    .dr-ft { flex-wrap: wrap; }
    .dr-ft .btn { flex: 1; justify-content: center; }
}
@keyframes dr-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pbar-range .dr { animation: none; } }
/* Ko'rishlar tab: the numbers carry a sentence, so the card's foot reads as text */
.ax-says .ax-kpi-foot { min-height: 0; }
.ax-says .ax-kpi-sub { font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.ax-says .ax-kpi-val { font-size: 34px; }
@media (max-width: 560px) { .ax-says .ax-kpi-val { font-size: 24px; } .ax-says .ax-kpi-sub { font-size: 12.5px; } }
.ax-says-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .ax-says-2 { grid-template-columns: minmax(0, 1fr); } }

/* ===== Ko'rishlar tab: our own reading (jumps, trend, comparison) ===== */
.vw-spikes { display: flex; flex-direction: column; gap: 8px; }
.vw-spike { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2, #F7F6FC); }
.vw-spike-say { font-size: 14.5px; line-height: 1.5; color: var(--text); }
.vw-spike-say b { font-weight: 700; }
.vw-spike-p { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-soft); color: var(--text); text-decoration: none; }
.vw-spike-p:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.vw-spike-p img { flex: none; width: 40px; height: 71px; border-radius: 8px; object-fit: cover; background: var(--surface-3); }
.vw-spike-p span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vw-spike-p b { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw-spike-p small { font-size: 12px; color: var(--text-3); }
.vw-spike-p .vw-spike-k { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #0F9F55; }
.vw-spike-none { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.vw-say { margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; background: var(--surface-3); color: var(--text); }
.vw-say.vw-up { background: #E8F8EF; color: #0B6B3A; }
.vw-say.vw-down { background: #FEECEB; color: #A8231B; }
.vw-src { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.vw-foot { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.vw-cmp { display: flex; flex-direction: column; gap: 8px; }
.vw-cmp > div { display: grid; grid-template-columns: 100px minmax(0, 1fr) 64px; align-items: center; gap: 12px; font-size: 13.5px; }
.vw-cmp span { font-weight: 600; }
.vw-cmp > div > i { position: relative; height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.vw-cmp > div > i > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--dv-1); }
.vw-cmp .is-them > i > i { background: #B9B6CC; }
.vw-cmp b { text-align: right; font-variant-numeric: tabular-nums; }
.vw-cmp small { font-size: 12px; color: var(--text-3); }

/* ===== Faollik tab ===== */
.vw-tips { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.vw-tips li { position: relative; padding: 9px 12px 9px 32px; border-radius: 12px; background: #FFF6E5; font-size: 13.5px; line-height: 1.5; color: #7A4B00; }
.vw-tips li::before { content: "→"; position: absolute; left: 12px; top: 9px; font-weight: 700; }
.vw-valued { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.vw-val { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border-radius: 16px; background: var(--surface-2, #F7F6FC); }
.vw-val-h { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.vw-val-h .ax-ic { width: 30px; height: 30px; border-radius: 10px; }
.vw-val-h b { font-size: 14px; font-weight: 700; }
.vw-val-p { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px; border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; }
.vw-val-p:hover { text-decoration: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ax) 35%, transparent); }
.vw-val-p img, .vw-val-p > i { flex: none; width: 34px; height: 60px; border-radius: 8px; object-fit: cover; background: var(--surface-3); }
.vw-val-p span { display: flex; flex-direction: column; min-width: 0; }
.vw-val-p b { font-size: 13px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vw-val-p small { margin-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--ax); }
.vw-val-none { font-size: 13px; color: var(--text-3); padding: 6px; }
@media (max-width: 900px) { .vw-valued { grid-template-columns: minmax(0, 1fr); } }

/* ===== Faollik: post text and comments (our own reading) ===== */
.cf-list { display: flex; flex-direction: column; gap: 8px; }
.cf-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2, #F7F6FC); }
.cf-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface); color: var(--accent-text); }
.cf-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cf-t b { font-size: 14px; font-weight: 650; }
.cf-t small { font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.cf-x { padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--text-2); }
.cf-x.is-pos { background: var(--pos-soft); color: var(--pos); }
.cf-x.is-neg { background: var(--neg-soft); color: var(--neg); }
.cf-try { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #FFF6E5; color: #7A4B00; font-size: 13px; line-height: 1.5; }
.cf-try svg { flex: none; margin-top: 2px; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cm-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2, #F7F6FC); font-size: 13px; color: var(--text-2); }
.cm-chip b { font-size: 16px; font-weight: 750; color: var(--text); font-variant-numeric: tabular-nums; }
.cm-chip.is-warn { background: var(--neg-soft); } .cm-chip.is-warn b { color: var(--neg); }
.cm-chip.is-ok { background: var(--pos-soft); } .cm-chip.is-ok b { color: var(--pos); }
.cm-chip.is-lead { background: #EEF4FF; } .cm-chip.is-lead b { color: #2B59C3; }
.cm-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; }
.cm-cols.is-one { grid-template-columns: minmax(0, 1fr); }
.cm-list, .cm-fans { display: flex; flex-direction: column; gap: 6px; }
.cm-item, .cm-fan { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--border-soft); background: var(--surface); color: var(--text); text-decoration: none; }
.cm-item:hover, .cm-fan:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.cm-fan { align-items: center; }
.cm-ava { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 700; }
.cm-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cm-t b { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-q { margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: #FFF1D6; color: #8A5300; font-size: 11px; font-style: normal; font-weight: 700; }
.cm-text { font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cm-t small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-go { flex: none; align-self: center; color: var(--text-3); }
.cm-fan-say { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
@media (max-width: 900px) { .cm-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
    .cf-row { grid-template-columns: 32px minmax(0, 1fr); } .cf-x { grid-column: 2; justify-self: start; }
    .cm-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .cm-chip { flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; font-size: 12px; line-height: 1.3; }
}

/* Reels summary row: plain sentence under each number */
.ax-strip.rl-plain { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ax-strip.rl-plain span { color: var(--text-2); font-weight: 600; white-space: normal; }
@media (max-width: 1240px) and (min-width: 641px) {
    .ax-strip.rl-plain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ax-strip.rl-plain > div:nth-child(3n+1) { border-left: 0; }
    .ax-strip.rl-plain > div:nth-child(n+4) { border-top: 1px solid var(--border-soft); }
}
.ax-strip.rl-plain b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ax-strip.rl-plain small { margin-top: 4px; font-size: 12.5px; line-height: 1.4; }
.rl-tag { padding: 2px 8px; border-radius: 999px; font-family: var(--font-body, inherit); font-size: 11.5px; font-weight: 700; font-style: normal; letter-spacing: 0; }
.rl-tag.is-good { background: var(--pos-soft); color: var(--pos); }
.rl-tag.is-mid { background: #FFF1D6; color: #8A5300; }
.rl-tag.is-bad { background: var(--neg-soft); color: var(--neg); }

/* ===== Obunachilar tab: forecast, posts that brought followers, followers vs engaged ===== */
.fc-rate { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--pos-soft); }
.fc-rate b { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -.04em; color: var(--pos); font-variant-numeric: tabular-nums; }
.fc-rate span { font-size: 12.5px; color: var(--text-2); }
.fc-rate.is-down { background: var(--neg-soft); } .fc-rate.is-down b { color: var(--neg); }
.fc-goal { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 16px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.fc-goal-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--accent-text); }
.fc-goal > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.fc-goal small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.fc-goal b { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fc-goal em { font-style: normal; font-size: 13px; color: var(--text-2); }
.fc-list { display: flex; flex-direction: column; margin-top: 12px; }
.fc-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--border-soft); font-size: 13.5px; }
.fc-list > div:first-child { border-top: 0; }
.fc-list span { color: var(--text-2); }
.fc-list b { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.fc-pill { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-style: normal; font-weight: 700; }
.fc-pill.is-pos { background: var(--pos-soft); color: var(--pos); }
.fc-pill.is-neg { background: var(--neg-soft); color: var(--neg); }
.fc-src { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12px; color: var(--text-3); }
.fp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.fp-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 8px; border-radius: 16px; background: var(--surface-2, #F7F6FC); color: var(--text); text-decoration: none; }
.fp-card:hover { text-decoration: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.fp-img { position: relative; display: block; aspect-ratio: 9 / 16; max-height: 220px; border-radius: 12px; overflow: hidden; background: var(--surface-3); }
.fp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fp-img i { position: absolute; top: 8px; left: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: rgba(15, 17, 36, .72); color: #fff; font-size: 12px; font-style: normal; font-weight: 700; }
.fp-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 4px 4px; }
.fp-n { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--pos); line-height: 1.1; }
.fp-u { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.fp-cap { font-size: 13px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fp-t > small:last-child { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.pr-key { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; font-size: 12.5px; color: var(--text-2); }
.pr-key span { display: inline-flex; align-items: center; gap: 6px; }
.pr-key span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--dv-1); }
.pr-key .pr-kb::before { background: var(--dv-5); }
.pr-say { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, #F7F6FC); font-size: 13.5px; line-height: 1.5; color: var(--text); }
.pr-rows { display: flex; flex-direction: column; gap: 10px; }
.pr-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 92px; align-items: center; gap: 12px; }
.pr-lbl { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-bars { display: flex; flex-direction: column; gap: 3px; }
.pr-bars i { display: block; height: 7px; border-radius: 999px; background: var(--dv-1); }
.pr-bars i.pr-b { background: var(--dv-5); }
.pr-v { display: flex; justify-content: flex-end; gap: 10px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pr-va { color: var(--dv-1); } .pr-vb { color: var(--dv-5); }
@media (max-width: 1100px) { .fp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fp-grid > :nth-child(n+4) { display: none; } }
@media (max-width: 640px) {
    .fp-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -16px; padding: 0 16px 4px; }
    .fp-grid > .fp-card { flex: 0 0 46%; scroll-snap-align: start; } .fp-grid > :nth-child(n+4) { display: flex; }
    .pr-row { grid-template-columns: 74px minmax(0, 1fr) 84px; gap: 8px; }
}

/* ===== Followers map ===== */
.gm-wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); gap: 20px; align-items: start; }
.gm-map { position: relative; border-radius: 18px; background: radial-gradient(120% 90% at 30% 20%, #FAF8FF 0%, #F3F0FC 100%); padding: 10px; overflow: hidden; }
.gm-svg { display: block; width: 100%; height: auto; }
.gm-c path { stroke: #fff; stroke-width: .6; stroke-linejoin: round; transition: opacity .15s; }
.gm-c path:hover { opacity: .82; }
.gm-b circle { fill: #fff; stroke: rgba(15, 17, 36, .06); stroke-width: 1; filter: drop-shadow(0 2px 4px rgba(15, 17, 36, .12)); }
.gm-b text { fill: #14162B; font-family: var(--font-display); font-weight: 800; text-anchor: middle; dominant-baseline: central; letter-spacing: -.02em; }
.gm-rank { display: flex; flex-direction: column; gap: 2px; }
.gm-rank-h { margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.gm-r { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "n name pct" ". bar bar" ". eng eng"; column-gap: 8px; row-gap: 3px; padding: 6px 8px; border-radius: 12px; }
.gm-r.is-top { background: var(--accent-soft); }
.gm-r > i { grid-area: n; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-style: normal; font-weight: 700; }
.gm-r.is-top > i { background: #6A4CFF; color: #fff; }
.gm-rn { grid-area: name; align-self: center; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-r > b { grid-area: pct; align-self: center; font-family: var(--font-display); font-size: 15px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gm-rb { grid-area: bar; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.gm-rb i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8D7BF7, #6A4CFF); }
.gm-r small { grid-area: eng; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11.5px; }
.gm-r small span { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gm-r small em { font-style: normal; font-weight: 600; color: var(--dv-5); }
.gm-reg path { stroke-width: 1.4; }
.gd-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gd-t { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--dv-1) 9%, var(--surface)); }
.gd-t.is-b { background: color-mix(in srgb, var(--dv-5) 9%, var(--surface)); }
.gd-t span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.gd-t b { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -.04em; color: var(--dv-1); font-variant-numeric: tabular-nums; }
.gd-t.is-b b { color: var(--dv-5); }
.gd-t small { font-size: 12px; color: var(--text-3); }
.gd-bar { display: flex; height: 12px; margin-top: 14px; border-radius: 999px; overflow: hidden; gap: 3px; }
.gd-bar i { display: block; height: 100%; background: var(--dv-1); border-radius: 999px; } .gd-bar i.is-b { background: var(--dv-5); }

.gm-wrap.is-wide { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.gm-wrap.is-wide .gm-rank { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 12px; }
.gm-wrap.is-wide .gm-rank-h { grid-column: 1 / -1; margin-bottom: 0; }
@media (max-width: 900px) { .gm-wrap { grid-template-columns: minmax(0, 1fr); } .gm-wrap.is-wide .gm-rank { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .gm-map { padding: 4px; border-radius: 14px; } }
.gm-bn rect { fill: #fff; fill-opacity: .94; filter: drop-shadow(0 1px 3px rgba(15, 17, 36, .14)); }
.gm-bn text { fill: #2A2547; font-family: var(--font-body); font-weight: 600; letter-spacing: .01em; text-anchor: middle; dominant-baseline: central; }
@media (max-width: 520px) { .gm-bn { display: none; } }
@media (max-width: 640px) { .gm-wrap.is-wide .gm-rank { grid-template-columns: minmax(0, 1fr); } }
.fc-goals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fc-goals li { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; }
.fc-goals li > i { position: relative; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #C9BEFB; background: var(--surface); justify-self: center; z-index: 1; }
.fc-goals li:not(:last-child)::after { content: ""; position: absolute; left: 8px; top: 24px; bottom: -8px; width: 2px; background: #E6E0FD; }
.fc-goals li.is-next > i { border-color: #6A4CFF; background: #6A4CFF; box-shadow: 0 0 0 4px rgba(106, 76, 255, .16); }
.fc-goals b { font-family: var(--font-body); font-size: 16px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; color: var(--text); }
.fc-goals li.is-next b { color: var(--accent-text); }
.fc-goals span { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; font-weight: 600; color: var(--text); text-align: right; }
.fc-goals small { font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.fc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; }
.fc-week > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.fc-week i { display: block; width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: #DCD4FD; }
.fc-week em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fc-week span { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.fc-week .is-best i { background: linear-gradient(180deg, #8D7BF7, #6A4CFF); }
.fc-week .is-best em { color: var(--accent-text); }
.fc-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, #F7F6FC); font-size: 13px; line-height: 1.5; color: var(--text); }
.ax-grid-2.fl-top { align-items: start; }
.fl-spikes .vw-spikes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }

/* ===== Vaqt tab: plan, rhythm, online hours with your posts ===== */
.tm-strip b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tm-strip small { margin-top: 4px; font-size: 12.5px; line-height: 1.4; }
.tm-strip span { color: var(--text-2); font-weight: 600; white-space: normal; }
.tm-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tm-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px; background: var(--surface-2, #F7F6FC); border: 1px solid transparent; min-width: 0; }
.tm-dn { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.tm-day b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.tm-day b.tm-off { color: var(--text-3); font-weight: 500; }
.tm-day small { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.tm-day.is-on { background: #6A4CFF; border-color: #6A4CFF; box-shadow: 0 8px 20px rgba(106, 76, 255, .25); }
.tm-day.is-on .tm-dn { color: rgba(255, 255, 255, .75); }
.tm-day.is-on b { color: #fff; }
.tm-day.is-on small { color: #DCD4FF; }
.tm-why { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tm-why li { position: relative; padding: 9px 12px 9px 32px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.tm-why li::before { position: absolute; left: 12px; top: 9px; font-weight: 800; }
.tm-why li.is-up { background: var(--pos-soft); color: #0B6B3A; } .tm-why li.is-up::before { content: "↑"; }
.tm-why li.is-down { background: #FFF6E5; color: #7A4B00; } .tm-why li.is-down::before { content: "↓"; }
.tm-hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; height: 230px; align-items: end; }
.tm-h { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.tm-h > i { display: block; width: 100%; max-width: 22px; border-radius: 6px 6px 3px 3px; background: #E2DCFD; }
.tm-h.is-busy > i { background: linear-gradient(180deg, #A897FA, #8D7BF7); }
.tm-h.is-peak > i { background: linear-gradient(180deg, #8D7BF7, #6A4CFF); }
.tm-dots { display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; height: 30px; padding-top: 4px; justify-content: flex-start; }
.tm-dots em { display: block; width: 7px; height: 7px; border-radius: 50%; background: #F08A5D; }
.tm-h small { height: 14px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tm-key { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.tm-key span { display: inline-flex; align-items: center; gap: 6px; }
.tm-key .tm-k1::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: #8D7BF7; }
.tm-key .tm-k2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #F08A5D; }
@media (max-width: 640px) {
    .tm-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .tm-hours { gap: 2px; height: 190px; }
    .tm-dots em { width: 5px; height: 5px; }
}


/* ===== Tahlil dashboard (light + violet): numbers, weeks, best videos, topic × format, days, AI notes ===== */
.td-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.td-kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--sh-card, none); min-width: 0; }
.td-kpi span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.td-kpi b { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.td-kpi b em { font-family: var(--font-body); font-size: 15px; font-weight: 600; font-style: normal; letter-spacing: 0; color: var(--text-3); }
.td-kpi small { font-size: 12.5px; line-height: 1.4; color: var(--text-3); }
.td-row { display: grid; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.td-row-a { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.td-row-b { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.td-row-b > :only-child { grid-column: 1 / -1; }
.td-chart { display: block; width: 100%; height: auto; }
.td-grid { stroke: var(--border-soft); stroke-width: 1; }
.td-ax { fill: var(--text-3); font-size: 11px; text-anchor: end; dominant-baseline: middle; }
.td-x { fill: var(--text-3); font-size: 11px; text-anchor: middle; }
.td-line { fill: none; stroke: #6A4CFF; stroke-width: 3; stroke-linecap: round; }
.td-med { stroke: #14162B; stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .45; }
.td-med-t { fill: var(--text-2); font-size: 11px; font-weight: 700; text-anchor: end; }
.td-pt { fill: #fff; stroke: #B8AAFB; stroke-width: 2.5; }
.td-pt.is-up { stroke: #6A4CFF; }
.td-pt:hover { r: 7; }
.td-say { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, #F7F6FC); font-size: 13.5px; line-height: 1.5; color: var(--text); }
.td-say.is-up { margin: 0 0 14px; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.td-top { display: flex; flex-direction: column; gap: 4px; }
.td-v { display: grid; grid-template-columns: 16px 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px; border-radius: 14px; color: var(--text); text-decoration: none; }
.td-v:hover { text-decoration: none; background: var(--surface-2, #F7F6FC); }
.td-v-n { font-size: 12px; font-weight: 700; color: var(--text-3); text-align: center; }
.td-v-th { width: 34px; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.td-v-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.td-v-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.td-v-t b { font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.td-v-t small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-v-x { padding: 4px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.td-v-x.tz-hi, .td-v-x.tz-up { background: var(--pos-soft); color: var(--pos); }
.td-v-x.tz-down { background: var(--neg-soft); color: var(--neg); }
.td-mx-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.td-mx { width: 100%; border-collapse: separate; border-spacing: 5px; table-layout: fixed; min-width: 520px; }
.td-mx th { font-size: 12px; font-weight: 600; color: var(--text-2); text-align: left; vertical-align: bottom; padding: 0 4px 4px; }
.td-mx thead th span { display: block; line-height: 1.3; }
.td-mx tbody th { width: 30%; padding: 0 8px 0 0; vertical-align: middle; font-size: 13px; color: var(--text); line-height: 1.3; }
.td-mx td { height: 52px; border-radius: 10px; text-align: center; vertical-align: middle; color: var(--text); }
.td-mx td b { display: block; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.td-mx td small { font-size: 10.5px; color: var(--text-3); }
.td-mx td.is-dark { color: #fff; } .td-mx td.is-dark small { color: rgba(255, 255, 255, .75); }
.td-mx td.is-empty { background: var(--surface-2, #F7F6FC); color: var(--text-3); font-size: 13px; }
.td-days { display: flex; flex-direction: column; gap: 12px; }
.td-day { display: grid; grid-template-columns: 92px minmax(0, 1fr) 82px; align-items: center; gap: 12px; }
.td-day-n { font-size: 13.5px; font-weight: 600; }
.td-day b { text-align: right; font-size: 14px; font-weight: 800; white-space: nowrap; }
.td-day b.tz-hi, .td-day b.tz-up { color: var(--pos); } .td-day b.tz-down { color: var(--neg); } .td-day b.tz-flat { color: var(--text-3); font-weight: 600; font-size: 12.5px; }
.td-day.is-few { opacity: .55; } .td-day.is-few b { color: var(--text-3); font-weight: 600; font-size: 12.5px; }
.td-notes { display: flex; flex-direction: column; gap: 8px; }
.td-note { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border-soft); }
.td-note p { margin: 0; font-size: 14px; line-height: 1.5; }
.td-note-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; }
.td-note.is-pos .td-note-ic { background: var(--pos-soft); color: var(--pos); }
.td-note.is-neg .td-note-ic { background: var(--neg-soft); color: var(--neg); }
.td-note-tag { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.td-note.is-pos .td-note-tag { background: var(--pos-soft); color: var(--pos); }
.td-note.is-neg .td-note-tag { background: var(--neg-soft); color: var(--neg); }
.td-notes-card { margin-bottom: 16px; }
@media (max-width: 1180px) { .td-row-a, .td-row-b { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
    .td-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .td-kpi { padding: 14px; } .td-kpi b { font-size: 24px; }
    .td-ax { display: none; } .td-x, .td-med-t { font-size: 20px; } .td-pt { r: 7; }
    .td-day { grid-template-columns: 72px minmax(0, 1fr) 70px; gap: 8px; }
    .td-note { grid-template-columns: 30px minmax(0, 1fr); } .td-note-tag { grid-column: 2; justify-self: start; }
}

/* ===== AI yordamchi — polish: compact header, one tab bar, a tidy form, a lighter answer ===== */
.ai-head { align-items: center; margin-bottom: 18px; }
.ai-head h1 { font-size: clamp(26px, 2.6vw, 34px); }
.ai-head-orb { --s: 46px; }
.ai-quota { display: flex; align-items: center; gap: 14px; width: auto; padding: 8px 8px 8px 16px; border-radius: 999px; box-shadow: var(--sh-card); }
.ai-quota-top { margin: 0; gap: 8px; align-items: center; white-space: nowrap; }
.ai-quota-top span { font-size: 12.5px; }
.ai-quota-top b { font-size: 16px; }
.ai-quota .meter { width: 92px; height: 6px; margin: 0; }
.ai-quota-go { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ai-quota-go:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }

.ai-modes { display: flex; gap: 4px; width: fit-content; max-width: 100%; padding: 5px; margin-bottom: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--sh-card); overflow-x: auto; scrollbar-width: none; }
.ai-modes::-webkit-scrollbar { display: none; }
.ai-mode { flex: 0 0 auto; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border: 0; border-radius: 14px; background: transparent; box-shadow: none; }
.ai-mode:hover { background: var(--surface-2, #F7F6FC); border: 0; box-shadow: none; }
.ai-mode-ic { width: 34px; height: 34px; border-radius: 10px; }
.ai-mode-text b { font-size: 14.5px; }
.ai-mode[aria-selected="true"] { border: 0; background: var(--accent-soft); box-shadow: none; }
.ai-mode[aria-selected="true"] .ai-mode-text b { color: var(--accent-text); }
.ai-mode-tag { position: static; align-self: center; margin-left: -2px; }
.ai-mode:has(.ai-mode-tag) .ai-mode-text { padding-right: 0; }

.ai-work { gap: 18px; }
.ai-form { gap: 14px; }
.ai-form .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.ai-form .textarea { min-height: 96px; }
.ai-presets { gap: 6px; margin-bottom: 16px; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--surface-2, #F7F6FC); }
.ai-presets .chip { height: 28px; padding: 0 11px; font-size: 12.5px; background: var(--surface); }
.ai-suggest-goal { margin-top: -6px; }
.ai-seg span { padding: 6px 11px; font-size: 12.5px; }
.ai-submit { gap: 6px; padding-top: 2px; }
.ai-submit .btn-lg { height: 52px; gap: 8px; }
.ai-cost { margin-left: 6px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: 12px; font-weight: 700; }

.ai-result .card-hd { gap: 10px; }
.ai-actions .btn { height: 32px; font-size: 12.5px; }
.air-summary { padding: 12px 14px; border-radius: 14px; }
.air-summary p { font-size: 14px; line-height: 1.55; }
.air-cols { gap: 10px; }
.air-box { padding: 12px 13px; border: 0; border-radius: 14px; background: var(--surface-2, #F7F6FC); }
.air-box-hd { display: flex; align-items: center; gap: 6px; font-size: 11px; margin-bottom: 8px; }
.air-box-hd::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.air-good .air-box-hd { color: var(--pos); }
.air-bad .air-box-hd { color: #B7791F; }
.air-box ul { gap: 7px; }
.air-box li { font-size: 12.5px; line-height: 1.45; }
.air-sec h4 { font-size: 15px; }
.air-ideas { gap: 6px; }
.air-idea { border-radius: 14px; }
.air-idea summary { padding: 11px 12px; gap: 9px; }
.air-idea-title { font-size: 14px; }
.air-idea-bd { padding: 0 14px 14px 46px; gap: 9px; }
.air-concept { font-size: 13.5px; color: var(--text-2); }
.air-hookbox > div { border-left: 0; border-radius: 12px; background: var(--surface-2, #F7F6FC); }
.air-hookbox b { font-size: 13.5px; }
.air-facts { gap: 12px; }
.air-plan { border: 0; gap: 6px; border-radius: 0; overflow: visible; }
.air-plan-row { border: 0; border-radius: 12px; background: var(--surface-2, #F7F6FC); padding: 10px 12px; }
@media (max-width: 1180px) { .ai-modes { width: 100%; } }
@media (max-width: 640px) {
    .ai-head { flex-wrap: wrap; }
    .ai-quota { width: 100%; justify-content: space-between; }
    .ai-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; padding: 4px; border-radius: 16px; overflow: visible; }
    .ai-mode { flex-direction: column; gap: 4px; padding: 8px 4px; text-align: center; }
    .ai-mode-ic { width: 30px; height: 30px; }
    .ai-mode-text b { font-size: 12px; line-height: 1.25; }
    .ai-mode-tag { display: none; }
    .ai-form .grid-2 { grid-template-columns: minmax(0, 1fr); }
    .air-idea-bd { padding: 0 12px 12px; }
}

/* AI yordamchi: one screen at a time — the form, then the answer at full width */
.ai-work.is-form { grid-template-columns: minmax(0, 780px); justify-content: center; }
.ai-work.is-form .ai-out-col { display: none; }
.ai-work.is-out { grid-template-columns: minmax(0, 1fr); }
.ai-work.is-out .ai-form-col { display: none; }
.ai-work.is-out .ai-out-col { position: static; }
.ai-out-col [data-air-side] { display: block; }
.ai-side { display: none !important; }
.ai-brief { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 24px 0; }
.ai-brief span { display: inline-flex; align-items: center; max-width: 100%; padding: 5px 11px; border-radius: 999px; background: var(--surface-2, #F7F6FC); font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-brief span:first-child { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.ai-back { display: flex; justify-content: center; margin: -4px 0 10px; }
.ai-back svg { transform: rotate(180deg); }
.ai-work.is-out .air-niche-slot, .ai-work.is-out .air-vids { margin-top: 18px; }
@media (max-width: 640px) { .ai-brief { padding: 12px 16px 0; } .ai-actions { flex-wrap: wrap; } }

/* ===== AI yordamchi: the plan brief as one composer (v99) =====
   One large text box for the business; the optional facts sit as pills in
   its bottom bar and open small panels. Examples below as starter cards. */
.ai-plan { overflow: visible; background: radial-gradient(120% 60% at 50% -8%, rgba(124, 92, 255, .11), rgba(255, 122, 154, .04) 45%, transparent 70%), var(--surface); }
.ai-work.is-form:has(#tp-ai-plan:not([hidden])) { grid-template-columns: minmax(0, 900px); }
.ai-plan > .card-bd { padding: 40px 36px 32px; }
.ai-hero { text-align: center; max-width: 600px; margin: 0 auto 24px; }
.ai-hero h2 { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 1.18; font-weight: 800; letter-spacing: -.025em; color: var(--text); }
.ai-hero-get { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 12px 0 0; padding: 0; font-size: 13px; color: var(--text-2); }
.ai-hero-get li { display: inline-flex; align-items: center; gap: 6px; }
.ai-hero-get svg { flex: none; color: var(--accent); }

.ai-compose {
    position: relative; border: 1px solid #E2E0EE; border-radius: 24px; background: #fff;
    box-shadow: 0 1px 2px rgba(13, 15, 35, .04), 0 22px 44px -26px rgba(44, 32, 120, .38);
    transition: border-color var(--t-fast), box-shadow var(--t);
}
.ai-compose:hover { border-color: #D3D0E4; }
.ai-compose:focus-within { border-color: #C9BDFF; box-shadow: 0 0 0 4px var(--accent-ring), 0 22px 44px -26px rgba(44, 32, 120, .38); }
.ai-compose:has(textarea[aria-invalid="true"]) { border-color: var(--neg); box-shadow: 0 0 0 4px var(--neg-soft); }
.ai-compose-in { position: relative; }
.ai-compose-text {
    display: block; width: 100%; min-height: 132px; max-height: 320px; padding: 22px 24px 10px;
    border: 0; outline: 0; resize: none; background: transparent; border-radius: 24px 24px 0 0;
    font: inherit; font-size: 16px; line-height: 1.6; color: var(--text);
}
.ai-compose-text::placeholder { color: #9EA3B8; }
.ai-compose .ai-count { position: absolute; right: 20px; bottom: 0; opacity: 0; transition: opacity var(--t-fast); }
.ai-compose .ai-count.is-on { opacity: 1; }
.ai-cbar { padding: 6px 12px 12px 14px; }
.ai-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-cfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.ai-cfoot .ai-submit-hint { width: auto; justify-content: flex-start; padding-left: 4px; text-align: left; }

.ai-opt { position: relative; }
.ai-opt > summary {
    list-style: none; display: inline-flex; align-items: center; gap: 6px; max-width: 230px; height: 34px; padding: 0 12px;
    border: 1px dashed #CFCDDD; border-radius: 999px; background: transparent; cursor: pointer; user-select: none;
    font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.ai-opt > summary::-webkit-details-marker { display: none; }
.ai-opt > summary svg { flex: none; color: var(--text-3); transition: color var(--t-fast); }
.ai-opt > summary:hover { border-color: #B9B6CE; border-style: solid; background: var(--surface-2); color: var(--text); }
.ai-opt > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ai-opt-val { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ai-opt.is-set .ai-opt-name { display: none; }
.ai-opt.is-set .ai-opt-val { display: block; }
.ai-opt.is-set > summary { border: 1px solid #DCD3FF; background: var(--accent-soft); color: var(--accent-text); padding-right: 6px; }
.ai-opt.is-set > summary svg { color: var(--accent); }
.ai-opt[open] > summary { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.ai-opt[open] > summary svg { color: var(--accent); }
.ai-opt-x { display: none; flex: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--accent-text); opacity: .65; transition: background var(--t-fast), opacity var(--t-fast); }
.ai-opt-x svg { color: inherit !important; }
.ai-opt.is-set .ai-opt-x { display: inline-grid; }
.ai-opt-x:hover { opacity: 1; background: rgba(106, 76, 255, .14); }

.ai-pop {
    position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: 310px; max-width: calc(100vw - 48px);
    padding: 12px; border-radius: 18px; background: #fff; border: 1px solid var(--border);
    box-shadow: 0 4px 10px rgba(13, 15, 35, .05), 0 26px 50px -18px rgba(30, 22, 90, .36);
    animation: aiPop .16s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes aiPop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.ai-pop .input { height: 42px; background: var(--surface-2); }
.ai-pop .input:focus { background: #fff; }
.ai-pop-lbl { display: block; margin: 2px 4px 9px; font-size: 13px; font-weight: 650; color: var(--text); }
.ai-pop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-pop-chips .chip { height: 29px; cursor: pointer; font-family: inherit; }
.ai-pop-chips .chip:hover { border-color: #D3CAFF; background: var(--accent-soft); color: var(--accent-text); }
.ai-menu { width: 230px; padding: 6px; }
.ai-menu label { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 11px; cursor: pointer; font-size: 13.5px; font-weight: 550; color: var(--text); }
.ai-menu label:hover { background: var(--surface-2); }
.ai-menu input { position: absolute; opacity: 0; pointer-events: none; }
.ai-menu label svg { flex: none; color: var(--accent); visibility: hidden; }
.ai-menu label:has(input:checked) { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; }
.ai-menu label:has(input:checked) svg { visibility: visible; }
.ai-menu label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }

.ai-send { flex: none; height: 46px; padding: 0 8px 0 20px; font-size: 14.5px; }
.ai-send .ai-cost { margin-left: 4px; padding: 5px 10px; background: rgba(255, 255, 255, .18); }
.ai-err { display: none; margin: 10px 8px 0; font-size: 12.5px; font-weight: 600; color: var(--neg); }
.ai-form:has(.ai-compose-text[aria-invalid="true"]) .ai-err { display: block; }

.ai-starters { display: block; margin: 30px 0 0; padding: 0; border: 0; border-radius: 0; background: none; }
.ai-starters .ai-presets-lbl { display: block; margin: 0 0 10px 6px; font-size: 12px; font-weight: 650; letter-spacing: .02em; color: var(--text-3); }
.ai-starter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ai-starter {
    display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 14px 15px; text-align: left;
    border: 1px solid var(--border); border-radius: 18px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text);
    transition: border-color var(--t-fast), box-shadow var(--t), transform var(--t-fast), background var(--t-fast);
}
.ai-starter:hover { border-color: #D6CEFF; box-shadow: var(--sh-md); transform: translateY(-2px); }
.ai-starter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ai-starter.is-active { border-color: var(--accent); background: #FBFAFF; box-shadow: 0 0 0 3px var(--accent-ring); }
.ai-starter b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.ai-starter small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--text-3); }
.ai-starter-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #F1EEFF; color: #6A4CFF; }
.ai-starter:nth-child(2) .ai-starter-ic { background: #FFF2E2; color: #C2610C; }
.ai-starter:nth-child(3) .ai-starter-ic { background: #FDEBF4; color: #C2337A; }
.ai-starter:nth-child(4) .ai-starter-ic { background: #E8F3FE; color: #1F74DB; }

@media (max-width: 900px) { .ai-starter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
    .ai-plan > .card-bd { padding: 26px 14px 18px; }
    .ai-hero { margin-bottom: 18px; }
    .ai-hero h2 { font-size: 23px; }
    .ai-hero-get { gap: 4px 12px; font-size: 12.5px; }
    .ai-compose { border-radius: 20px; }
    .ai-compose-text { min-height: 112px; padding: 18px 18px 8px; font-size: 15.5px; border-radius: 20px 20px 0 0; }
    .ai-cbar { padding: 4px 10px 10px; }
    .ai-opt > summary { max-width: 200px; }
    .ai-cfoot { flex-direction: column-reverse; align-items: stretch; gap: 8px; margin-top: 10px; padding-top: 10px; }
    .ai-cfoot .ai-submit-hint { width: 100%; justify-content: center; padding: 0; text-align: center; }
    .ai-send { width: 100%; justify-content: center; }
    .ai-err { text-align: center; }
    .ai-starter { flex-direction: row; align-items: center; gap: 10px; padding: 12px; }
    .ai-starter-ic { width: 32px; height: 32px; border-radius: 10px; }
}
@media (max-width: 380px) { .ai-starter-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===== AI result v2 (v100): the main conclusion as a dark focus card, the
   ideas as a list beside the open one with its first frame on a phone, and
   the 7 days as a week. The layout follows the answer's own width. ===== */
.air { container: air / inline-size; }
.air-focus {
    position: relative; overflow: hidden; padding: 24px 26px 0; border-radius: 22px; color: #fff;
    background:
        radial-gradient(80% 140% at 100% 0%, rgba(184, 77, 235, .42), transparent 58%),
        radial-gradient(60% 120% at 0% 100%, rgba(106, 76, 255, .38), transparent 62%),
        linear-gradient(180deg, #1C2048 0%, #0E1026 100%);
    box-shadow: 0 24px 48px -30px rgba(30, 22, 90, .8);
}
.air-focus-k { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .66); }
.air-focus-k i { width: 7px; height: 7px; border-radius: 50%; background: #FF7A9A; box-shadow: 0 0 0 4px rgba(255, 122, 154, .2), 0 0 14px rgba(255, 122, 154, .9); }
.air-focus > p { max-width: 860px; margin: 10px 0 0; font-size: 19px; line-height: 1.5; font-weight: 600; letter-spacing: -.01em; color: #fff; }
.air-focus-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 22px -26px 0; border-top: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); }
.air-focus-stats > div { min-width: 0; padding: 14px 26px 16px; border-left: 1px solid rgba(255, 255, 255, .1); }
.air-focus-stats > div:first-child { border-left: 0; }
.air-focus-stats span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .58); }
.air-focus-stats b { display: block; margin-top: 4px; font-size: 16px; font-weight: 700; line-height: 1.35; color: #fff; font-variant-numeric: tabular-nums; }

/* ideas: list + open idea */
.air-md { display: block; }
.air-nav { display: none; }
.air-idea-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.air-phone { display: none; }
@container air (min-width: 700px) {
    .air-md { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
    .air-nav { position: sticky; top: calc(var(--topbar-h, 60px) + 14px); display: flex; flex-direction: column; gap: 3px; padding: 6px; border-radius: 20px; background: var(--surface-2, #F7F6FC); }
    .air-nav-item {
        display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 11px 12px; text-align: left;
        border: 1px solid transparent; border-radius: 14px; background: transparent; cursor: pointer; font: inherit; color: var(--text);
        transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t);
    }
    .air-nav-item:hover { background: rgba(255, 255, 255, .75); }
    .air-nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
    .air-nav-item.is-on { background: #fff; border-color: #E2DAFF; box-shadow: 0 10px 22px -16px rgba(106, 76, 255, .7); }
    .air-nav-num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
    .air-nav-item.is-on .air-nav-num { border-color: transparent; background: var(--brand-grad); color: #fff; }
    .air-nav-bd { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
    .air-nav-bd > b { font-size: 13.5px; font-weight: 650; line-height: 1.35; }
    .air-nav-item.is-on .air-nav-bd > b { color: var(--accent-text); }
    .air-nav-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; font-size: 11.5px; color: var(--text-3); }
    .air-nav-meta .air-fmt, .air-nav-meta .air-pot, .air-nav-meta .air-agree { height: 20px; padding: 0 7px; font-size: 11px; }

    .air-md .air-ideas { display: block; }
    .air-md .air-idea:not([open]) { display: none; }
    .air-md .air-idea { border: 1px solid var(--border); border-radius: 22px; background: #fff; box-shadow: 0 1px 2px rgba(13, 15, 35, .03), 0 18px 40px -30px rgba(44, 32, 120, .45); }
    .air-md .air-idea > summary { flex-wrap: wrap; gap: 8px; padding: 20px 24px 0; cursor: default; }
    .air-md .air-idea > summary .air-num, .air-md .air-idea > summary .air-chev { display: none; }
    .air-md .air-idea > summary .air-fmt { order: 1; }
    .air-md .air-idea > summary .air-agree { order: 2; }
    .air-md .air-idea > summary .air-pot { order: 3; }
    .air-md .air-idea-title { order: 4; flex-basis: 100%; font-size: 21px; font-weight: 750; line-height: 1.3; letter-spacing: -.015em; color: var(--text) !important; }
    .air-md .air-idea-bd { padding: 14px 24px 0; gap: 14px; }
    .air-md .air-idea-main { gap: 12px; }
    .air-md .air-script-slot { grid-column: 1 / -1; margin: 0 -24px; padding: 14px 24px; border-top: 1px solid var(--border-soft); border-radius: 0 0 22px 22px; background: var(--surface-2, #F7F6FC); }
    .air-md .air-script-slot:has(.ais) { display: block; margin: 0; padding: 4px 0 22px; border: 0; background: none; }
    .air-md .air-idea-bd:has(.ais) { padding-bottom: 0; }
    .air-md .air-concept { font-size: 15px; line-height: 1.6; color: var(--text); }
    .air-md .air-facts { gap: 6px; }
    .air-md .air-facts span { height: 28px; padding: 0 11px; border-radius: 999px; background: var(--surface-2, #F7F6FC); font-weight: 600; color: var(--text-2); }
    .air-md .air-why { padding: 12px 14px; border-radius: 14px; background: #F1FAF5; color: #1E5136; font-size: 13px; }
    .air-md .air-why svg { color: var(--pos); }
}

/* the week */
.air-week .air-plan-row { position: relative; }
.air-week .air-plan-row.is-link { cursor: pointer; transition: border-color var(--t-fast), box-shadow var(--t), transform var(--t-fast); }
.air-week .air-plan-row.is-link:hover { box-shadow: 0 0 0 1px #D6CEFF; }
.air-week-tag { display: flex; margin: 6px 0 2px; }
.air-week-fmt { height: 20px; padding: 0 8px; font-size: 11px; }
.air-week-fmt svg { display: none; }
.air-week .air-plan-row.is-today { background: var(--accent-soft); box-shadow: inset 0 0 0 1px #D9D0FF; }
.air-today { position: absolute; top: 10px; right: 12px; padding: 2px 8px; border-radius: 999px; background: var(--brand-grad); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; }
@container air (min-width: 860px) {
    .air-plan.air-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
    .air-week .air-plan-row { flex-direction: column; gap: 0; min-height: 150px; padding: 14px 12px; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
    .air-week .air-day { display: none; }
    .air-week .air-plan-text { display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
    .air-week .air-plan-text b { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
    .air-week .air-plan-text b span { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -.01em; text-transform: none; color: var(--text); }
    .air-week-tag { margin: 12px 0 0; }
    .air-week .air-plan-text > span:last-child { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
    .air-week .air-plan-row.is-link:hover { border-color: #D6CEFF; box-shadow: 0 14px 26px -20px rgba(106, 76, 255, .8); transform: translateY(-2px); }
    .air-week .air-plan-row.is-today { border-color: #CFC3FF; background: linear-gradient(180deg, #F5F2FF, #fff 70%); box-shadow: 0 0 0 3px var(--accent-ring); }
    .air-week .air-plan-row.is-today .air-plan-text b span { color: var(--accent-text); }
    .air-today { top: -10px; right: auto; left: 50%; transform: translateX(-50%); box-shadow: 0 6px 14px -6px rgba(184, 77, 235, .8); }
}
@container air (max-width: 520px) {
    .air-focus { padding: 20px 18px 0; border-radius: 18px; }
    .air-focus > p { font-size: 16.5px; }
    .air-focus-stats { grid-template-columns: minmax(0, 1fr); margin: 18px -18px 0; }
    .air-focus-stats > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 11px 18px; border-left: 0; }
    .air-focus-stats > div + div { border-top: 1px solid rgba(255, 255, 255, .1); }
    .air-focus-stats span { flex: none; }
    .air-focus-stats b { margin: 0; font-size: 14.5px; text-align: right; }
}
@container air (min-width: 600px) and (max-width: 859px) {
    .air-plan.air-week { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
}

/* ===== Raqobatchilar natijasi v2 (v103): the result numbers head to head
   (accounts in rank order), posting habits, gaps as now → what to do. ===== */
.cmp { gap: 16px; }
.cmp-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cmp-card { display: flex; flex-direction: column; min-width: 0; padding: 16px 16px 14px; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.cmp-card-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 36px; }
.cmp-card-nm { display: flex; flex-direction: column; min-width: 0; }
.cmp-card-k { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--text-2); }
.cmp-card-sub { margin-top: 1px; font-size: 11.5px; line-height: 1.3; color: var(--text-3); }
.cmp-rank { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--surface-2, #F7F6FC); font-size: 11px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.cmp-rank.is-top { background: var(--pos-soft); color: var(--pos); }
.cmp-card-v { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cmp-card-v b { font-size: 26px; font-weight: 750; line-height: 1.15; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.cmp-bars { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 12px; }
.cmp-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 5px 7px; font-size: 12px; }
.cmp-bar .cmp-av { width: 18px; height: 18px; font-size: 9px; }
.cmp-bar-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.cmp-bar-v { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp-bar-t { grid-column: 1 / -1; height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-2, #F7F6FC); }
.cmp-bar-t i { display: block; height: 100%; border-radius: inherit; background: #CDD0DB; }
.cmp-bar.is-me .cmp-bar-n, .cmp-bar.is-me .cmp-bar-v { color: var(--text); font-weight: 700; }
.cmp-bar.is-me .cmp-bar-t i { background: var(--brand-grad); }
.cmp-card-ft { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 11px; border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--text-3); }
.cmp-card-ft b { font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; }

.cmp-table tbody th { font-weight: 500; color: var(--text-2); }
.cmp .air-box { padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.cmp .air-box.air-good { border-color: #CFEEDC; background: linear-gradient(180deg, #F4FBF7, #fff 70%); }
.cmp .air-box li { font-size: 13.5px; }
.cmp-posts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.cmp-post { border-radius: 16px; }

.cmp-gaps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cmp-gap { display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.cmp-gap-hd b { font-size: 15px; line-height: 1.35; }
.cmp-gap .cmp-ev, .cmp-gap .cmp-fix { flex-direction: column; gap: 3px; margin-top: 12px; font-size: 13.5px; }
.cmp-gap .cmp-ev svg, .cmp-gap .cmp-fix svg { display: none; }
.cmp-gap .cmp-fix { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-soft); color: var(--text); }
.cmp-gap .cmp-ev { margin-bottom: 12px; }
.cmp-lbl { font-size: 10.5px; font-style: normal; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.cmp-fix .cmp-lbl { color: var(--pos); }

@container air (min-width: 560px) {
    .cmp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container air (min-width: 760px) {
    .cmp-gaps { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
    .cmp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container air (min-width: 980px) {
    .cmp-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   AI xotirasi v4 (xotira.php) — 2026-12-04
   One sheet, read top to bottom. Three sources, each a section: a narrow
   column on the left says where the knowledge came from, the rows on the
   right say what it is (label — value — what the reader can do about it).
   No band, no score, no cards inside cards.
   ========================================================================== */
.xo { container: xo / inline-size; display: flex; flex-direction: column; gap: 14px; }
.xo-top { margin-bottom: 0; }
.xo-sheet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-card); }

/* whose memory: tabs on the sheet's top edge */
.xo-tabs { display: flex; gap: 2px; padding: 0 18px; border-bottom: 1px solid var(--border-soft); overflow-x: auto; scrollbar-width: none; }
.xo-tabs::-webkit-scrollbar { display: none; }
.xo-tab {
    position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 12px;
    font-size: 13.5px; font-weight: 600; color: var(--text-3); white-space: nowrap; text-decoration: none; transition: color var(--t-fast);
}
.xo-tab:hover { color: var(--text); }
.xo-tab.is-on { color: var(--text); }
.xo-tab.is-on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand-grad-h); }
.xo-av {
    flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    font-size: 11px; font-weight: 700; line-height: 1; color: #fff; background: var(--brand-grad);
}
.xo-av-all { background: var(--navy); }
.xo-tab:not(.is-on) .xo-av { opacity: .62; }
.xo-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }

/* a section: where it came from | what it is */
.xo-sec {
    --xo-c: var(--accent); --xo-s: var(--accent-soft);
    display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 10px 40px; padding: 30px 32px;
    border-top: 1px solid var(--border-soft);
}
.xo-you { border-top: 0; background: linear-gradient(180deg, rgba(124, 92, 255, .05), rgba(124, 92, 255, 0) 78%); }
.xo-sheet > :first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.xo-vid { --xo-c: #C7388F; --xo-s: #FCEDF6; }
.xo-act { --xo-c: #0B8F80; --xo-s: #E4F6F3; }
.xo-hab { transition: opacity var(--t); }
.xo-hab.is-busy { opacity: .5; pointer-events: none; }

.xo-side { position: sticky; top: 22px; align-self: start; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.xo-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--xo-s); color: var(--xo-c); }
.xo-side-t { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.xo-side h2 { margin: 0 0 1px; font-family: var(--font-display); font-size: 16.5px; font-weight: 700; line-height: 1.28; letter-spacing: -.012em; color: var(--text); text-wrap: balance; }
.xo-meta { font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.xo-side-l { display: inline-flex; align-items: center; gap: 8px; }
.xo-prio { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--accent-text); }
.xo-link {
    display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent-text); text-decoration: none; transition: color var(--t-fast);
}
.xo-link:hover { color: var(--accent-press); }
.xo-link.is-quiet { color: var(--text-3); }
.xo-link.is-quiet:hover, .xo-link[data-sure] { color: var(--neg); }
/* the "?" opens under the column, not off the screen's edge */
.xo-side .hint { position: static; margin-left: 0; }
.xo-side h2 .hint { display: inline-grid; margin-left: 7px; vertical-align: 2px; font-family: var(--font-body); letter-spacing: 0; }
.xo-side .hint-pop { left: 0; right: auto; top: calc(100% + 8px); width: min(300px, 100%); max-width: none; }
.xo-status { padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 550; color: var(--text-3); text-align: left; opacity: 0; transition: opacity var(--t); cursor: default; }
.xo-status.is-on { opacity: 1; }
.xo-status.is-ok { color: var(--pos); }
.xo-status.is-err { color: var(--neg); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* rows */
.xo-body { min-width: 0; display: flex; flex-direction: column; }
.xo-rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.xo-row {
    position: relative; display: grid; grid-template-columns: 184px minmax(0, 1fr) auto; align-items: start; gap: 4px 20px;
    margin: 0 -12px; padding: 13px 12px; border-radius: 12px; transition: background var(--t-fast);
}
.xo-row + .xo-row::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--border-soft); transition: opacity var(--t-fast); }
.xo-row:hover { background: var(--surface-2); }
.xo-row:hover::before, .xo-row:hover + .xo-row::before { opacity: 0; }
.xo-k { padding-top: 1.5px; font-size: 13px; font-weight: 550; line-height: 1.5; color: var(--text-3); overflow-wrap: anywhere; }
.xo-v { min-width: 0; font-size: 14.5px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.xo-v p { margin: 0; }
.xo-lead .xo-v { font-size: 16.5px; font-weight: 600; line-height: 1.42; letter-spacing: -.008em; text-wrap: pretty; }
.xo-a { display: flex; gap: 2px; margin: -4px -6px -4px 0; opacity: 0; transition: opacity var(--t-fast); }
.xo-row:hover .xo-a, .xo-row:focus-within .xo-a { opacity: 1; }
@media (hover: none) { .xo-a { opacity: 1; } }
.xo-ib {
    display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 9px;
    background: none; color: var(--text-3); cursor: pointer; transition: background var(--t-fast), color var(--t-fast);
}
.xo-ib:hover, .xo-ib:focus-visible { background: var(--accent-soft); color: var(--accent-text); outline: none; }
.xo-ib.is-del:hover, .xo-ib.is-del:focus-visible { background: var(--neg-soft); color: var(--neg); }

/* a value made of several lines, each with its result */
.xo-ul { display: flex; flex-direction: column; gap: 8px; max-width: 500px; margin: 0; padding: 0; list-style: none; }
.xo-ul li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.xo-ul li > span { min-width: 0; }
.xo-ul b { font-weight: 650; }
.xo-d {
    flex: none; padding: 2px 8px; border-radius: var(--r-full); font-style: normal; font-size: 12px; font-weight: 700; line-height: 1.5;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.xo-d-up { background: var(--pos-soft); color: var(--pos); }
.xo-d-hi { background: var(--accent-soft); color: var(--accent-text); }
.xo-d-flat { background: var(--surface-3); color: var(--text-2); }
.xo-d-down { background: var(--neg-soft); color: var(--neg); }
.xo-val { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; color: inherit; text-decoration: none; }
.xo-val b { font-weight: 650; font-variant-numeric: tabular-nums; }
.xo-val small { font-size: 12.5px; color: var(--text-3); }
a.xo-val > span:first-child { font-weight: 600; transition: color var(--t-fast); }
a.xo-val:hover > span:first-child { color: var(--accent-text); }
.xo-accs { display: flex; flex-direction: column; gap: 10px; }
.xo-acc { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.xo-acc .xo-av { width: 26px; height: 26px; font-size: 12px; }
.xo-acc-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.xo-acc-t b { font-size: 14px; font-weight: 650; transition: color var(--t-fast); }
.xo-acc-t > span { font-size: 13px; color: var(--text-2); }
a.xo-acc:hover b { color: var(--accent-text); }

/* the box to tell the AI something */
.xo-add {
    display: flex; align-items: flex-end; gap: 8px; padding: 7px 7px 7px 18px; border: 1px solid var(--border); border-radius: 18px;
    background: var(--surface-2); transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.xo-add:hover { border-color: var(--border-2); }
.xo-add:focus-within { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.xo-add textarea {
    flex: 1; min-width: 0; max-height: 180px; padding: 9px 0; border: 0; outline: 0; resize: none; background: none;
    font: inherit; font-size: 15px; line-height: 1.5; color: var(--text);
}
.xo-add textarea::placeholder { color: var(--text-3); }
.xo-add-btn {
    flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 13px; cursor: pointer;
    background: var(--brand-grad); color: #fff; box-shadow: 0 8px 16px -8px rgba(124, 92, 255, .75);
    transition: transform var(--t-fast), filter var(--t-fast);
}
.xo-add-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.xo-add-btn:active { transform: none; }
.xo-add.is-nudge { animation: xo-nudge .55s var(--ease); }
@keyframes xo-nudge { 35% { border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-ring); } }
.xo-asks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.xo-asks:not(:has(.xo-ask:not([hidden]))) { display: none; }
.xo-ask {
    display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px 0 9px; border: 1px solid var(--border); border-radius: var(--r-full);
    background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 550; color: var(--text-2); cursor: pointer;
    transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.xo-ask:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.xo-ask[hidden] { display: none; }

/* the reader's own lines */
.xo-notes { margin-top: 12px; }
.xo-notes:empty { display: none; }
.xo-note.is-free { grid-template-columns: minmax(0, 1fr) auto; }
.xo-note.is-free .xo-v { position: relative; padding-left: 18px; }
.xo-note.is-free .xo-v::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-grad); }
.xo-note.is-new { animation: xo-in .5s var(--ease); }
@keyframes xo-in { from { opacity: 0; transform: translateY(-6px); background: var(--accent-soft); } }
.xo-note.is-edit { display: block; background: var(--surface-2); }
.xo-edit {
    display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 12px; outline: 0; resize: none;
    background: var(--surface); box-shadow: 0 0 0 4px var(--accent-ring); font: inherit; font-size: 14.5px; line-height: 1.5; color: var(--text);
}
.xo-edit-act { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.xo-none { margin: 14px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-3); }
.xo-undo { display: flex; align-items: center; gap: 12px; width: fit-content; margin-top: 10px; padding: 8px 14px; border-radius: 11px; background: var(--navy); color: #fff; font-size: 13px; }
.xo-undo[hidden] { display: none; }
.xo-undo button { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 650; color: #C9BDFF; }
.xo-cap { margin: 8px 0 0; font-size: 11.5px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }

/* nothing yet, and waiting */
.xo-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 4px 0 2px; }
.xo-empty-ic { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 6px; border-radius: 12px; border: 1px dashed var(--border-2); color: var(--text-3); }
.xo-empty b { font-size: 15px; font-weight: 650; color: var(--text); }
.xo-empty p { max-width: 54ch; margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.xo-empty .btn { margin-top: 10px; }
.xo-hintline { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.xo-hintline svg { flex: none; }
.xo-skel .xo-row { pointer-events: none; }
.xo-skel .xo-k, .xo-skel .xo-v { display: flex; flex-direction: column; gap: 9px; padding-top: 5px; }
.xo-skel .skel { display: block; height: 11px; }
.xo-wait { margin: 6px 0 0; font-size: 13px; color: var(--text-3); }

/* ---- the account base (2026-12-04): the AI's conclusion, the passport, the customers, the rivals ---- */
.xo-pass { --xo-c: #2F6FED; --xo-s: #EAF1FE; }
.xo-cust { --xo-c: #B96A06; --xo-s: #FFF3E3; }
.xo-riv  { --xo-c: #4E5472; --xo-s: var(--surface-3); }
[data-mx-deep] { transition: opacity var(--t); }
[data-mx-deep].is-busy { opacity: .55; }

/* large numbers side by side */
.xo-nums {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-bottom: 8px;
    border: 1px solid var(--border-soft); border-radius: 16px; overflow: hidden; background: var(--border-soft);
}
.xo-num { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 18px 20px 17px; background: var(--surface); }
.xo-num:last-child:nth-child(3n + 1) { grid-column: span 3; }
.xo-num:last-child:nth-child(3n + 2) { grid-column: span 2; }
.xo-num > b {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-family: var(--font-display); font-size: 31px; font-weight: 700;
    line-height: 1.12; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text);
}
.xo-num > b .xo-d { font-family: var(--font-body); letter-spacing: 0; }
.xo-num > span { font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--text-2); }
.xo-num > small { font-size: 12.5px; line-height: 1.4; color: var(--text-3); }

/* small numbers inside a row, and the sentence that reads them */
.xo-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 12px 18px; max-width: 560px; margin: 0; padding: 0; list-style: none; }
.xo-facts li { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.xo-facts b { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -.018em; font-variant-numeric: tabular-nums; }
.xo-facts span { font-size: 12.5px; line-height: 1.4; color: var(--text-3); }
.xo-v .xo-say { max-width: 560px; margin: 12px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.xo-tag { flex: none; padding: 1px 8px; border-radius: var(--r-full); background: var(--surface-3); font-style: normal; font-size: 11.5px; font-weight: 650; color: var(--text-2); }

/* a bar that fills to its share */
.xo-meter { display: block; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.xo-meter::before { content: ""; display: block; width: var(--w, 0%); height: 100%; border-radius: 3px; background: var(--xo-c); opacity: .78; }
.xo-meter.is-me::before { background: var(--brand-grad-h); opacity: 1; }

/* what is asked, how often: the subject, its count, a bar under both */
.xo-cnts { display: flex; flex-direction: column; gap: 11px; max-width: 500px; margin: 0; padding: 0; list-style: none; }
.xo-cnts li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 5px 14px; }
.xo-cnts li > span { min-width: 0; font-weight: 550; }
.xo-cnts b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.xo-cnts .xo-meter { grid-column: 1 / -1; }
.xo-cnts.is-plain { gap: 8px; }
.xo-cnts.is-plain li > span { font-weight: 400; }

/* the rivals, the biggest first, the reader's own account among them */
.xo-place { margin: 0 0 10px; font-size: 16.5px; font-weight: 600; line-height: 1.42; letter-spacing: -.008em; color: var(--text); text-wrap: pretty; }
.xo-place b { font-weight: 700; color: var(--accent-text); }
.xo-rvs { display: flex; flex-direction: column; }
.xo-rv {
    position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 7px 12px;
    margin: 0 -12px; padding: 13px 12px; border-radius: 12px;
}
.xo-rv + .xo-rv::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--border-soft); }
.xo-rv .xo-av { width: 34px; height: 34px; font-size: 14px; background: var(--surface-3); color: var(--text-2); }
a.xo-rv { color: inherit; text-decoration: none; transition: background var(--t-fast); }
a.xo-rv:hover { background: var(--surface-2); }
a.xo-rv:hover::before, a.xo-rv:hover + .xo-rv::before { opacity: 0; }
a.xo-rv:hover .xo-rv-t b { color: var(--accent-text); }
a.xo-rv .xo-rv-n > svg { color: var(--text-3); }
.xo-rv.is-me { background: var(--accent-soft); }
.xo-rv.is-me::before, .xo-rv.is-me + .xo-rv::before { display: none; }
.xo-rv.is-me .xo-av { background: var(--brand-grad); color: #fff; }
.xo-rv-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.38; }
.xo-rv-t b { font-size: 14.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xo-rv-t > span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xo-rv.is-me .xo-rv-t > span { font-weight: 650; color: var(--accent-text); }
.xo-rv-n { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; text-align: right; }
.xo-rv-n b { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.018em; font-variant-numeric: tabular-nums; }
.xo-rv-n > span { font-size: 12px; color: var(--text-3); }
.xo-rv .xo-meter { grid-column: 2 / -1; }
.xo-rv-m { grid-column: 2 / -1; font-size: 13px; line-height: 1.5; color: var(--text-2); }

/* a narrower sheet: the source goes above its rows */
@container xo (max-width: 860px) {
    .xo-sec { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px 22px; }
    .xo-side { position: relative; top: auto; flex-direction: row; align-items: center; gap: 12px; }
    .xo-side-t { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
    .xo-side h2 { flex: 1 1 100%; margin: 0; }
}
/* a phone: the label goes above its value */
@container xo (max-width: 560px) {
    .xo-tabs { padding: 0 8px; }
    .xo-tab { height: 50px; padding: 0 10px; }
    .xo-sec { padding: 20px 16px; }
    .xo-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 12px; }
    .xo-k { grid-column: 1; font-size: 12.5px; padding-top: 0; }
    .xo-v { grid-column: 1; }
    .xo-a { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0 -6px 0 0; }
    .xo-note.is-free .xo-a { grid-row: 1; }
    .xo-lead .xo-v { font-size: 15.5px; }
    .xo-add { padding-left: 14px; border-radius: 16px; }
    .xo-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .xo-num { padding: 14px 14px 13px; }
    .xo-num > b { font-size: 25px; }
    .xo-num:last-child:nth-child(3n + 1), .xo-num:last-child:nth-child(3n + 2) { grid-column: auto; }
    .xo-num:last-child:nth-child(odd) { grid-column: span 2; }
    .xo-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .xo-place { font-size: 15.5px; }
    .xo-rv { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px; }
    .xo-rv .xo-av { width: 30px; height: 30px; font-size: 13px; }
    .xo-rv-n b { font-size: 16.5px; }
    .xo-rv .xo-meter, .xo-rv-m { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
    .xo-note.is-new, .xo-add.is-nudge { animation: none; }
}

/* ==========================================================================
   Ssenariylarim v2 (2026-12-04) — Trend videolar · Saqlanganlar
   A video is picked, watched and taken apart; the reader's script is built
   on its skeleton. One accent (violet); roles of the video's parts carry
   their own quiet colours on the timeline only.
   ========================================================================== */

/* ---- the two halves ---- */
.sn-head { margin-bottom: 14px; }
.sn-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 20px; border-radius: 14px; background: var(--surface-3); max-width: 100%; }
.sn-tab { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 11px; font-size: 14.5px; font-weight: 650; color: var(--text-2); text-decoration: none; transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); white-space: nowrap; }
.sn-tab:hover { color: var(--text); text-decoration: none; }
.sn-tab.is-on { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }
.sn-tab.is-on svg { color: var(--accent); }
.sn-tab em { font-style: normal; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(13, 15, 35, .07); color: var(--text-2); font-variant-numeric: tabular-nums; }
.sn-tab.is-on em { background: var(--accent-soft); color: var(--accent-text); }

/* ---- unfinished runs ---- */
.sn-jobs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.sn-job { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; border-radius: 16px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); box-shadow: 0 0 0 4px var(--accent-ring); color: var(--text); text-decoration: none; }
.sn-job:hover { text-decoration: none; border-color: var(--accent); }
.sn-job-th { flex: none; position: relative; width: 40px; height: 54px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(160deg, #2A1E72, #121530); color: rgba(255, 255, 255, .6); }
.sn-job-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sn-job-bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sn-job-bd b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-job-bd small { font-size: 12.5px; color: var(--text-3); }
.sn-job .btn { flex: none; pointer-events: none; }

/* ---- how it works (until the first script from a video) ---- */
.sn-how { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 18px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.sn-how li { display: flex; align-items: center; gap: 12px; padding: 14px 18px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.sn-how li + li { border-left: 1px solid var(--border-soft); }
.sn-how b { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 750; }
.sn-how li:first-child b { background: var(--accent); color: #fff; }

/* ---- bar: sources, order, link ---- */
.sn-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.sn-bar-sp { flex: 1; }
.sn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sn-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer; text-decoration: none; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.sn-chip:hover { color: var(--text); border-color: var(--border-2); text-decoration: none; }
.sn-chip.is-on { background: var(--ink-grad); border-color: transparent; color: #fff; }
.sn-chip em { font-style: normal; font-size: 12px; font-weight: 700; opacity: .62; font-variant-numeric: tabular-nums; }
.sn-chip.is-add { border-style: dashed; color: var(--accent-text); }
.sn-sort { width: auto; height: 36px; padding: 0 34px 0 13px; font-size: 13.5px; border-radius: 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238990A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.sn-bar .btn-sm { height: 36px; }
.sn-q { width: 320px; max-width: 100%; height: 40px; border-radius: 999px; }
.sn-link { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; gap: 10px 12px; padding: 16px 18px; margin-bottom: 16px; animation: fadeUp var(--t) both; }
.sn-link[hidden] { display: none; }
.sn-link .field { margin: 0; }
.sn-link .btn { height: 44px; }
.sn-link .sn-note { grid-column: 1 / -1; margin: 0; }
.sn-grid .tr-act .btn-primary { flex: 1; }
.sn-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }

/* ---- the studio: the video stands beside the work ---- */
.sn-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.sn-back svg { transform: rotate(180deg); }
.sn-back:hover { color: var(--text); text-decoration: none; }
.sn-studio { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.sn-studio.is-solo { grid-template-columns: minmax(0, 1fr); }
.sn-rail { position: sticky; top: 16px; min-width: 0; }
.sn-vid { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); border: 1px solid rgba(13, 15, 35, .06); box-shadow: var(--sh-card); overflow: hidden; }
.sn-poster.mini-th { display: block; width: 100%; height: auto; aspect-ratio: 9 / 14; max-height: 46vh; border-radius: 0; box-shadow: none; background: linear-gradient(160deg, #2A1E72, #121530); }
.sn-read .sn-poster.mini-th { max-height: 36vh; }
.sn-poster.mini-th:hover { transform: none; }
.sn-poster .tr-ph { position: absolute; inset: 0; display: none; place-items: center; color: rgba(255, 255, 255, .5); }
.sn-poster.is-noimg .tr-ph { display: grid; }
.sn-poster::after { content: ""; position: absolute; inset: auto 0 0 0; height: 38%; background: linear-gradient(180deg, transparent, rgba(10, 12, 27, .55)); pointer-events: none; }
.sn-poster:hover .tr-play { transform: translate(-50%, -50%) scale(1.08); }
.sn-vid-bd { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; }
.sn-vid-acc { display: flex; flex-direction: column; gap: 1px; color: var(--text); text-decoration: none; }
.sn-vid-acc:hover { text-decoration: none; }
.sn-vid-acc:hover b { color: var(--accent-text); }
.sn-vid-k { font-size: 10.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.sn-vid-acc b { font-size: 15px; font-weight: 700; }
.sn-vid-acc small { font-size: 12.5px; color: var(--text-3); }
.sn-nums { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-radius: 12px; overflow: hidden; background: var(--border-soft); border: 1px solid var(--border-soft); }
.sn-nums > div { padding: 8px 11px; background: var(--surface); }
.sn-nums dt { font-size: 11px; font-weight: 600; color: var(--text-3); }
.sn-nums dd { margin: 1px 0 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.sn-nums .is-up dd { color: var(--pos); }
.sn-vid-cap { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sn-vid-bd .tr-why { margin: 0; }
.sn-vid-act { display: flex; flex-direction: column; gap: 6px; }
.sn-vid-act .btn-primary { width: 100%; }
.sn-del { margin: 0; }
.sn-del .btn { width: 100%; color: var(--text-3); }
.sn-del .btn:hover { color: var(--neg); }
.sn-solo-act { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.sn-solo-act .sn-del .btn { width: auto; }
.sn-jump { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; border-top: 1px solid var(--border-soft); }
.sn-jump a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.sn-jump a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.sn-jump b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--surface-3); font-size: 12px; color: var(--text-2); }

.sn-panel { padding: 28px 30px 30px; min-width: 0; }
.sn-h { font-size: 22px; letter-spacing: -.028em; }
.sn-plan { list-style: none; margin: 18px 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sn-plan li { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.sn-plan li > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--surface); color: var(--accent); box-shadow: var(--sh-xs); }
.sn-plan b { display: block; font-size: 14px; line-height: 1.35; }
.sn-plan small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.sn-form .field { margin: 0 0 16px; }
.sn-form .grid-2 { gap: 12px 16px; }
.sn-form .btn-lg { margin-top: 4px; }
.sn-prog { padding: 6px 0; }
.sn-prog .ai-orb { --s: 46px; }
.sn-prog .ai-steps li[hidden] { display: none; }
.sn-nofile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sn-nofile-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--warn-soft); color: var(--warn); margin-bottom: 6px; }
.sn-nofile p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); max-width: 560px; }
.sn-nofile .sn-note { font-size: 12.5px; color: var(--text-3); }
.sn-nofile-act { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.sn-out { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.sn-out > * { max-width: 100%; }
.sn-out .alert { width: 100%; }

/* ---- one script ---- */
.sn-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sn-sec { padding: 26px 28px 28px; scroll-margin-top: 16px; }
.sn-sec-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sn-sec-hd h2 { font-size: 21px; letter-spacing: -.028em; }
.sn-sec-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--navy); color: #fff; font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.sn-sec .ais { border: 0; box-shadow: none; padding: 0; }
.sn-blind { display: flex; gap: 8px; align-items: flex-start; margin: -4px 0 16px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: #8A4508; font-size: 13px; line-height: 1.5; }
.sn-blind svg { flex: none; margin-top: 2px; }
.ais-mirror { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; align-self: flex-start; max-width: 100%; margin: 3px 0 0; padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; line-height: 1.45; }
.ais-mirror svg { flex: none; align-self: center; }
.ais-mirror b { font-weight: 700; }
.sn-sec .ais-saved, .sn-read .sn-sec [data-pdf-dl] { display: none; }

/* ---- the video taken apart ---- */
.sv { display: flex; flex-direction: column; gap: 22px; }
.sv-verdict { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 650; line-height: 1.45; letter-spacing: -.018em; color: var(--text); max-width: 760px; }
.sv-formula { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.sv-formula > span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; font-weight: 650; line-height: 1.3; box-shadow: var(--sh-xs); }
.sv-formula b { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 750; }
.sv-formula > i { display: inline-grid; color: var(--text-3); }
.sv-formula em { font-style: normal; }
.sv-blk h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: 15.5px; }
.sv-blk h3 em { font-style: normal; font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); letter-spacing: 0; }
.sv-hook { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.sv-hook > div { padding: 11px 13px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.sv-hook span { display: block; font-size: 10.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.sv-hook p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; }
.sv-hook .sv-ovl { font-weight: 700; }
.sv-why, .sv-weak { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; }
.sv-why { color: var(--accent-text); font-weight: 550; }
.sv-why svg, .sv-weak svg { flex: none; margin-top: 3px; }
.sv-weak { margin: 0; padding: 11px 13px; border-radius: 13px; background: var(--warn-soft); color: #8A4508; }
.sv-bar { display: flex; gap: 3px; height: 10px; margin-bottom: 12px; }
.sv-bar span { min-width: 6px; border-radius: 4px; background: var(--c, var(--accent)); opacity: .85; }
.sv-segs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.sv-segs li { display: grid; grid-template-columns: 92px 104px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--border-soft); position: relative; }
.sv-segs li:first-child { border-top: 0; }
.sv-segs li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--accent)); }
.sv-seg-t { font-size: 12.5px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sv-seg-r { justify-self: start; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 11%, #fff); white-space: nowrap; }
.sv-segs p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.sv-segs small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.sv-tech { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.sv-tech li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); }
.sv-tech b { font-size: 13.5px; }
.sv-tech span { font-size: 13px; line-height: 1.5; color: var(--text-2); }
.sv-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sv-two > div { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); }
.sv-two h3 { margin-bottom: 8px; font-size: 14.5px; gap: 7px; }
.sv-keep h3 svg { color: var(--pos); }
.sv-change h3 svg { color: var(--accent); }
.sv-two ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sv-two li { position: relative; padding-left: 14px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.sv-two li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--border-2); }
.sv-log { border: 1px solid var(--border); border-radius: 14px; }
.sv-log summary { display: flex; align-items: center; gap: 9px; padding: 12px 14px; cursor: pointer; list-style: none; font-size: 13.5px; font-weight: 650; color: var(--text-2); }
.sv-log summary::-webkit-details-marker { display: none; }
.sv-log summary span { flex: 1; }
.sv-log summary > svg:last-child { transition: transform var(--t-fast); color: var(--text-3); }
.sv-log[open] summary > svg:last-child { transform: rotate(180deg); }
.sv-log summary:hover { color: var(--text); }
.sv-log-bd { display: flex; flex-direction: column; gap: 14px; padding: 2px 14px 14px; border-top: 1px solid var(--border-soft); padding-top: 12px; }
.sv-log-bd > div > b { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.sv-log-bd ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sv-log-bd li { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; font-size: 13px; line-height: 1.5; }
.sv-log-bd li .num { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.sv-log-bd p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.sv-log-bd p b { color: var(--text); }

/* ---- the library ---- */
.sn-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.sn-item { position: relative; display: flex; gap: 14px; padding: 12px; border-radius: 20px; background: var(--surface); border: 1px solid rgba(13, 15, 35, .06); box-shadow: var(--sh-sm); transition: box-shadow var(--t), border-color var(--t), transform var(--t); }
.sn-item:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.sn-item.is-picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.sn-item-th { flex: none; position: relative; width: 84px; aspect-ratio: 3 / 4; align-self: flex-start; border-radius: 13px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(160deg, #2A1E72, #121530); color: rgba(255, 255, 255, .55); }
.sn-item-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sn-item[data-kind="idea"] .sn-item-th { background: var(--brand-soft); color: var(--accent); }
.sn-item-ck { position: absolute; top: 18px; left: 18px; z-index: 2; cursor: pointer; opacity: 0; transition: opacity var(--t-fast); }
.sn-item:hover .sn-item-ck, .sn-item-ck:focus-within, .sn-picking .sn-item-ck { opacity: 1; }
.sn-item-ck input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sn-item-ck i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: rgba(255, 255, 255, .94); border: 1.5px solid rgba(13, 15, 35, .18); color: transparent; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.sn-item-ck input:checked + i { background: var(--accent); border-color: var(--accent); color: #fff; }
.sn-item-ck input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.sn-item-bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.sn-item-k { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--text-3); }
.sn-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 650; font-size: 11.5px; }
.sn-item-t { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.015em; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sn-item-t:hover { color: var(--accent-text); text-decoration: none; }
.sn-item-t::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.sn-item-hook { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sn-item-ft { position: relative; z-index: 1; display: flex; align-items: center; gap: 2px; margin-top: auto; padding-top: 4px; }
.sn-item-ft form { margin: 0; }
.sn-item-src { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-item-ft .btn-icon { width: 34px; height: 34px; color: var(--text-3); }
.sn-item-ft .btn-icon:hover { color: var(--text); }
.sn-item-ft form .btn-icon:hover { color: var(--neg); }
.sn-pickbar { position: fixed; left: 12px; right: 12px; bottom: 26px; z-index: 45; width: fit-content; max-width: calc(100% - 24px); margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 18px; border-radius: 999px; background: var(--navy); color: #fff; box-shadow: 0 18px 40px -14px rgba(8, 9, 24, .7); font-size: 13.5px; white-space: nowrap; animation: fadeUp var(--t) both; }
.sn-pickbar[hidden] { display: none; }
.sn-pickbar > b { margin-right: 6px; font-weight: 650; }
.sn-pickbar-all { background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; box-shadow: none; }
.sn-pickbar-all:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.sn-pickbar .btn-primary { background: #fff; color: var(--navy); border-color: transparent; box-shadow: none; }
.sn-pickbar-x { color: rgba(255, 255, 255, .7); }
.sn-pickbar-x:hover { background: rgba(255, 255, 255, .12); color: #fff; }
@media (min-width: 1024px) { .sn-pickbar { left: 264px; } }
@media (max-width: 900px) { .sn-pickbar { bottom: calc(92px + env(safe-area-inset-bottom)); } }

/* ---- narrower ---- */
@media (max-width: 1100px) {
    .sn-studio { grid-template-columns: 260px minmax(0, 1fr); gap: 16px; }
    .sn-plan { grid-template-columns: minmax(0, 1fr); }
    .sn-plan li { flex-direction: row; align-items: center; gap: 12px; padding: 11px 13px; }
    .sn-plan li > span { flex: none; }
}
@media (max-width: 860px) {
    .sn-studio { grid-template-columns: minmax(0, 1fr); }
    .sn-rail { position: static; }
    .sn-vid { flex-direction: row; }
    .sn-poster.mini-th { flex: none; width: 132px; aspect-ratio: auto; align-self: stretch; min-height: 180px; }
    .sn-vid-bd { flex: 1; min-width: 0; padding: 12px 14px 14px; gap: 10px; }
    .sn-vid-act { flex-direction: row; flex-wrap: wrap; }
    .sn-vid-act .btn-primary { width: auto; }
    .sn-del .btn { width: auto; }
    .sn-jump { flex-direction: row; flex-wrap: wrap; border-top: 0; padding: 0; }
    .sn-how { grid-template-columns: minmax(0, 1fr); }
    .sn-how li + li { border-left: 0; border-top: 1px solid var(--border-soft); }
    .sn-how li { padding: 11px 14px; }
}
@media (max-width: 640px) {
    .sn-tabs { display: flex; width: 100%; }
    .sn-tab { flex: 1; justify-content: center; padding: 0 10px; font-size: 14px; }
    .sn-panel { padding: 20px 16px 20px; }
    .sn-sec { padding: 20px 16px; }
    .sn-h { font-size: 19px; }
    .sn-sec-hd h2 { font-size: 18px; }
    .sv-verdict { font-size: 16.5px; }
    .sn-link { grid-template-columns: minmax(0, 1fr); }
    .sn-link .btn { width: 100%; }
    .sn-bar-sp { display: none; }
    .sn-sort { flex: 1; }
    .sn-lib { grid-template-columns: minmax(0, 1fr); }
    .sn-item-th { width: 72px; }
    .sn-item-ck { opacity: 1; }
    .sv-segs li { grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; }
    .sv-segs li > div { grid-column: 1 / -1; }
    .sv-two { grid-template-columns: minmax(0, 1fr); }
    .sv-log-bd li { grid-template-columns: 64px minmax(0, 1fr); }
    .sn-pickbar { padding-left: 14px; gap: 6px; }
    .sn-pickbar-all { display: none; }
}
@media (max-width: 420px) {
    .sn-vid { flex-direction: column; }
    .sn-poster.mini-th { width: 100%; aspect-ratio: 16 / 10; min-height: 0; max-height: 230px; }
    .sn-read .sn-poster.mini-th { max-height: 190px; }
    .sn-read .sn-jump { display: none; }
    .sn-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .sn-item, .sn-link, .sn-pickbar { animation: none; transition: none; }
}

/* ==========================================================================
   Saqlash on Trendlar → Ssenariylarim · Trend videolar (only the saved ones)
   ========================================================================== */
.tr-save .tr-save-on { display: none; }
.tr-save[aria-pressed="true"] .tr-save-on { display: inline; }
.tr-save[aria-pressed="true"] .tr-save-off { display: none; }
.btn-primary.tr-save[aria-pressed="true"],
.btn-primary.tr-save[aria-pressed="true"]:hover { --btn-fg: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(106, 76, 255, .2); transform: none; }
.tr-save[aria-pressed="true"] svg path { fill: currentColor; }
/* where the saved Reel went, with the way there */
.tr-toast {
    position: fixed; left: 12px; right: 12px; bottom: 26px; z-index: 45; width: fit-content; max-width: calc(100% - 24px); margin: 0 auto;
    display: flex; align-items: center; gap: 14px; padding: 7px 7px 7px 16px; border-radius: 999px; background: var(--navy); color: #fff;
    box-shadow: 0 18px 40px -14px rgba(8, 9, 24, .7); font-size: 13.5px; white-space: nowrap;
    opacity: 0; transform: translateY(10px); transition: opacity var(--t), transform var(--t);
}
.tr-toast.is-on { opacity: 1; transform: none; }
.tr-toast > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 0; }
.tr-toast b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.tr-toast svg { flex: none; color: #C9B8FF; }
.tr-toast .btn { flex: none; border: 0; background: #fff; color: var(--navy); }
@media (max-width: 900px) { .tr-toast { bottom: calc(92px + env(safe-area-inset-bottom)); } }
@media (min-width: 1024px) { .tr-toast { left: 264px; } }
@media (max-width: 480px) { .tr-toast { white-space: normal; border-radius: 18px; } }

.sn-has { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--pos-soft); color: var(--pos); font-size: 12px; font-weight: 650; text-decoration: none; }
.sn-has:hover { text-decoration: none; filter: brightness(.97); }
/* the saved mark sits on the cover, like a bookmark on a photo; pressing it lets the video go */
.sn-card { position: relative; transition: opacity .2s, transform .2s; }
.sn-unsave { position: absolute; top: 9px; right: 9px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--accent); box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .35); cursor: pointer; transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.sn-unsave svg path { fill: currentColor; }
.sn-unsave:hover { background: #fff; color: var(--neg); transform: scale(1.06); }
.sn-unsave:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sn-unsave[disabled] { opacity: .6; cursor: default; }
@media (max-width: 720px) {
    .sn-grid .tr-act .btn { white-space: normal; height: auto; min-height: 36px; padding: 7px 10px; line-height: 1.25; text-align: center; }
    .sn-bar > .sn-chip.is-add { flex: 1 1 100%; justify-content: center; }
    .sn-bar .sn-sort { flex: 1; min-width: 0; }
}
.sn-card.is-gone { opacity: 0; transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { .tr-toast, .sn-card { transition: none; } }

/* ==========================================================================
   Kuzatuv v3 (2026-12-04): light and airy. The growth race and the takeaways
   as light cards, the leaderboard with each column's best value marked, the
   PDF tab. (The "Siz va raqobatchi" head-to-head card was dropped by the user.)
   ========================================================================== */
.kz-head { margin-bottom: 14px; align-items: center; }
.kz-tabs { margin-bottom: 18px; }
.kz-per { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-3); }
.kz-per a { padding: 7px 13px; border-radius: 9px; font-size: 13px; font-weight: 650; color: var(--text-2); text-decoration: none; white-space: nowrap; transition: color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast); }
.kz-per a:hover { color: var(--text); text-decoration: none; }
.kz-per a.is-on { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }


/* ---- the race and the takeaways ---- */
.kz-duo { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; margin-bottom: 18px; }
.kz-duo.is-solo { grid-template-columns: minmax(0, 1fr); }
.kz-race { min-width: 0; }
.kz-card-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 16px 20px 6px; }
.kz-card-hd h2 { font-size: 16px; }
.kz-race-bd { padding: 4px 16px 16px 8px; }
.kz-chart { position: relative; min-height: 220px; }
.kz-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font-body); touch-action: pan-y; }
.kz-axis text { fill: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.kz-gl { stroke: rgba(13, 15, 35, .07); stroke-dasharray: 3 5; }
.kz-zero { stroke: rgba(13, 15, 35, .28); }
.kz-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke-width .2s; }
.kz-s { transition: opacity .2s; }
.kz-s.is-me .kz-line { stroke-width: 3.6; filter: drop-shadow(0 4px 8px rgba(124, 92, 255, .35)); }
.kz-end, .kz-dot { stroke: #fff; stroke-width: 2.5; }
.kz-svg.is-hl .kz-s:not(.is-on) { opacity: .15; }
.kz-svg.is-hl .kz-s.is-on .kz-line { stroke-width: 3.6; }
.kz-lab { font-size: 12.5px; font-weight: 600; }
.kz-lab-v { font-weight: 800; font-variant-numeric: tabular-nums; }
.kz-lab-u { fill: var(--text-2); font-weight: 500; }
.kz-s.is-me .kz-lab-u { fill: var(--text); font-weight: 700; }
.kz-lead { fill: none; stroke-width: 1; stroke-opacity: .5; }
.kz-cross { stroke: rgba(13, 15, 35, .3); stroke-dasharray: 2 3; opacity: 0; pointer-events: none; }
.kz-svg.is-hover .kz-cross { opacity: 1; }
.kz-dots { pointer-events: none; }
.kz-hit { cursor: crosshair; }
.kz-svg.is-intro .kz-end, .kz-svg.is-intro .kz-lab, .kz-svg.is-intro .kz-lead { animation: kz-fade .45s .95s both; }
@keyframes kz-fade { from { opacity: 0; } }
.kz-tip { position: absolute; z-index: 3; min-width: 210px; max-width: 280px; padding: 10px 12px; border-radius: 12px; background: var(--navy); color: #fff; box-shadow: 0 18px 40px -12px rgba(11, 13, 32, .55); pointer-events: none; font-size: 12.5px; }
.kz-tip-hd { margin-bottom: 6px; font-size: 11.5px; font-weight: 700; color: rgba(255, 255, 255, .6); }
.kz-tip-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 2px 0; }
.kz-tip-row i { width: 8px; height: 8px; border-radius: 50%; }
.kz-tip-row span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: rgba(255, 255, 255, .8); }
.kz-tip-row b { font-variant-numeric: tabular-nums; }
.kz-tip-row small { min-width: 54px; text-align: right; color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
.kz-tip-row.is-me span { font-weight: 700; color: #fff; }
.kz-legend { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 0 12px; }
.kz-labels .kz-legend { display: none; }
.kz-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; transition: background var(--t-fast); }
.kz-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.kz-chip b { font-weight: 750; color: var(--text); font-variant-numeric: tabular-nums; }
.kz-chip.is-on, .kz-chip:hover { background: var(--accent-soft); }
.kz-race-note { display: flex; align-items: center; gap: 8px; margin: 10px 0 0 12px; font-size: 12.5px; color: var(--text-3); }
.kz-wait { display: flex; align-items: center; gap: 12px; min-height: 180px; padding: 24px; border-radius: 16px; background: var(--surface-2); border: 1px dashed var(--border-2); color: var(--text-2); }
.kz-wait p { margin: 0; font-size: 14px; line-height: 1.5; max-width: 46ch; }
.kz-wait.is-light { min-height: 160px; }

.kz-ins-card .kz-card-hd { padding-bottom: 10px; }
.kz-ins { display: flex; flex-direction: column; margin: 0; padding: 0 8px 8px; list-style: none; }
.kz-in { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: 14px; }
.kz-in + .kz-in { border-top: 1px solid var(--border); border-radius: 0; }
.kz-in-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--surface-3); color: var(--text-2); }
.kz-in.kz-up .kz-in-ic { background: var(--pos-soft); color: var(--pos); }
.kz-in.kz-down .kz-in-ic { background: var(--neg-soft); color: var(--neg); }
.kz-in.kz-mine .kz-in-ic { background: var(--accent-soft); color: var(--accent-text); }
.kz-in p { margin: 0; font-size: 13px; line-height: 1.42; color: var(--text-2); }
.kz-in p b { font-weight: 700; color: var(--text); }
.kz-in strong { display: block; margin-top: 3px; font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kz-in strong small { margin-left: 3px; font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--text-3); }
.kz-in.kz-up strong { color: var(--pos); }
.kz-in.kz-down strong { color: var(--neg); }

/* ---- empty ---- */
.kz-empty-card { margin-bottom: 18px; padding: 48px 28px; text-align: center;
    background: radial-gradient(420px 240px at 50% 0%, rgba(124, 92, 255, .14), transparent 72%), var(--surface); }
.kz-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 620px; margin: 0 auto; }
.kz-empty-ic { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 6px; border-radius: 50%; background: var(--brand-grad); color: #fff; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px #B9A6FF; }
.kz-empty h2 { font-size: 23px; letter-spacing: -.02em; }
.kz-empty p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.kz-empty .kz-quota { width: 220px; margin-top: 4px; }

.kz-add { display: flex; gap: 8px; flex: 0 1 400px; min-width: 0; }
.kz-add-in { position: relative; flex: 1; min-width: 0; }
.kz-add-in > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.kz-add-in .input { width: 100%; padding-left: 38px; }
.kz-add .btn { flex: none; }
.kz-add-lg { flex: none; width: 100%; max-width: 520px; margin-top: 8px; }
.kz-add-lg .input { height: 50px; border-radius: 14px; font-size: 15px; }
.kz-add-lg .btn { height: 50px; padding: 0 22px; border-radius: 14px; }
.kz-quota { display: grid; gap: 6px; min-width: 150px; font-size: 12.5px; color: var(--text-3); }
.kz-quota b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.kz-quota > i { display: block; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.kz-quota > i::before { content: ""; display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--brand-grad-h); }
.kz-quota.is-full > i::before { background: linear-gradient(90deg, #FFB347, #FF7A59); }

/* ---- the leaderboard ---- */
.kz-board { overflow: visible; }
.kz-board-hd { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.kz-board-hd h2 { margin-right: auto; font-size: 17px; }
.kz-row {
    display: grid; align-items: center; gap: 12px; padding: 12px 20px;
    grid-template-columns: 34px minmax(170px, 1.7fr) minmax(84px, 1fr) minmax(112px, 1.15fr) minmax(62px, .75fr) minmax(70px, .8fr) minmax(66px, .75fr) minmax(70px, .8fr) 92px 72px;
}
.kz-cells { display: contents; }
.kz-row-hd { padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.kz-h { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.kz-cells > .kz-h:not(.kz-c-sp) { justify-content: flex-end; }
.kz-h button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.kz-h button:hover { color: var(--text); }
.kz-h button i { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; opacity: 0; }
.kz-h[aria-sort] button { color: var(--text); }
.kz-h[aria-sort="descending"] button i { border-top: 5px solid currentColor; opacity: 1; }
.kz-h[aria-sort="ascending"] button i { border-bottom: 5px solid currentColor; opacity: 1; }
.kz-h .hint { text-transform: none; letter-spacing: 0; }
.kz-item { border-bottom: 1px solid var(--border); transition: background var(--t-fast); }
.kz-item:last-child { border-bottom: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.kz-item > .kz-row { cursor: pointer; }
.kz-item:hover, .kz-item.is-open { background: var(--surface-2); }
.kz-item.is-me { background: linear-gradient(90deg, rgba(106, 76, 255, .075), rgba(106, 76, 255, 0) 70%); }
.kz-item.is-me:hover, .kz-item.is-me.is-open { background: linear-gradient(90deg, rgba(106, 76, 255, .12), var(--surface-2) 70%); }
.kz-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-3); font-size: 13px; font-weight: 800; color: var(--text-2); font-variant-numeric: tabular-nums; }
.kz-rank.is-1 { background: linear-gradient(135deg, #FFE69A, #F2B33D); color: #5A3B00; box-shadow: 0 4px 12px -4px rgba(242, 179, 61, .8); }
.kz-rank.is-2 { background: linear-gradient(135deg, #F1F3F8, #C5CBDA); color: #394058; }
.kz-rank.is-3 { background: linear-gradient(135deg, #F8D5B8, #D68F5E); color: #4A2410; }
.kz-rank.is-none { background: none; color: var(--text-3); }
.kz-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.kz-ava { flex: none; display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.kz-who-t { display: flex; flex-direction: column; min-width: 0; }
.kz-who-t b { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; white-space: nowrap; }
.kz-who-t b > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.kz-who-t small { overflow: hidden; font-size: 12px; color: var(--text-3); white-space: nowrap; text-overflow: ellipsis; }
.kz-me { flex: none; padding: 2px 7px; border-radius: 999px; background: var(--brand-grad); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 800; letter-spacing: .03em; }
.kz-c { text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kz-c b { font-weight: 700; }
.kz-c-g { display: grid; justify-items: end; gap: 2px; }
.kz-c-g small { font-size: 12px; color: var(--text-3); }
.kz-c-sp { text-align: left; }
.kz-up { color: var(--pos); }
.kz-down { color: var(--neg); }
.kz-top { display: inline-block; margin: -3px -7px; padding: 3px 7px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-weight: 750; }
.kz-top.kz-up { background: var(--pos-soft); color: var(--pos); }
.kz-dbar { position: relative; display: block; width: 100%; max-width: 104px; height: 4px; margin-top: 3px; border-radius: 99px; background: var(--surface-3); }
.kz-dbar::after { content: ""; position: absolute; left: 50%; top: -2px; width: 1px; height: 8px; background: var(--border-2); }
.kz-dbar i { position: absolute; top: 0; height: 100%; width: calc(var(--v) * 50%); border-radius: 99px; }
.kz-dbar i.up { left: 50%; background: var(--pos); }
.kz-dbar i.down { right: 50%; background: var(--neg); }
.kz-spk { display: block; width: 90px; height: 28px; }
.kz-act { display: flex; align-items: center; justify-content: flex-end; gap: 0; }
.kz-act form { display: inline; }
.kz-open svg { transition: transform var(--t); }
.kz-item.is-open .kz-open svg { transform: rotate(180deg); }
.kz-rm { color: var(--text-3); }
.kz-rm:hover { color: var(--neg); }

.kz-detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr); gap: 16px; padding: 2px 20px 20px 66px; animation: kz-open .22s ease-out; }
.kz-detail[hidden] { display: none; }
@keyframes kz-open { from { opacity: 0; transform: translateY(-4px); } }
.kz-detail h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.kz-detail-chart { min-width: 0; padding: 14px 14px 6px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.kz-detail-side { min-width: 0; }
.kz-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.kz-facts > div { padding: 10px 12px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.kz-facts dt { font-size: 12px; color: var(--text-3); }
.kz-facts dd { margin: 3px 0 0; font-family: var(--font-display); font-size: 16.5px; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kz-facts dd small { margin-left: 5px; font-family: var(--font-body); font-size: 11.5px; font-weight: 500; letter-spacing: 0; color: var(--text-3); }
.kz-fast-t { margin-top: 14px !important; }
.kz-fast { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.kz-fast a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); font-size: 13px; text-decoration: none; transition: box-shadow var(--t-fast); }
.kz-fast a:hover { box-shadow: inset 0 0 0 1px var(--accent); text-decoration: none; }
.kz-fast a > svg { flex: none; color: var(--text-3); }
.kz-fast-ic { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); }
.kz-fast-m { flex: 1; min-width: 0; }
.kz-fast-v { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kz-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

@media (max-width: 1320px) {
    .kz-row { grid-template-columns: 34px minmax(160px, 1.7fr) minmax(84px, 1fr) minmax(112px, 1.15fr) minmax(62px, .75fr) minmax(70px, .8fr) minmax(66px, .75fr) 92px 72px; }
    .kz-c-rv { display: none; }
}
@media (max-width: 1120px) {
    .kz-duo { grid-template-columns: minmax(0, 1fr); }
    .kz-row { grid-template-columns: 32px minmax(150px, 1.8fr) minmax(84px, 1fr) minmax(108px, 1.2fr) minmax(68px, .8fr) minmax(66px, .8fr) 72px; }
    .kz-c-pd, .kz-c-sp { display: none; }
    .kz-detail { padding-left: 20px; }
}
@media (max-width: 860px) {
    .kz-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .kz-head .kz-per { width: 100%; }
    .kz-head .kz-per a { flex: 1; text-align: center; }
    .kz-race-bd { padding: 0 8px 14px 0; }
    .kz-board-hd { padding: 14px; }
    .kz-board-hd .kz-add { flex: 1 1 100%; }
    .kz-quota { min-width: 120px; }
    .kz-add-lg { flex-direction: column; }
    .kz-empty-card { padding: 32px 16px; }
    .kz-empty h2 { font-size: 20px; }
    .kz-row-hd { display: none; }
    .kz-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 14px; }
    .kz-row > .kz-act { grid-column: 3; grid-row: 1; }
    .kz-cells { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-left: 38px; }
    .kz-c { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; font-size: 13.5px; }
    .kz-c::before { content: attr(data-l); font-size: 11px; font-weight: 600; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .kz-c-g { justify-items: start; }
    .kz-c-g small, .kz-dbar { display: none; }
    .kz-c-pd, .kz-c-rv, .kz-c-sp { display: none; }
    .kz-top { margin: 0; }
    .kz-detail { padding: 0 14px 16px; }
    .kz-facts dd { font-size: 15px; }
}
@media (max-width: 400px) {
    .kz-cells { padding-left: 0; }
}

/* the PDF tab */
.kz-pdf { overflow: hidden; }
.kz-pdf-bd { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.kz-pdf-main { padding: 26px 28px; min-width: 0; }
.kz-pdf-main h2 { margin-bottom: 20px; font-size: 21px; letter-spacing: -.015em; }
.kz-pick { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.kz-pick legend { margin-bottom: 9px; padding: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.kz-accs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.kz-acc { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); cursor: pointer; transition: box-shadow var(--t-fast), background var(--t-fast); }
.kz-acc b { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.kz-acc::after { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--border-2); transition: box-shadow var(--t-fast), background var(--t-fast); }
.kz-acc input, .kz-perc input { position: absolute; opacity: 0; pointer-events: none; }
.kz-acc:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.kz-acc:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.kz-acc:has(input:checked)::after { background: var(--accent); box-shadow: inset 0 0 0 5px var(--accent), inset 0 0 0 9px #fff; }
.kz-acc:has(input:focus-visible), .kz-perc:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 14px; }
.kz-pers { display: flex; flex-wrap: wrap; gap: 6px; }
.kz-perc span { display: inline-flex; align-items: center; height: 38px; padding: 0 15px; border-radius: 11px; background: var(--surface-3); font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.kz-perc span:hover { color: var(--text); }
.kz-perc input:checked + span { background: var(--navy); color: #fff; }
.kz-pdf-go { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 4px; padding-top: 20px; border-top: 1px solid var(--border); }
.kz-pdf-go .btn-brand { height: 50px; padding: 0 24px; border-radius: 14px; font-size: 15px; }
.kz-pdf-go .rp2-hint { margin: 0; }
.kz-pdf-go + .rp-err, .kz-pdf .rp-err { margin: 12px 0 0; }
.kz-pdf-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 34px 22px 26px; border-left: 1px solid var(--border);
    background: radial-gradient(260px 200px at 50% 30%, rgba(124, 92, 255, .16), transparent 70%), var(--surface-2); }
.kz-pv { width: 188px; height: 258px; }
.kz-pv .rp2-pv-page { padding: 14px 15px; }
.kz-pv .rp2-pv-title { font-size: 17px; }
.kz-pv .rp2-pv-eyebrow { font-size: 6px; }
.kz-pv-back { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 14px; overflow: hidden; transform: rotate(4deg); transform-origin: bottom left; }
.kz-pv-back > i { display: block; width: 50%; height: 4px; border-radius: 2px; background: #CFD3E2; }
.kz-pv-back > span { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.kz-pv-back > span i { flex: 1; border-radius: 2px 2px 0 0; background: color-mix(in srgb, var(--pv) 40%, #E8EAF3); }
.kz-pv-back > span i:nth-child(1) { height: 30%; } .kz-pv-back > span i:nth-child(2) { height: 46%; } .kz-pv-back > span i:nth-child(3) { height: 38%; }
.kz-pv-back > span i:nth-child(4) { height: 62%; } .kz-pv-back > span i:nth-child(5) { height: 55%; } .kz-pv-back > span i:nth-child(6) { height: 78%; }
.kz-pv-back > span i:nth-child(7) { height: 100%; background: var(--pv); }
.kz-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.kz-pages li { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); font-size: 12px; font-weight: 600; color: var(--text-2); }
.kz-pages svg { color: var(--pos); }
.kz-set { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
.kz-set-col { display: grid; gap: 16px; min-width: 0; }
.kz-set .rp2-card { margin: 0; }
.kz-state { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--surface-3); font-size: 12px; font-weight: 700; color: var(--text-3); }
.kz-state.is-on { background: var(--pos-soft); color: var(--pos); }
.kz-brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px 14px; }
.kz-brand-grid > .field:nth-child(3), .kz-brand-grid > .field:nth-child(4) { grid-column: 1 / -1; }
@media (max-width: 1100px) {
    .kz-set { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 880px) {
    .kz-pdf-bd { grid-template-columns: minmax(0, 1fr); }
    .kz-pdf-side { flex-direction: row; flex-wrap: wrap; border-left: 0; border-top: 1px solid var(--border); padding: 24px 18px; }
    .kz-pdf-side .kz-pages { flex: 1 1 220px; justify-content: flex-start; }
}
@media (max-width: 720px) {
    .kz-pdf-main { padding: 20px 16px; }
    .kz-pdf-main h2 { font-size: 19px; }
    .kz-pdf-go .btn-brand { width: 100%; justify-content: center; }
    .kz-pdf-side { justify-content: center; }
    .kz-pdf-side .kz-pages { justify-content: center; }
    .kz-pv { width: 150px; height: 206px; }
    .kz-pv .rp2-pv-title { font-size: 14px; }
}
.kz-brand-grid > .field { margin: 0; }

/* ==========================================================================
   Tarif v4 — the wallet (billing.php, 2026-12-04)
   A dark card in the plan's colours with the two pots kept apart, what the
   balance buys, 30 days of spending by action and a filterable history.
   ========================================================================== */
.bw-top { container: bwtop / inline-size; }
.bw-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.bw-sec { margin-top: 28px; }
/* the row below splits at the same line as the wallet row */
@media (min-width: 1181px) { .grid-main.bw-sec { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }

.bw-card {
    --bw-head: linear-gradient(140deg, #8C95C9 0%, #C9CEEA 100%); --bw-glow: rgba(120, 130, 200, .35);
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column; min-width: 0;
    padding: 24px 26px 22px; border-radius: var(--r-lg);
    background: #14172C; color: #E8EAF6;
    box-shadow: 0 28px 54px -32px var(--bw-glow), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.bw-card::before {
    content: ""; position: absolute; z-index: -1; top: -45%; right: -18%; width: 72%; aspect-ratio: 1;
    border-radius: 50%; background: var(--bw-head); opacity: .5; filter: blur(64px);
}
.bw-card::after {
    content: ""; position: absolute; z-index: -1; top: -110px; right: -110px; width: 340px; height: 340px; border-radius: 50%;
    background: repeating-radial-gradient(circle, rgba(255, 255, 255, .08) 0 1px, transparent 1px 24px);
    -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 70%); mask-image: radial-gradient(circle, #000 25%, transparent 70%);
}
.bw-t-start      { --bw-head: linear-gradient(140deg, #1E6BFF 0%, #22C3EE 100%); --bw-glow: rgba(34, 160, 255, .55); }
.bw-t-pro        { --bw-head: linear-gradient(140deg, #6A4CFF 0%, #B84DEB 55%, #FF6F96 100%); --bw-glow: rgba(184, 77, 235, .6); }
.bw-t-business   { --bw-head: linear-gradient(140deg, #059669 0%, #34D399 100%); --bw-glow: rgba(16, 185, 129, .55); }
.bw-t-enterprise { --bw-head: linear-gradient(140deg, #F59E0B 0%, #F97316 100%); --bw-glow: rgba(249, 140, 22, .5); }

.bw-card-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.bw-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: rgba(232, 234, 246, .72); }
.bw-state {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px; border-radius: 999px;
    background: rgba(255, 255, 255, .08); font-size: 12px; color: rgba(232, 234, 246, .78); white-space: nowrap;
}
.bw-state i { width: 7px; height: 7px; border-radius: 50%; background: #5BE39A; box-shadow: 0 0 0 3px rgba(91, 227, 154, .2); }
.bw-state b { font-weight: 650; color: #fff; }
.bw-plan { margin-top: 14px; font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.08; color: #fff; }
.bw-tag { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: rgba(232, 234, 246, .62); }
.bw-bal { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; margin-top: 22px; }
.bw-bal-n { font-family: var(--font-display); font-size: 54px; font-weight: 800; letter-spacing: -.045em; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.bw-bal-u { font-size: 15px; font-weight: 600; color: rgba(232, 234, 246, .66); }
.bw-pots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.bw-pot { min-width: 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .07); }
.bw-pot-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bw-pot-hd b { font-size: 12.5px; font-weight: 600; color: rgba(232, 234, 246, .8); }
.bw-pot-hd span { font-family: var(--font-display); font-size: 17px; font-weight: 750; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bw-pot-hd small { font-size: 12px; font-weight: 600; color: rgba(232, 234, 246, .5); }
.bw-meter { height: 6px; margin: 9px 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bw-meter i { display: block; height: 100%; border-radius: inherit; background: var(--bw-head); }
.bw-pot > small { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.42; color: rgba(232, 234, 246, .56); }
.bw-meter + small { margin-top: 0; }
.bw-order { margin: 10px 0 0; font-size: 11.5px; color: rgba(232, 234, 246, .46); }
/* the balance, both pots and the buttons sit as one block in the middle of
   the card when the card is stretched to the height of its neighbour */
.bw-body { margin-block: auto; }
.bw-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; }
.bw-ghost { --btn-bg: rgba(255, 255, 255, .08); --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
.bw-ghost:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .24); color: #fff; }

/* what the balance buys */
.bw-buys { display: flex; flex-direction: column; min-width: 0; }
.bw-buy-list { list-style: none; margin: 0; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 1px; }
.bw-buy {
    display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px;
    padding: 7px 10px; border-radius: 12px; color: var(--text); text-decoration: none; transition: background var(--t-fast);
}
.bw-buy:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.bw-buy-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.bw-buy-tx { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bw-buy-tx b { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.bw-buy-tx small { font-size: 12px; color: var(--text-3); }
.bw-buy-n { font-family: var(--font-display); font-size: 18px; font-weight: 750; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bw-buy-n small { margin-left: 4px; font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--text-3); }
.bw-buy.is-short .bw-buy-ic { filter: grayscale(1); opacity: .55; }
.bw-buy.is-short .bw-buy-n small { margin: 0; color: var(--warn); }
.bw-buy.is-free .bw-buy-n { font-size: 14px; color: var(--pos); }

/* the last 30 days */
.bw-spend-total { font-family: var(--font-display); font-size: 17px; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bw-spend-total small { font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.bw-bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; }
.bw-bar i { min-width: 4px; background: var(--c); }
.bw-legend { list-style: none; margin: 14px 0 0; padding: 0; }
.bw-legend li {
    display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 42px; align-items: center; gap: 12px;
    padding: 9px 0; border-top: 1px solid var(--border-soft); font-size: 13.5px;
}
.bw-legend li:first-child { border-top: 0; }
.bw-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.bw-lg-name { min-width: 0; }
.bw-lg-name small { margin-left: 6px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.bw-legend b { font-weight: 650; font-variant-numeric: tabular-nums; }
.bw-lg-pct { text-align: right; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bw-pace { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 11px 13px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.bw-pace svg { flex: none; margin-top: 1px; }
.bw-pace.is-ok  { background: var(--pos-soft); color: #05603A; }
.bw-pace.is-low { background: var(--warn-soft); color: #93370D; }

/* history */
.bw-led { container: bwled / inline-size; }
.bw-led .card-hd { flex-wrap: wrap; row-gap: 10px; }
.bw-days { max-height: 540px; overflow-y: auto; padding: 0 12px 10px; scrollbar-width: thin; }
.bw-day-hd {
    position: sticky; top: 0; z-index: 1; padding: 10px 10px 6px; background: var(--surface);
    font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3);
}
.bw-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 62px; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 10px; }
.bw-row:hover { background: var(--surface-2); }
.bw-row[hidden], .bw-day[hidden] { display: none; }
.bw-row-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.bw-row-tx { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bw-row-tx b, .bw-row-tx small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-row-tx b { font-size: 13.5px; font-weight: 600; }
.bw-row-tx small { font-size: 12px; color: var(--text-3); }
.bw-row-d { text-align: right; font-size: 14px; }
.bw-row-bal { text-align: right; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bw-led-none { margin: 0; padding: 26px 10px; text-align: center; font-size: 13px; color: var(--text-3); }

/* compare, folded */
.bw-more { margin-top: 28px; }
.bw-more > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer;
    padding: 16px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid rgba(13, 15, 35, .06); box-shadow: var(--sh-card);
    font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -.02em;
}
.bw-more > summary::-webkit-details-marker { display: none; }
.bw-more > summary svg { color: var(--text-3); transform: rotate(90deg); transition: transform var(--t-fast); }
.bw-more[open] > summary { margin-bottom: 12px; }
.bw-more[open] > summary svg { transform: rotate(-90deg); }

@container bwtop (max-width: 820px) {
    .bw-grid { grid-template-columns: minmax(0, 1fr); }
}
@container bwtop (max-width: 460px) {
    .bw-card { padding: 20px 18px 18px; }
    .bw-plan { font-size: 28px; }
    .bw-bal-n { font-size: 46px; }
    .bw-pots { grid-template-columns: minmax(0, 1fr); }
    .bw-acts .btn { flex: 1 1 auto; justify-content: center; }
    .bw-buy-list { padding: 0 6px 8px; }
}
@container bwled (max-width: 430px) {
    .bw-row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; }
    .bw-row-bal { display: none; }
    .bw-days { padding: 0 6px 8px; }
}

/* ==========================================================================
   Compact plan cards (in-app, billing.php, 2026-12-04)
   One short row; each card in its colour; credits bar sized by the credits;
   only what a plan adds over the one before it. Rows line up via subgrid.
   ========================================================================== */
.pk-stage {
    container: pk / inline-size; margin-top: 4px; padding: 14px; border-radius: 26px;
    background: radial-gradient(760px 320px at 50% -24%, rgba(124, 92, 255, .34), transparent 66%), #0B0D1F;
    box-shadow: 0 30px 80px -40px rgba(15, 17, 36, .7);
}
.pk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pk-card {
    --pz-acc: #A5B0D6; --pz-head: linear-gradient(160deg, #2B2F4A, #1B1E36); --pz-glow: rgba(120, 130, 200, .25);
    display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0;
    min-width: 0; overflow: hidden; border-radius: 18px; background: #14172C; border: 1px solid rgba(255, 255, 255, .07); color: #E8EAF6;
    box-shadow: 0 22px 44px -32px var(--pz-glow); transition: transform .2s ease, box-shadow .2s ease;
}
@supports not (grid-template-rows: subgrid) {
    .pk-card { display: flex; flex-direction: column; }
    .pk-foot { margin-top: auto; }
}
.pk-card:hover { transform: translateY(-3px); box-shadow: 0 30px 54px -28px var(--pz-glow); }
.pk-card.is-featured { border-color: rgba(224, 164, 255, .42); box-shadow: 0 0 0 1px rgba(224, 164, 255, .18), 0 26px 50px -30px var(--pz-glow); }
.pk-card.is-current { outline: 2px solid #5BE39A; outline-offset: 2px; }

.pk-head { position: relative; padding: 14px 16px 13px; background: var(--pz-head); color: #fff; }
.pk-head::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(220px 110px at 88% -14%, rgba(255, 255, 255, .26), transparent 70%); }
.pk-head > * { position: relative; z-index: 1; }
.pk-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pk-title h3 { margin-right: 2px; font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: #fff; }
.pk-card .pz-badge, .pk-corp .pz-badge { height: 21px; padding: 0 8px; font-size: 11px; }
.pk-tag { margin: 5px 0 0; font-size: 12px; line-height: 1.35; color: rgba(255, 255, 255, .84);
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pk-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; margin-top: 10px; }
.pk-price s { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, .62); text-decoration-thickness: 1.5px; }
.pk-price s:empty { display: none; }
.pk-price b { font-family: var(--font-display); font-size: 25px; font-weight: 800; letter-spacing: -.035em; line-height: 1; color: #fff; }
.pk-price span { font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .82); }
.pk-head .pz-pill { display: inline-block; margin-top: 8px; }
.pk-sub { margin-top: 6px; font-size: 11px; line-height: 1.38; color: rgba(255, 255, 255, .78); }

.pk-cr { padding: 13px 16px 12px; }
.pk-cr-hd { display: flex; align-items: center; gap: 6px; }
.pk-cr-hd svg { flex: none; color: var(--pz-acc); }
.pk-cr-hd b { font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--pz-acc); white-space: nowrap; }
.pk-cr-hd span { font-size: 12px; color: rgba(232, 234, 246, .58); }
.pk-bar { height: 5px; margin: 9px 0 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pk-bar i { display: block; height: 100%; border-radius: inherit; background: var(--pz-head); }
.pk-card.pz-t-free .pk-bar i { background: var(--pz-acc); }
.pk-buys { list-style: none; margin: 0; padding: 0; font-size: 12.5px; line-height: 1.45; color: rgba(232, 234, 246, .86); }
.pk-buys li + li { color: rgba(232, 234, 246, .6); }
.pk-rate { margin: 6px 0 0; font-size: 11px; color: rgba(232, 234, 246, .45); }

.pk-plus { padding: 11px 16px 14px; border-top: 1px solid rgba(255, 255, 255, .07); }
.pk-plus-hd { margin-bottom: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgba(232, 234, 246, .5); }
.pk-plus ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pk-plus li { display: flex; gap: 7px; font-size: 12.5px; line-height: 1.38; color: #E8EAF6; }
.pk-plus li svg { flex: none; margin-top: 2px; color: var(--pz-acc); }

.pk-foot { align-self: end; padding: 0 16px 16px; }
.pk-cta {
    display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 12px; border-radius: 12px;
    background: #fff; color: #101326; font-size: 13.5px; font-weight: 750; text-decoration: none; text-align: center;
    box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .55); transition: transform .15s ease, box-shadow .15s ease;
}
.pk-cta:hover { transform: translateY(-1px); color: #101326; text-decoration: none; }
.pk-card.pz-t-free .pk-cta, .pk-cta[aria-disabled="true"] { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; }
.pk-card.pz-t-free .pk-cta:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.pk-cta[aria-disabled="true"] { pointer-events: none; color: rgba(255, 255, 255, .8); }

.pk-corp {
    position: relative; overflow: hidden; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px;
    margin-top: 12px; padding: 12px 14px 12px 20px; border-radius: 16px;
    background: #14172C; border: 1px solid rgba(255, 255, 255, .07); color: #E8EAF6;
}
.pk-corp::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pz-head); }
.pk-corp.is-current { outline: 2px solid #5BE39A; outline-offset: 2px; }
.pk-corp-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.pk-corp-name b { font-family: var(--font-display); font-size: 16px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.pk-corp-name > span:last-child { font-size: 12.5px; color: rgba(232, 234, 246, .62); }
.pk-corp-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; color: rgba(232, 234, 246, .62); }
.pk-corp-meta svg { color: var(--pz-acc); }
.pk-corp-meta b { font-weight: 750; color: var(--pz-acc); }
.pk-corp-meta i { font-style: normal; }
.pk-corp-cta {
    display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 8px 12px 8px 14px; border-radius: 11px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.pk-corp-cta:hover { background: rgba(255, 255, 255, .14); color: #fff; text-decoration: none; }

@container pk (max-width: 900px) { .pk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* phones: one row you swipe, the next card peeking in */
@container pk (max-width: 560px) {
    .pk-stage { padding: 12px 0; }
    .pk-grid {
        grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%;
        overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 12px;
        padding: 4px 12px 6px; scrollbar-width: none; overscroll-behavior-x: contain;
    }
    .pk-grid::-webkit-scrollbar { display: none; }
    .pk-card { scroll-snap-align: start; }
    .pk-card:hover { transform: none; }
    .pk-corp { margin: 10px 12px 0; }
    .pk-corp-cta { margin-left: 0; }
}
