/* ea-ui.css — the shared kit of EA v2's new pages (Cloudflare, Site search, Sales by region) and of
   every reworked report after them. JS helpers: web/ea-ui.js. Plan: docs/rework/plan.md §1;
   spec: docs/rework/design-language.md §13; Sasha's answers: docs/rework/decisions-2026-10-05.md.

   How it is used
   - Tokens (--ea-*) live on :root, so the sheet, the toast and the Integrations cards can use them.
   - Components (.ea-*) act only inside a page root marked .ea-page (or inside the bottom sheet):
     an old page never moves until it is migrated. Every selector is written :where(.ea-page, .ea-sheet) .x,
     so a kit rule weighs exactly one class, the same as the page rules it replaced.
   - A page file (cf.css, search.css, regions.css) keeps only what is its own: its palette, its own
     charts and blocks, and a marked block "kept as before" — the values that differ from the kit
     today. Deleting a line there = the page takes the kit value (a visible change: Sasha's call,
     plan step 1b / Q21, before/after first).

   Phone rules (plan §1.3 as revised by the decisions of 05.10; they apply to every kit component)
   - Built for 440 and 384 px only. Nothing gets smaller to fit; no kit text under 11 px (labels sized
     to a graphic excepted).
   - Every kit control has a hit area at least 44 px tall: a transparent ::before centred on it,
     reaching up and down only (never sideways into a neighbour). The visual stays as drawn.
   - No accent line on the left edge of a card or row (Sasha: "I hate this style"). No stripe modifier
     exists here; don't add one.
   - Rows: .ea-rows is a minmax(0, 1fr) grid and every name has min-width: 0 (a long product or
     campaign name otherwise pushes the page wider than the S24).
   - One meaning per colour: mint = the real thing (people, buyers, found), rose = bad, green = good
     change, amber pill with a dot = "worth a look". Pickup amber, brand / category / shop colours,
     ROAS colours, CR bands and the integration accents are listed exceptions (plan §1.4).
   - Weekends and months keep their own colours in the old reports (softened, never bright red).
   - Short English months stay (JAN … DEC, «OCT 2026»); a Ukrainian month may appear only with them.
   - Percentage points are «п.п.» (fmt.pp in ea-ui.js).
   - Count-ups: about 1.8 s (ea-ui.js COUNT_MS), ease-out; first render may set the value directly.
   - Motion: transform / opacity for anything that repeats or runs during a scroll; no endless glows on
     new pages; no layout animation on lists longer than 30 rows. Reduced motion = static.
   - Long lists: top 8–25 + «Показати всі (N)» (.ea-more + .ea-toggle), never a silent cut. */

:root {
    --ea-bg: #0a0a14;
    --ea-ink: #f3f3f8;
    --ea-ink-2: rgba(236, 236, 248, 0.7);
    --ea-ink-3: rgba(236, 236, 248, 0.56);
    --ea-ink-4: rgba(236, 236, 248, 0.36);
    --ea-line: rgba(255, 255, 255, 0.07);
    --ea-surface: rgba(255, 255, 255, 0.035);
    --ea-surface-2: rgba(255, 255, 255, 0.06);
    --ea-inset: rgba(255, 255, 255, 0.04);
    --ea-hero-bg: radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 60%),
        linear-gradient(165deg, #12131f 0%, #0d0e1a 60%, #0e0c1b 100%);
    --ea-panel-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    --ea-good: #4ade80;
    --ea-bad: #fb7185;
    --ea-bad-strong: #f43f5e;
    --ea-watch: #fbbf24;
    --ea-mint: #5eead4;
    --ea-mint-deep: #14b8a6;
    --ea-slate: #64748b;
    --ea-neutral: #e6e6f0;
    --ea-r-hero: 26px;
    --ea-r-panel: 24px;
    --ea-r-tile: 16px;
    --ea-r-switch: 13px;
    --ea-r-thumb: 10px;
    --ea-r-inset: 12px;
    --ea-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ea-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
    --ea-font-num: ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --ea-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- page frame ---------- */
.ea-page {
    color: var(--ea-ink);
    padding: 4px 16px 28px;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}
.ea-page *, .ea-sheet * { -webkit-tap-highlight-color: transparent; }
:where(.ea-page, .ea-sheet) button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:where(.ea-page, .ea-sheet) h3, :where(.ea-page, .ea-sheet) h4, :where(.ea-page, .ea-sheet) p { margin: 0; font: inherit; }

/* 44 px hit areas: a transparent layer centred on the control, up and down only */
:where(.ea-page, .ea-sheet) :where(.ea-icon-btn, .ea-switch__btn, .ea-seg__btn, .ea-chip, .ea-toggle, .ea-msg__btn, .ea-sheet__x) { position: relative; }
:where(.ea-page, .ea-sheet) :where(.ea-icon-btn, .ea-switch__btn, .ea-seg__btn, .ea-chip, .ea-toggle, .ea-msg__btn, .ea-sheet__x)::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: max(100%, 44px);
    transform: translateY(-50%);
}
/* a static chip is a label, not a control: no hit area, and it paints in normal flow (a panel's overlay stays above it) */
:where(.ea-page, .ea-sheet) .ea-chip--static { position: static; }
:where(.ea-page, .ea-sheet) .ea-chip--static::before { content: none; }

/* ---------- top bar: back · mark · title (+ a source · updated line) · refresh ---------- */
:where(.ea-page) .ea-top { display: flex; align-items: center; gap: 12px; padding: 10px 0 14px; }
:where(.ea-page) .ea-icon-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ea-surface-2);
    border: 1px solid var(--ea-line);
    color: var(--ea-ink-2);
    transition: transform 0.2s var(--ea-ease), background 0.2s;
}
:where(.ea-page) .ea-icon-btn:active { transform: scale(0.92); background: rgba(255, 255, 255, 0.1); }
:where(.ea-page) .ea-icon-btn.is-busy svg { animation: eaSpin 0.9s linear infinite; }
:where(.ea-page) .ea-top__id { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
:where(.ea-page) .ea-top__mark { width: 34px; height: 22px; flex-shrink: 0; }
:where(.ea-page) .ea-top__title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
:where(.ea-page) .ea-top__text { min-width: 0; }
:where(.ea-page) .ea-top__sub { margin-top: 1px; font-size: 12px; color: var(--ea-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- hero: verdict · one big number · one chart · three stats ---------- */
:where(.ea-page) .ea-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--ea-r-hero);
    padding: 16px;
    background: var(--ea-hero-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 50px -32px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.4s;
}
:where(.ea-page) .ea-hero[data-level="watch"] { border-color: rgba(251, 191, 36, 0.32); }
:where(.ea-page) .ea-hero[data-level="problem"] { border-color: rgba(244, 63, 94, 0.35); }
:where(.ea-page) .ea-hero__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
:where(.ea-page) .ea-hero__main { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
:where(.ea-page) .ea-hero__who { min-width: 0; }
/* a snapshot whose refresh failed: shown, dimmed (on the children: an entrance fill keeps the parents at 1) */
:where(.ea-page) .ea-hero.is-dim .ea-hero__main > *,
:where(.ea-page) .ea-hero.is-dim .ea-stat { opacity: 0.55; }

/* verdict pill; its dot pings only while something is wrong */
:where(.ea-page) .ea-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
    color: var(--ea-good);
    background: rgba(74, 222, 128, 0.09);
    border: 1px solid rgba(74, 222, 128, 0.2);
    min-width: 0;
}
:where(.ea-page) .ea-state[data-level="watch"] { color: var(--ea-watch); background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.26); }
:where(.ea-page) .ea-state[data-level="problem"] { color: var(--ea-bad); background: rgba(244, 63, 94, 0.12); border-color: rgba(244, 63, 94, 0.34); }
:where(.ea-page) .ea-state__dot { position: relative; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
:where(.ea-page) .ea-state[data-level="watch"] .ea-state__dot::after,
:where(.ea-page) .ea-state[data-level="problem"] .ea-state__dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: currentColor;
    animation: eaPing 2s var(--ea-ease) infinite;
}
/* «● наживо 02:24» · «знімок 02:24» · stacked «знімок …» over «не оновлено» */
:where(.ea-page) .ea-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ea-ink-3); white-space: nowrap; }
:where(.ea-page) .ea-live.is-live { color: var(--ea-ink-2); }
:where(.ea-page) .ea-live.is-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ea-good); }
:where(.ea-page) .ea-live.is-failed { flex-direction: column; align-items: flex-end; gap: 1px; line-height: 1.25; }
:where(.ea-page) .ea-live.is-failed small { font-size: 11px; color: var(--ea-bad); }

/* watch / problem: the first reason is the headline, the big number steps down */
:where(.ea-page) .ea-alert { margin-top: 12px; }
:where(.ea-page) .ea-alert__head { font-size: 17px; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; }
:where(.ea-page) .ea-alert__more { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
:where(.ea-page) .ea-alert__more li { font-size: 13px; color: var(--ea-ink-2); display: flex; gap: 8px; align-items: baseline; }
:where(.ea-page) .ea-alert__more li::before { content: ''; width: 6px; height: 6px; border-radius: 2px; flex-shrink: 0; transform: translateY(-1px); background: var(--ea-watch); }
:where(.ea-page) .ea-alert__more li[data-level="problem"]::before { background: var(--ea-bad-strong); }

:where(.ea-page) .ea-big {
    font-family: var(--ea-font-num);
    font-size: 64px;
    line-height: 0.92;
    font-weight: 700;
    letter-spacing: -0.045em;
    color: var(--ea-ink);
}
/* the number carries the rounded face itself (the global * { font-family } reset would undo inheritance) */
:where(.ea-page) .ea-big .ea-num { font-family: inherit; }
:where(.ea-page) .ea-hero.is-alert .ea-big { font-size: 40px; }
:where(.ea-page) .ea-big__label { margin-top: 8px; font-size: 15px; font-weight: 600; }
:where(.ea-page) .ea-big__sub { margin-top: 2px; font-size: 12px; color: var(--ea-ink-3); }
:where(.ea-page, .ea-sheet) .ea-kicker { font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ea-ink-3); }

/* ring: segments drawn with pathLength=100 and stroke-dasharray var(--v) 100 */
:where(.ea-page) .ea-ring { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
:where(.ea-page) .ea-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
:where(.ea-page) .ea-ring__track { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 9; }
:where(.ea-page) .ea-ring__seg { fill: none; stroke-width: 9; stroke-dasharray: var(--v) 100; }
:where(.ea-page) .ea-ring__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
:where(.ea-page) .ea-ring__val { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
:where(.ea-page) .ea-ring__lbl { font-size: 11px; color: var(--ea-ink-3); margin-top: 2px; }
:where(.ea-page) .ea-ring--small { width: 44px; height: 44px; }
:where(.ea-page) .ea-ring--small .ea-ring__track, :where(.ea-page) .ea-ring--small .ea-ring__seg { stroke-width: 10; }
/* a ring with its label (and a change pill) under it */
:where(.ea-page) .ea-ringwrap { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
:where(.ea-page) .ea-ringwrap__lbl { font-size: 11px; color: var(--ea-ink-3); letter-spacing: 0.02em; white-space: nowrap; }

/* the three-column strip under the hero chart */
:where(.ea-page, .ea-sheet) .ea-stats { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr) minmax(0, 0.95fr); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ea-line); }
:where(.ea-page, .ea-sheet) .ea-stat { padding: 0 8px; min-width: 0; }
:where(.ea-page, .ea-sheet) .ea-stat:first-child { padding-left: 0; }
:where(.ea-page, .ea-sheet) .ea-stat + .ea-stat { border-left: 1px solid var(--ea-line); }
:where(.ea-page, .ea-sheet) .ea-stat__k { font-size: 12px; color: var(--ea-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:where(.ea-page, .ea-sheet) .ea-stat__v { margin-top: 3px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
:where(.ea-page, .ea-sheet) .ea-stat__v small { font-size: 13px; font-weight: 600; color: var(--ea-ink-3); margin-left: 2px; }
:where(.ea-page, .ea-sheet) .ea-stat__v.is-bad { color: var(--ea-bad); }
:where(.ea-page, .ea-sheet) .ea-stat__v.is-warn { color: var(--ea-watch); }
:where(.ea-page, .ea-sheet) .ea-stat__s { margin-top: 1px; font-size: 12px; color: var(--ea-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- switches ---------- */
/* the period switch: sticky, n equal buttons (--n), a thumb moved by --pos; with a sentinel before it
   (ea-ui.js stickyCompact) it turns compact once stuck under the app header */
:where(.ea-page) .ea-sentinel { height: 1px; margin-top: 15px; }
:where(.ea-page) .ea-switch-wrap {
    position: sticky;
    top: 0; /* #app-content scroll-padding-top already keeps it under the glass header */
    z-index: 5;
    margin: 0 -16px;
    padding: 8px 16px;
    background: var(--ea-bg);
    transition: padding 0.2s var(--ea-ease);
}
:where(.ea-page) .ea-switch-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 8px;
    background: linear-gradient(180deg, var(--ea-bg), rgba(10, 10, 20, 0));
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
:where(.ea-page) .ea-switch-wrap.is-stuck { padding: 4px 16px; }
/* Stuck under the glass app header (2.30): a solid backing behind the header too, so the page doesn't peek
   through as a cut strip between the header and the switch (Sasha 10.10). Only while stuck: unstuck, the
   space above the switch is page content. */
.ea-switch-wrap.is-stuck::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: var(--hdr-h, 60px);
    background: var(--ea-bg, #0a0a14);
    pointer-events: none;
}
/* …and the header's hairline goes, so header and switch read as one block */
body:has(.view:not(.hidden) .ea-switch-wrap.is-stuck) .app-header {
    border-bottom-color: transparent;
}
:where(.ea-page) .ea-switch-wrap.is-stuck::after { opacity: 1; }
:where(.ea-page) .ea-switch {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--n, 3), 1fr);
    padding: 3px;
    border-radius: var(--ea-r-switch);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ea-line);
}
:where(.ea-page) .ea-switch__thumb {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / var(--n, 3));
    border-radius: var(--ea-r-thumb);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateX(calc(var(--pos, 0) * 100%));
    transition: transform 0.45s var(--ea-spring);
}
:where(.ea-page) .ea-switch__btn { position: relative; z-index: 1; height: 34px; font-size: 13px; font-weight: 600; color: var(--ea-ink-3); transition: color 0.25s, height 0.2s var(--ea-ease); }
:where(.ea-page) .ea-switch__btn[aria-selected="true"] { color: var(--ea-ink); }
:where(.ea-page) .ea-switch-wrap.is-stuck .ea-switch__btn { height: 24px; }
/* floating «◌ Завантажую · 30 днів» under the switch while a period loads */
:where(.ea-page) .ea-loading {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(24, 24, 38, 0.96);
    border: 1px solid var(--ea-line);
    font-size: 12px;
    font-weight: 600;
    color: var(--ea-ink-2);
    white-space: nowrap;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
    animation: eaFadeUp 0.25s ease both;
}
:where(.ea-page) .ea-loading[hidden] { display: none; }
:where(.ea-page) .ea-loading svg { animation: eaSpin 0.9s linear infinite; }
:where(.ea-page) .ea-stamp { min-height: 16px; margin: 6px 2px 0; font-size: 12px; color: var(--ea-ink-4); text-align: center; }
:where(.ea-page) .ea-stamp.is-failed { color: var(--ea-bad); }

/* mini toggle: an inline two-option pill (map mode, a metric) */
:where(.ea-page, .ea-sheet) .ea-seg--mini {
    display: inline-flex;
    padding: 3px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ea-line);
    flex-shrink: 0;
}
:where(.ea-page, .ea-sheet) .ea-seg__btn {
    padding: 4px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ea-ink-3);
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
:where(.ea-page, .ea-sheet) .ea-seg__btn[aria-selected="true"] { background: rgba(255, 255, 255, 0.12); color: var(--ea-ink); }

/* chips, and a horizontal chip strip under a switch (soft edges; the chosen chip centred by the page) */
:where(.ea-page, .ea-sheet) .ea-chip {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--ea-line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ea-ink-2);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
:where(.ea-page, .ea-sheet) .ea-chip--on { background: rgba(94, 234, 212, 0.14); border-color: rgba(94, 234, 212, 0.45); color: var(--ea-ink); }
:where(.ea-page, .ea-sheet) .ea-chip--static { padding: 4px 10px; font-size: 12px; cursor: default; flex-shrink: 0; }
:where(.ea-page) .ea-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    max-height: 0;
    opacity: 0;
    margin: 0 -16px;
    padding: 0 16px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
    transition: max-height 0.35s var(--ea-ease), opacity 0.3s, margin-bottom 0.35s var(--ea-ease);
}
:where(.ea-page) .ea-strip::-webkit-scrollbar { display: none; }
:where(.ea-page) .ea-strip.is-open { max-height: 44px; opacity: 1; margin-bottom: 10px; }

/* ---------- panels: icon chip + title + meta, an intro, a lead number, evidence, detail ---------- */
:where(.ea-page) .ea-panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 10px; transition: opacity 0.2s; }
:where(.ea-page) .ea-panels.is-waiting { opacity: 0.45; pointer-events: none; }
:where(.ea-page) .ea-panel {
    position: relative;
    min-width: 0;
    padding: 18px;
    border-radius: var(--ea-r-panel);
    background: var(--ea-panel-bg);
    border: 1px solid var(--ea-line);
}
:where(.ea-page) .ea-panel__head { display: flex; align-items: center; gap: 10px; }
:where(.ea-page) .ea-panel__icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--c, var(--ea-ink-2));
    background: color-mix(in srgb, var(--c, #ffffff) 12%, transparent);
}
:where(.ea-page) .ea-panel__title { flex: 1; min-width: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.005em; }
:where(.ea-page) .ea-panel__meta { font-size: 12px; color: var(--ea-ink-3); text-align: right; white-space: nowrap; }
:where(.ea-page) .ea-panel__intro { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--ea-ink-3); }
:where(.ea-page) .ea-lead { margin-top: 14px; }
:where(.ea-page) .ea-lead__num { font-size: 32px; line-height: 1; font-weight: 700; letter-spacing: -0.035em; color: var(--ea-ink); }
:where(.ea-page) .ea-lead__num small { font-size: 15px; font-weight: 600; color: var(--ea-ink-3); letter-spacing: 0; margin-left: 6px; }
:where(.ea-page) .ea-lead__num--human { color: var(--ea-mint); }
:where(.ea-page) .ea-lead__num--bad { color: var(--ea-bad); }
:where(.ea-page) .ea-lead__txt { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--ea-ink-2); }
:where(.ea-page) .ea-lead__txt b { color: var(--ea-ink); font-weight: 600; }
/* a sub-heading inside a panel (sentence case) */
:where(.ea-page, .ea-sheet) .ea-sub { margin-top: 18px; font-size: 12px; font-weight: 600; color: var(--ea-ink-3); }

/* ---------- split bar: labels under the segments, or a wrapping legend ---------- */
:where(.ea-page, .ea-sheet) .ea-split { display: flex; gap: 3px; height: 10px; margin-top: 14px; }
:where(.ea-page, .ea-sheet) .ea-split__seg { flex: var(--v) 1 0; min-width: 3px; border-radius: 3px; background: var(--c); transform-origin: left center; }
:where(.ea-page, .ea-sheet) .ea-split__seg:first-child { border-radius: 5px 3px 3px 5px; }
:where(.ea-page, .ea-sheet) .ea-split__seg:last-child { border-radius: 3px 5px 5px 3px; }
:where(.ea-page, .ea-sheet) .ea-split__seg:only-child { border-radius: 5px; }
:where(.ea-page, .ea-sheet) .ea-split--thin { height: 6px; margin-top: 12px; }
:where(.ea-page, .ea-sheet) .ea-split--thick { height: 12px; }
:where(.ea-page, .ea-sheet) .ea-split__labels { display: flex; gap: 8px; margin-top: 8px; }
:where(.ea-page, .ea-sheet) .ea-split__lbl { flex: var(--w) 1 0; min-width: 0; font-size: 12px; line-height: 1.3; color: var(--ea-ink-3); }
:where(.ea-page, .ea-sheet) .ea-split__lbl b { display: block; font-size: 13px; font-weight: 650; color: var(--ea-ink); }
:where(.ea-page, .ea-sheet) .ea-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--ea-ink-3); }
:where(.ea-page, .ea-sheet) .ea-legend > span { display: inline-flex; align-items: center; gap: 6px; }
:where(.ea-page, .ea-sheet) .ea-legend i:not(.ea-sw) { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
:where(.ea-page, .ea-sheet) .ea-legend b { color: var(--ea-ink-2); font-weight: 650; }
/* the legend under a split bar: a little air after each % (as shipped on Cloudflare / Search) */
:where(.ea-page, .ea-sheet) .ea-legend--split b { margin-right: 2px; }
/* a swatch with a soft glow of its own colour */
:where(.ea-page, .ea-sheet) .ea-sw {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 3px;
    flex-shrink: 0;
    background: var(--ea-swc, var(--ea-mint));
    box-shadow: 0 0 8px var(--ea-swc, var(--ea-mint));
}
/* a legend as a table: swatch · name · aside · % */
:where(.ea-page, .ea-sheet) .ea-keys { display: grid; gap: 9px; margin-top: 14px; }
:where(.ea-page, .ea-sheet) .ea-key { display: grid; grid-template-columns: 10px 1fr auto 44px; align-items: center; gap: 10px; font-size: 13px; }
:where(.ea-page, .ea-sheet) .ea-key__name { color: var(--ea-ink-2); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:where(.ea-page, .ea-sheet) .ea-key__aside { font-size: 12px; color: var(--ea-ink-3); white-space: nowrap; }
:where(.ea-page, .ea-sheet) .ea-key__pct { font-weight: 650; text-align: right; }

/* ---------- charts (hand-built SVG, sized in px from the container) ---------- */
:where(.ea-page) .ea-chart { position: relative; margin-top: 18px; }
:where(.ea-page) .ea-chart svg { display: block; width: 100%; overflow: visible; }
:where(.ea-page) .ea-chart--scrub { touch-action: pan-y; cursor: pointer; user-select: none; -webkit-user-select: none; }
:where(.ea-page) .ea-ghost { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; animation: eaFadeOut 0.2s ease forwards; }
:where(.ea-page) .ea-xin { animation: eaFade 0.2s ease both; }
:where(.ea-page) .ea-axis-lbl { font-size: 11px; fill: var(--ea-ink-4); }
:where(.ea-page) .ea-col .ea-hit { fill: transparent; }
:where(.ea-page) .ea-col.is-sel .ea-hit { fill: rgba(255, 255, 255, 0.06); }
:where(.ea-page) .ea-chart--dim .ea-col:not(.is-sel) rect:not(.ea-hit) { opacity: 0.38; transition: opacity 0.15s; }
/* an unfinished period is an outline, never a solid "drop"; a forecast is dashed */
:where(.ea-page) .ea-partial { fill: none; stroke: rgba(255, 255, 255, 0.45); stroke-width: 1; stroke-dasharray: 3 3; }
/* "not final yet" (colChart soft): the stack faded inside a dashed outline; a forecast (colChart
   forecast): a dashed outline up to the expected value, its number over it; a mark under a column */
:where(.ea-page) .ea-soft { fill-opacity: 0.5; }
:where(.ea-page) .ea-soft-ol { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1; stroke-dasharray: 2 2; }
:where(.ea-page) .ea-fc { fill: rgba(255, 255, 255, 0.025); stroke: rgba(255, 255, 255, 0.6); stroke-width: 1.2; stroke-dasharray: 3 3; }
:where(.ea-page) .ea-fc-lbl { font-size: 11px; font-weight: 650; fill: var(--ea-ink-2); }
:where(.ea-page) .ea-fc-lead { stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; stroke-dasharray: 2 2; }
:where(.ea-page) .ea-col-mark { fill: rgba(255, 255, 255, 0.3); }
:where(.ea-page) .ea-dash { fill: none; stroke-width: 1.6; stroke-dasharray: 3 4; stroke-linecap: round; }
:where(.ea-page) .ea-end-lbl { font-size: 11px; fill: var(--ea-ink-3); }
:where(.ea-page) .ea-end-lbl--main { fill: var(--ea-ink); font-weight: 600; }
:where(.ea-page) .ea-end-lbl__k { fill: var(--ea-ink-4); font-weight: 500; }
:where(.ea-page) .ea-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
/* the caption of the selected (else the latest complete) column */
:where(.ea-page) .ea-cap {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: var(--ea-r-inset);
    background: rgba(255, 255, 255, 0.04);
    min-height: 46px;
}
:where(.ea-page) .ea-cap__when { align-self: center; font-size: 13px; font-weight: 650; }
:where(.ea-page) .ea-cap__item { min-width: 0; }
:where(.ea-page) .ea-cap__item small { display: block; font-size: 11px; color: var(--ea-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:where(.ea-page) .ea-cap__item b { font-size: 13px; font-weight: 650; white-space: nowrap; }

/* ---------- ranked rows: name · value, a note, a 4 px bar against the top ---------- */
:where(.ea-page, .ea-sheet) .ea-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
:where(.ea-page, .ea-sheet) .ea-row { min-width: 0; }
:where(.ea-page, .ea-sheet) .ea-row__top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
:where(.ea-page, .ea-sheet) .ea-row__rank { width: 18px; flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--ea-ink-4); text-align: right; }
:where(.ea-page, .ea-sheet) .ea-row__name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:where(.ea-page, .ea-sheet) .ea-row__val { flex-shrink: 0; font-size: 13px; font-weight: 650; }
:where(.ea-page, .ea-sheet) .ea-row__note { margin-top: 1px; font-size: 12px; color: var(--ea-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:where(.ea-page, .ea-sheet) .ea-row__bar { margin-top: 6px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
:where(.ea-page, .ea-sheet) .ea-row__fill { width: calc(var(--v) * 1%); height: 100%; border-radius: 4px; background: var(--c); transform-origin: left center; }
:where(.ea-page, .ea-sheet) .ea-row--path .ea-row__name { font-family: var(--ea-font-mono); font-size: 13px; font-weight: 500; }
/* rows that are not part of the ranking, under a dashed divider */
:where(.ea-page, .ea-sheet) .ea-rows--apart { margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, 0.1); }

/* a dense ranked table: rank · name (+ a tag) · bar · value · count; columns via --cols */
:where(.ea-page, .ea-sheet) .ea-table { display: grid; gap: 2px; margin-top: 6px; }
:where(.ea-page, .ea-sheet) .ea-table__row {
    display: grid;
    grid-template-columns: var(--cols, 18px minmax(0, 1fr) 40px 62px 28px);
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 2px;
    border-radius: 10px;
    text-align: left;
}
:where(.ea-page, .ea-sheet) .ea-table__row--head { padding: 0 2px; }
:where(.ea-page, .ea-sheet) .ea-table__row--head .ea-table__val, :where(.ea-page, .ea-sheet) .ea-table__row--head .ea-table__n2 { font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ea-ink-3); }
:where(.ea-page, .ea-sheet) button.ea-table__row:active { background: rgba(255, 255, 255, 0.04); }
:where(.ea-page, .ea-sheet) .ea-table__rank { font-size: 11px; font-weight: 700; color: var(--ea-ink-4); text-align: right; }
:where(.ea-page, .ea-sheet) .ea-table__name { display: flex; align-items: center; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; }
:where(.ea-page, .ea-sheet) .ea-table__txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
:where(.ea-page, .ea-sheet) .ea-table__name small { font-size: 11px; font-weight: 500; color: var(--ea-ink-3); }
:where(.ea-page, .ea-sheet) .ea-table__bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
:where(.ea-page, .ea-sheet) .ea-table__bar span {
    display: block;
    height: 100%;
    width: calc(var(--w, 0) * 1%);
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.5), var(--ea-mint));
    transform-origin: left center;
}
:where(.ea-page, .ea-sheet) .ea-table__val { font-size: 13px; font-weight: 650; text-align: right; white-space: nowrap; }
:where(.ea-page, .ea-sheet) .ea-table__n2 { font-size: 11px; color: var(--ea-ink-3); text-align: right; }

/* ours (solid) next to another source (outline), per row */
:where(.ea-page) .ea-pairs { display: grid; gap: 9px; }
:where(.ea-page) .ea-pairs__sep { height: 1px; margin: 2px 0; background: var(--ea-line); }
:where(.ea-page) .ea-pair { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr 48px; align-items: center; gap: 10px; }
:where(.ea-page) .ea-pair__name { font-size: 13px; color: var(--ea-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:where(.ea-page) .ea-pair--muted .ea-pair__name { color: var(--ea-ink-3); }
:where(.ea-page) .ea-pair__bars { display: grid; gap: 3px; }
:where(.ea-page) .ea-pair__bar { display: block; height: 5px; width: calc(var(--w, 0) * 1%); min-width: 2px; border-radius: 3px; transform-origin: left center; }
:where(.ea-page) .ea-pair__bar--ours { background: linear-gradient(90deg, var(--ea-mint-deep), var(--ea-mint)); box-shadow: 0 0 8px rgba(94, 234, 212, 0.25); }
:where(.ea-page) .ea-pair__bar--other { background: rgba(203, 213, 225, 0.14); box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.6); }
:where(.ea-page) .ea-pair__v { display: grid; justify-items: end; font-size: 12px; line-height: 1.15; }
:where(.ea-page) .ea-pair__v b { color: var(--ea-mint); font-weight: 650; }
:where(.ea-page) .ea-pair__v span { color: #cbd5e1; }

/* ---------- folding: «Показати всі (N)» / «Згорнути», «Як рахуємо», «деталі» ---------- */
:where(.ea-page) .ea-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ea-ease); }
:where(.ea-page) .ea-more.is-open { grid-template-rows: 1fr; }
:where(.ea-page) .ea-more__in { overflow: hidden; min-height: 0; min-width: 0; }
:where(.ea-page) .ea-more__in > .ea-rows { padding-top: 12px; margin-top: 0; }
:where(.ea-page) .ea-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 14px;
    height: 38px;
    border-radius: var(--ea-r-inset);
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
    font-weight: 600;
    color: var(--ea-ink-2);
}
:where(.ea-page) .ea-toggle svg { transition: transform 0.3s var(--ea-ease); flex-shrink: 0; }
:where(.ea-page) .ea-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
:where(.ea-page) .ea-how { font-size: 12px; line-height: 1.5; color: var(--ea-ink-3); }
:where(.ea-page) .ea-how summary { list-style: none; position: relative; padding: 6px 0 6px 17px; text-indent: -17px; cursor: pointer; }
/* the tap area reaches 44 px (the line itself stays 30 px tall) */
:where(.ea-page) .ea-how summary::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
:where(.ea-page) .ea-how summary::-webkit-details-marker { display: none; }
:where(.ea-page) .ea-how summary::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 9px 1px 2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.25s var(--ea-ease);
}
:where(.ea-page) .ea-how[open] summary::before { transform: rotate(45deg); }
:where(.ea-page) .ea-how b { color: var(--ea-ink-2); }
:where(.ea-page) .ea-how .ea-split, :where(.ea-page) .ea-how .ea-legend { margin-left: 17px; }
:where(.ea-page) .ea-how .ea-split { margin-top: 8px; }
:where(.ea-page) .ea-how p { margin: 10px 0 8px 17px; }
:where(.ea-page) .ea-how ul { margin: 0 0 8px 31px; }
:where(.ea-page) .ea-details { margin-top: 12px; font-size: 12px; color: var(--ea-ink-3); }
:where(.ea-page) .ea-details summary { cursor: pointer; list-style: none; display: inline-block; text-decoration: underline; text-underline-offset: 3px; }
:where(.ea-page) .ea-details summary::-webkit-details-marker { display: none; }
:where(.ea-page) .ea-details code { display: block; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.3); font-size: 12px; text-align: left; overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------- key / value grid, tiles, compare tiles ---------- */
:where(.ea-page) .ea-kvs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; margin-top: 14px; }
:where(.ea-page) .ea-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--ea-line); min-width: 0; }
:where(.ea-page) .ea-kv__k { min-width: 0; font-size: 12px; line-height: 1.3; color: var(--ea-ink-2); }
:where(.ea-page) .ea-kv__k small { display: block; font-size: 11px; color: var(--ea-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.ea-page) .ea-kv__v { flex-shrink: 0; font-size: 15px; font-weight: 650; text-align: right; }
:where(.ea-page) .ea-kv.is-bad .ea-kv__v { color: var(--ea-bad); }
:where(.ea-page) .ea-kv.is-muted .ea-kv__v { color: var(--ea-ink-2); font-weight: 600; }
:where(.ea-page) .ea-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
:where(.ea-page) .ea-tile { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--ea-r-tile); background: rgba(255, 255, 255, 0.04); min-width: 0; }
:where(.ea-page) .ea-tile__v { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
:where(.ea-page) .ea-tile__k { margin-top: 2px; font-size: 12px; line-height: 1.3; color: var(--ea-ink-3); }
:where(.ea-page) .ea-tile__s { margin-top: 4px; font-size: 11px; color: var(--ea-ink-2); }
:where(.ea-page) .ea-tile__glyph { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; color: var(--ea-neutral); background: rgba(255, 255, 255, 0.07); }
/* side-by-side units (stores, shops): the current one tinted with the page accent (--ea-accent) */
:where(.ea-page) .ea-compares { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
:where(.ea-page) .ea-compare { padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--ea-line); min-width: 0; }
:where(.ea-page) .ea-compare.is-current {
    border-color: color-mix(in srgb, var(--ea-accent, var(--ea-mint)) 32%, transparent);
    background: linear-gradient(160deg, color-mix(in srgb, var(--ea-accent, var(--ea-mint)) 9%, transparent), rgba(255, 255, 255, 0.02));
}
:where(.ea-page) .ea-compare__name { font-size: 12px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ea-ink-3); }
:where(.ea-page) .ea-compare__v { margin-top: 6px; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
:where(.ea-page) .ea-compare__k { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 2px; font-size: 12px; color: var(--ea-ink-3); }
:where(.ea-page) .ea-compare__bar { margin-top: 12px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
:where(.ea-page) .ea-compare__bar span { display: block; height: 100%; width: calc(var(--v) * 1%); min-width: 2px; border-radius: 4px; background: var(--c, var(--ea-bad)); transform-origin: left center; }
:where(.ea-page) .ea-compare__s { margin-top: 6px; font-size: 12px; color: var(--ea-ink-3); }

/* ---------- pills ---------- */
/* the one change pill: «−19%», «+1,2 п.п.», «нове»; U+2212 minus (fmt.pp / delta() in ea-ui.js) */
:where(.ea-page, .ea-sheet) .ea-delta { display: inline-block; flex-shrink: 0; padding: 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
:where(.ea-page, .ea-sheet) .ea-delta--up { color: var(--ea-good); background: rgba(74, 222, 128, 0.13); }
:where(.ea-page, .ea-sheet) .ea-delta--down { color: var(--ea-bad); background: rgba(251, 113, 133, 0.13); }
:where(.ea-page, .ea-sheet) .ea-delta--flat, :where(.ea-page, .ea-sheet) .ea-delta--new { color: var(--ea-ink-2); background: rgba(255, 255, 255, 0.07); }
:where(.ea-page, .ea-sheet) .ea-delta--big { padding: 4px 10px; font-size: 13px; }
/* a small coloured label in a row (--c) */
:where(.ea-page, .ea-sheet) .ea-tag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 1px 7px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.4;
    white-space: nowrap;
    color: var(--c, var(--ea-mint));
    background: color-mix(in srgb, var(--c, var(--ea-mint)) 14%, transparent);
}

/* ---------- notes, footers, states ---------- */
:where(.ea-page, .ea-sheet) .ea-footnote { margin-top: 12px; font-size: 12px; line-height: 1.45; color: var(--ea-ink-3); }
:where(.ea-page) .ea-foot { margin-top: 18px; padding: 0 4px; font-size: 11px; line-height: 1.55; color: var(--ea-ink-4); text-align: center; }
:where(.ea-page) .ea-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--ea-r-inset); background: rgba(255, 255, 255, 0.04); font-size: 12px; color: var(--ea-ink-2); }
:where(.ea-page) .ea-note svg { flex-shrink: 0; }
:where(.ea-page) .ea-note--busy svg { animation: eaSpin 1.6s linear infinite; }
/* error / not configured / empty: one centred card (ea-ui.js msgCard + autoRetry) */
:where(.ea-page) .ea-msg { margin-top: 6px; padding: 26px 22px; border-radius: var(--ea-r-panel); text-align: center; background: var(--ea-surface); border: 1px solid var(--ea-line); }
:where(.ea-page) .ea-msg__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--ea-ink-2); background: rgba(255, 255, 255, 0.06); }
:where(.ea-page) .ea-msg__t { margin-top: 12px; font-size: 15px; font-weight: 650; }
:where(.ea-page) .ea-msg__s { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--ea-ink-3); }
:where(.ea-page) .ea-msg__btn { margin-top: 14px; padding: 9px 18px; border-radius: var(--ea-r-inset); background: var(--ea-surface-2); border: 1px solid var(--ea-line); font-size: 13px; font-weight: 600; }

/* skeletons in the final layout */
:where(.ea-page) .ea-sk {
    display: block;
    border-radius: 8px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.085) 50%, rgba(255, 255, 255, 0.04) 70%);
    background-size: 300% 100%;
    animation: eaShimmer 1.6s linear infinite;
}
:where(.ea-page) .ea-sk--pill { width: 170px; height: 30px; border-radius: 999px; }
:where(.ea-page) .ea-sk--chip { width: 82px; height: 14px; }
:where(.ea-page) .ea-sk--big { width: 110px; height: 58px; border-radius: 12px; }
:where(.ea-page) .ea-sk--line { width: 140px; height: 13px; margin-top: 10px; }
:where(.ea-page) .ea-sk--short { width: 100px; }
:where(.ea-page) .ea-sk--ring { width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0; }
:where(.ea-page) .ea-sk--k { width: 60%; height: 11px; margin-top: 3px; }
:where(.ea-page) .ea-sk--v { width: 75%; height: 22px; margin-top: 6px; }
:where(.ea-page) .ea-sk--icon { width: 30px; height: 30px; border-radius: 10px; }
:where(.ea-page) .ea-sk--title { width: 130px; height: 15px; }
:where(.ea-page) .ea-sk--lead { width: 90px; height: 32px; margin-top: 16px; }
:where(.ea-page) .ea-sk--bar { height: 10px; margin-top: 16px; border-radius: 5px; }
:where(.ea-page) .ea-sk--chart { height: 130px; margin-top: 18px; border-radius: 12px; }
:where(.ea-page) .ea-sk--switch { width: 100%; height: 36px; border-radius: 12px; }

/* ---------- bottom sheet (on <body>; ea-ui.js openSheet) ---------- */
.ea-sheet {
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    color: var(--ea-ink);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}
.ea-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 10, 0.62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s;
}
.ea-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    max-height: 86vh;
    border-radius: 28px 28px 0 0;
    background: linear-gradient(180deg, #121624 0%, #0b0d17 60%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -24px 60px -20px rgba(94, 234, 212, 0.25);
    transform: translateY(104%);
    transition: transform 0.45s var(--ea-ease);
}
.ea-sheet__panel:focus { outline: none; }
.ea-sheet__panel--drag { transition: none; }
.ea-sheet--open { pointer-events: auto; }
.ea-sheet--open .ea-sheet__backdrop { opacity: 1; }
.ea-sheet--open .ea-sheet__panel { transform: translateY(var(--ea-drag, 0px)); }
/* the header drags the sheet down to close it */
.ea-sheet__head { position: relative; flex-shrink: 0; padding: 10px 18px 6px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ea-sheet__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 18px calc(22px + env(safe-area-inset-bottom, 0px)); }
.ea-sheet__grip { width: 38px; height: 4px; margin: 0 auto 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.ea-sheet .ea-sheet__x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--ea-line);
    color: var(--ea-ink-2);
}
.ea-sheet__title { margin: 6px 44px 4px 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }

/* ---------- toast (on <body>; ea-ui.js toast) ---------- */
.ea-toast {
    position: fixed;
    left: 50%;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    z-index: 200;
    max-width: calc(100% - 48px);
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(28, 26, 40, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translate(-50%, 16px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ea-spring), opacity 0.25s;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.ea-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.ea-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ---------- the Integrations card's two meta lines (outside any page) ---------- */
.ea-cardmeta { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.ea-cardmeta b { color: rgba(255, 255, 255, 0.88); font-weight: 650; }
.ea-cardmeta .is-ok { color: var(--ea-good); }
.ea-cardmeta .is-watch { color: var(--ea-watch); }
.ea-cardmeta .is-problem { color: var(--ea-bad); }

/* ---------- motion: entrances play once; a switch never replays them ---------- */
/* a panel rises the first time a quarter of it is on screen (ea-ui.js reveal) */
:where(.ea-page) .ea-panel.ea-enter:not(.is-in) { opacity: 0; transform: translateY(8px); }
:where(.ea-page) .ea-panel.ea-enter.is-in { animation: eaRise 0.45s var(--ea-ease) both; }
:where(.ea-page) .ea-enter.is-in .ea-lead, :where(.ea-page) .ea-enter.is-in .ea-tile__v { animation: eaFadeUp 0.3s ease 0.12s both; }
:where(.ea-page) .ea-enter.is-in .ea-grow-x { animation: eaGrowX 0.7s var(--ea-ease) both; animation-delay: calc(0.18s + var(--j, 0) * 50ms); }
:where(.ea-page) .ea-enter.is-in .ea-col rect:not(.ea-hit) { transform-box: fill-box; transform-origin: center bottom; animation: eaGrowY 0.6s var(--ea-ease) both; animation-delay: calc(0.15s + var(--k, 0) * 18ms); }
:where(.ea-page) .ea-enter.is-in .ea-draw { animation: eaDraw 0.9s var(--ea-ease) both; animation-delay: calc(0.15s + var(--d, 0s)); }
:where(.ea-page) .ea-enter.is-in .ea-fade { animation: eaFade 0.3s ease both; animation-delay: calc(0.15s + var(--d, 0s)); }
:where(.ea-page) .ea-enter.is-in .ea-dash { animation: eaFade 0.3s ease 1.05s both; }
:where(.ea-page) .ea-enter.is-in .ea-ring__seg { animation: eaRing 0.9s var(--ea-ease) 0.2s both; }
/* charts redrawn for a new width appear at once */
.ea-still, .ea-still * { animation: none !important; }

@keyframes eaRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes eaFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes eaFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes eaFadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes eaDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes eaGrowX { from { transform: scaleX(0); } }
@keyframes eaGrowY { from { transform: scaleY(0); } }
@keyframes eaRing { from { stroke-dasharray: 0 100; } }
@keyframes eaReveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes eaSpin { to { transform: rotate(360deg); } }
@keyframes eaShimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
@keyframes eaPing { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(2.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .ea-page *, .ea-page *::before, .ea-page *::after,
    .ea-sheet, .ea-sheet *, .ea-sheet *::before, .ea-sheet *::after, .ea-toast {
        animation: none !important;
        transition: none !important;
    }
    .ea-page .ea-panel.ea-enter { opacity: 1; transform: none; }
    .ea-page .ea-ghost { display: none; }
}
