/* Showrunner, arena edition: plum-black night, guard pink for what needs your eye, teal for
   what is valid and paid. Montserrat for the big numbers and titles, DM Sans for everything you read. */
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans.ttf') format('truetype'); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans-Italic.ttf') format('truetype'); font-weight: 100 1000; font-style: italic; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/fonts/Montserrat.woff') format('woff'); font-weight: 500 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --canvas: #f5f1f4;
  --surface: #ffffff;
  --surface-2: #faf6f9;
  --surface-3: #f1e8ee;
  --ink: #1a0c16;
  --ink-2: #5c4a57;
  --ink-3: #94818f;
  --rule: #ece2e9;
  --rule-2: #dccdd7;
  /* guard pink and the teal of the tracksuits */
  --pink: #ed1b76; --pink-2: #f44786; --pink-ink: #b8105a; --pink-wash: #fde4ef; --pink-deep: #5c0d36;
  --green: #249f9c; --green-ink: #037a76; --green-wash: #dff3f2;
  --accent: var(--pink);
  --accent-ink: var(--pink-ink);
  --accent-wash: var(--pink-wash);
  --focus: var(--pink);

  /* validated: lightness band, chroma, colour-blind separation (light and dark) */
  --series-1: #249f9c; --series-2: #3a6ed6; --series-3: #ed1b76; --series-4: #c98e00;
  --series-5: #8457d9; --series-6: #ef6c2f; --series-7: #1c9bb8; --series-8: #9a5b1e;
  --seq-100: #dff3f2; --seq-200: #ace0dd; --seq-300: #6cc6c2; --seq-400: #36aca8; --seq-500: #249f9c; --seq-600: #037a76;

  --good: #249f9c; --good-ink: #037a76; --good-wash: #dff3f2;
  --warning: #f2a516; --warning-ink: #855600; --warning-wash: #fff3d6;
  --serious: #f0773a; --serious-ink: #a4441b; --serious-wash: #fdeae0;
  --critical: #da3b26; --critical-ink: #b12a17; --critical-wash: #fce6e1;
  --info-ink: #2b5fc4; --info-wash: #e5eefc;

  /* platform brand colours (charts use these; tiles use the fixed brand backgrounds below) */
  --p-tiktok: #111111; --p-instagram: #c13584; --p-youtube: #ff0000; --p-facebook: #1877f2; --p-snapchat: #fffc00; --p-other: #868d99;
  --p-snapchat-line: #e0b400;
  --p-instagram-fill: linear-gradient(135deg, #fa7e1e 0%, #d62976 45%, #962fbf 80%, #4f5bd5 100%);
  --p-edge: rgba(0, 0, 0, .18);

  --r-panel: 16px; --r-ctl: 10px; --r-sm: 6px;
  --shadow-pop: 0 12px 32px -8px rgba(40, 10, 30, .2), 0 2px 6px rgba(40, 10, 30, .06);
  --side: 236px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Montserrat', 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  /* the arena light behind every page */
  --glow-a: rgba(237, 27, 118, .09); --glow-b: rgba(36, 159, 156, .08);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0c070b;
  --surface: #160c14;
  --surface-2: #1d1019;
  --surface-3: #2a1624;
  --ink: #f8eef4;
  --ink-2: #c4adbc;
  --ink-3: #8c7385;
  --rule: #2a1726;
  --rule-2: #3e2238;
  --pink: #f44786; --pink-2: #ff6a9c; --pink-ink: #ff86b2; --pink-wash: #3d0f26; --pink-deep: #5c0d36;
  --green: #2fbcb8; --green-ink: #5fd8d3; --green-wash: #0b2b2a;
  --series-1: #27aba7; --series-2: #5b8cf0; --series-3: #f44786; --series-4: #c49218;
  --series-5: #9c7bf0; --series-6: #e2763f; --series-7: #2aa3c0; --series-8: #c07a3a;
  --seq-100: #0b2b2a; --seq-200: #035d5a; --seq-300: #037a76; --seq-400: #27aba7; --seq-500: #6cd2ce; --seq-600: #a9e8e5;
  --good: #2fbcb8; --good-ink: #5fd8d3; --good-wash: #0b2b2a; --warning-ink: #f5c04a; --warning-wash: #2d2210;
  --serious-ink: #f4a47d; --serious-wash: #2e1a15; --critical: #f05a3f; --critical-ink: #ff8a73; --critical-wash: #33140f;
  --info-ink: #8fb2f5; --info-wash: #17203a;
  --shadow-pop: 0 16px 40px -8px rgba(0, 0, 0, .7), 0 0 0 1px var(--rule-2);
  --p-tiktok: #eeeeee; --p-instagram: #d9479a; --p-youtube: #ff3b30; --p-facebook: #3b8bf5; --p-snapchat: #fffc00;
  --p-snapchat-line: #fffc00; --p-edge: transparent;
  --p-instagram-fill: linear-gradient(135deg, #fd8d3c 0%, #e0479e 45%, #a855d6 80%, #6d7bf0 100%);
  --glow-a: rgba(237, 27, 118, .2); --glow-b: rgba(36, 159, 156, .1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--canvas); }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 14px/1.45 var(--font); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.012em; }
p { margin: 0; }
::selection { background: var(--accent-wash); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.ic { width: 18px; height: 18px; flex: none; }
.hide { visibility: hidden; }

/* ------------------------------------------------------------------ shell */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; position: relative; isolation: isolate; }

.side {
  position: sticky; top: 10px; height: calc(100vh - 20px); margin: 10px 0 10px 10px; display: flex; flex-direction: column;
  padding: 16px 10px 12px; gap: 2px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; border-radius: 26px; isolation: isolate;
}
.side::-webkit-scrollbar { display: none; }
.side > :not(.nav-pill):not(.gfx) { position: relative; z-index: 2; }

/* ---------------------------------------------------------------- liquid glass
   One material for the sidebar and every dialog, after iOS 26: a clear pane that keeps
   the colour behind it alive, a specular rim that lights up at opposite corners and fades
   along the sides, a hint of thickness just inside the edge, and a wide, soft shadow.
   Pure CSS, composited by the GPU: no filters that redraw while the page moves. */
.side, dialog .dlg {
  --g-rim: rgba(255, 255, 255, .95); --g-rim-soft: rgba(255, 255, 255, .22);
  --g-line: rgba(255, 255, 255, .4); --g-bevel: rgba(255, 255, 255, .95); --g-bevel-2: rgba(255, 255, 255, .5);
  --g-depth: rgba(255, 255, 255, .22); --g-hair: rgba(26, 12, 22, .08);
  --g-shadow: 0 2px 6px rgba(26, 12, 22, .05), 0 16px 40px -14px rgba(26, 12, 22, .22);
  box-shadow:
    0 0 0 .5px var(--g-hair),
    inset 0 0 0 1px var(--g-line),
    inset 1.5px 1.5px 0 -.5px var(--g-bevel),
    inset -1.5px -1.5px 0 -.5px var(--g-bevel-2),
    inset 0 0 22px var(--g-depth),
    var(--g-shadow);
}

/* The colour inside the glass: four soft lights drifting slowly, then a satin layer with a
   fine grain on top. The lights only move (transform), so the GPU composites them without
   repainting anything: the motion costs next to nothing. */
.gfx { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 0; contain: strict; }
/* the sidebar's fill lives on this inner layer, not on the sticky element itself: Safari 26 tints its
   toolbar with the background-color of sticky and fixed elements, and a white sidebar made it flash */
.side > .gfx { background: var(--surface); }
.gfx i { position: absolute; border-radius: 50%; filter: blur(var(--gfx-blur, 30px)); opacity: var(--gfx-o, .95); will-change: transform; transform: translateZ(0); }
.gfx i:nth-child(1) { width: 220px; height: 220px; left: -70px; top: -40px; background: #f6559a; animation: gfx1 19s ease-in-out infinite alternate; }
.gfx i:nth-child(2) { width: 240px; height: 260px; right: -110px; top: 28%; background: #249f9c; animation: gfx2 23s ease-in-out infinite alternate; }
.gfx i:nth-child(3) { width: 190px; height: 190px; left: -60px; top: 58%; background: #7fd9d4; animation: gfx3 27s ease-in-out infinite alternate; }
.gfx i:nth-child(4) { width: 230px; height: 230px; right: -80px; bottom: -70px; background: #ff96c0; animation: gfx4 21s ease-in-out infinite alternate; }
@keyframes gfx1 { to { transform: translate(70px, 170px) scale(1.2); } }
@keyframes gfx2 { to { transform: translate(-90px, -130px) scale(.85); } }
@keyframes gfx3 { to { transform: translate(80px, -160px) scale(1.15); } }
@keyframes gfx4 { to { transform: translate(-60px, -150px) scale(1.2); } }
.gfx::after { content: ''; position: absolute; inset: 0;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    linear-gradient(180deg, rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, var(--frost, .44)) 22%, rgba(255, 255, 255, var(--frost-2, .36)) 100%); }
:root[data-theme="dark"] .gfx { --gfx-o: .7; }
:root[data-theme="dark"] .gfx i:nth-child(1) { background: #ed1b76; }
:root[data-theme="dark"] .gfx i:nth-child(2) { background: #249f9c; }
:root[data-theme="dark"] .gfx i:nth-child(3) { background: #05524f; }
:root[data-theme="dark"] .gfx i:nth-child(4) { background: #8f0f4a; }
:root[data-theme="dark"] .gfx::after {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    linear-gradient(180deg, rgba(20, 10, 18, .42) 0%, rgba(20, 10, 18, var(--frost, .56)) 22%, rgba(20, 10, 18, var(--frost-2, .62)) 100%); }
/* Dialogs are clear glass: the page shows through, softened by the pane itself, with two slow
   lights inside. The page behind a dialog is still, so the blur is computed once and only the
   lights move. Fields sit in brighter wells so text stays crisp. */
dialog .dlg .gfx { --frost: .34; --frost-2: .44; --gfx-blur: 70px; --gfx-o: .42; }
dialog .dlg .gfx i:nth-child(1) { width: 380px; height: 340px; left: -150px; top: -150px; }
dialog .dlg .gfx i:nth-child(2) { width: 400px; height: 380px; right: -200px; top: 6%; }
dialog .dlg .gfx i:nth-child(3) { width: 320px; height: 300px; left: -140px; top: 58%; }
dialog .dlg .gfx i:nth-child(4) { width: 380px; height: 360px; right: -160px; bottom: -190px; }
dialog .dlg .gfx::after { background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    linear-gradient(155deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 26%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .22) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, var(--frost)) 0%, rgba(255, 255, 255, var(--frost-2)) 100%); }
dialog.sheet .dlg .gfx { --frost: .42; --frost-2: .5; }
:root[data-theme="dark"] dialog .dlg .gfx { --frost: .34; --frost-2: .46; --gfx-o: .42; }
:root[data-theme="dark"] dialog .dlg .gfx::after { background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    linear-gradient(155deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, 0) 28%, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, .04) 100%),
    linear-gradient(180deg, rgba(20, 10, 18, var(--frost)) 0%, rgba(20, 10, 18, var(--frost-2)) 100%); }
:root[data-theme="dark"] dialog.sheet .dlg .gfx { --frost: .5; --frost-2: .58; }

/* the specular rim: bright where the light enters (top left) and leaves (bottom right) */
.side::before, dialog .dlg::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 3;
  background: conic-gradient(from -20deg, var(--g-rim) 0deg, var(--g-rim-soft) 38deg, transparent 80deg, var(--g-tint-a, transparent) 95deg, transparent 110deg, var(--g-rim-soft) 145deg,
    var(--g-rim) 180deg, var(--g-rim-soft) 218deg, transparent 260deg, var(--g-tint-b, transparent) 275deg, transparent 290deg, var(--g-rim-soft) 325deg, var(--g-rim) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* a soft reflection caught in the top-left corner */
.side::after, dialog .dlg::after {
  content: ''; position: absolute; left: -8%; top: -4%; width: 62%; height: 16%; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0)); filter: blur(12px); transform: rotate(-10deg);
}
:root[data-theme="dark"] .side, :root[data-theme="dark"] dialog .dlg {
  --g-rim: rgba(255, 255, 255, .4); --g-rim-soft: rgba(255, 255, 255, .08);
  --g-line: rgba(255, 255, 255, .07); --g-bevel: rgba(255, 255, 255, .2); --g-bevel-2: rgba(255, 255, 255, .06);
  --g-depth: rgba(255, 255, 255, .03); --g-hair: rgba(0, 0, 0, .5);
  --g-shadow: 0 2px 6px rgba(0, 0, 0, .25), 0 20px 50px -16px rgba(0, 0, 0, .6);
}
:root[data-theme="dark"] .side::after, :root[data-theme="dark"] dialog .dlg::after { background: radial-gradient(closest-side, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0)); }

/* the current section sits in a small glass drop that slides between items */
.nav-pill { position: absolute; left: 0; top: 0; z-index: 1; opacity: 0; border-radius: 999px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .52));
  box-shadow: 0 0 0 .5px rgba(16, 24, 40, .06), inset 0 0 0 1px rgba(255, 255, 255, .55), inset 1.5px 1.5px 0 -.5px #fff, inset -1px -1px 0 -.5px rgba(255, 255, 255, .7),
    0 6px 16px -6px rgba(16, 24, 40, .2), 0 1px 2px rgba(16, 24, 40, .06);
  transition: transform .34s cubic-bezier(.22, 1, .36, 1), width .34s cubic-bezier(.22, 1, .36, 1), height .34s cubic-bezier(.22, 1, .36, 1), opacity .2s; }
:root[data-theme="dark"] .nav-pill { background: linear-gradient(180deg, rgba(244, 71, 134, .3), rgba(237, 27, 118, .16));
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 106, 156, .28), inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -2px 0 rgba(255, 106, 156, .55), 0 8px 20px -8px rgba(237, 27, 118, .55); }
:root[data-theme="dark"] .nav a[aria-current="page"] .ic { color: #ff86b2; }
@media (prefers-reduced-motion: reduce) { .gfx i { animation: none !important; } .nav-pill { transition: opacity .2s; } }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); display: grid; place-items: center; }
.brand-mark svg { width: 16px; height: 16px; }
.brand b { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; font-variation-settings: 'opsz' 24; }
.nav-g { margin: 14px 10px 6px; font-size: 12px; color: var(--ink-3); }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 999px;
  color: var(--ink-2); font-weight: 500; position: relative; transition: background .12s, color .12s;
}
.nav a:hover { background: rgba(255, 255, 255, .3); color: var(--ink); }
:root[data-theme="dark"] .nav a:hover { background: rgba(255, 255, 255, .05); }
.nav a[aria-current="page"] { background: transparent; color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"] .ic { color: var(--pink); }
.nav a[aria-current="page"]:hover { background: transparent; }
.nav a .cnt { margin-left: auto; font-size: 11.5px; font-weight: 600; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.nav a .cnt[hidden], .mobile-nav .cnt[hidden] { display: none; }
.nav a .cnt.hot { background: var(--critical); color: #fff; }
.nav a .cnt.warm { background: var(--ink); color: var(--surface); }
.side-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.sync { margin: 0 4px 10px; padding: 10px 14px; border-radius: 18px; background: rgba(255, 255, 255, .3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 1.5px 1.5px 0 -.5px rgba(255, 255, 255, .9), 0 0 0 .5px rgba(16, 24, 40, .05); font-size: 12.5px; color: var(--ink-2); }
.sync b { color: var(--ink); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.sync .live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.sync.running .live { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.sync-bar { height: 3px; background: var(--rule); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.sync-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-ctl); width: 100%; border: 0; background: none; text-align: left; cursor: pointer; }
.me:hover { background: rgba(255, 255, 255, .35); }
:root[data-theme="dark"] .me:hover { background: rgba(255, 255, 255, .05); }
:root[data-theme="dark"] .sync { background: rgba(255, 255, 255, .04); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(255, 255, 255, .04); }
.me > span:not(.av) { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.me small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; padding: 14px 18px 48px 16px; }
.top { display: flex; align-items: center; gap: 10px; height: 48px; margin-bottom: 6px; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; min-width: 0; }
.crumbs a:hover { color: var(--ink); }
.crumbs .ic { width: 14px; height: 14px; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.searchbtn { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 11px; min-width: 240px;
  border: 1px solid var(--rule); background: var(--surface); border-radius: var(--r-ctl); color: var(--ink-3); cursor: pointer; }
.searchbtn:hover { border-color: var(--rule-2); }
.searchbtn kbd, .menu kbd { margin-left: auto; font: 500 11px var(--font); color: var(--ink-3); border: 1px solid var(--rule); border-radius: 5px; padding: 1px 5px; }
.iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; border-radius: var(--r-ctl); color: var(--ink-2); cursor: pointer; position: relative; }
.iconbtn:hover { background: var(--surface); color: var(--ink); }
.iconbtn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--critical); box-shadow: 0 0 0 2px var(--canvas); }
.mobile-nav { display: none; }

/* Changing section: the page you leave dims at once, the new one is built underneath and only
   comes forward when it has its content, so there is never an empty frame in between. */
#view { display: grid; }
#view > .view { grid-area: 1 / 1; min-width: 0; }
.view.leaving { opacity: .6; pointer-events: none; transition: opacity .2s var(--ease); }
.view.leaving.gone { opacity: 0; transition: opacity .14s linear; }
.view.pending { opacity: 0; pointer-events: none; }
.view.entering { animation: view-in .32s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .view.entering { animation: none; } .view.leaving { transition: none; } }

/* ------------------------------------------------------------------ page header */
.ph { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.ph h1 { font-size: 30px; line-height: 1.1; font-weight: 640; letter-spacing: -0.028em; font-variation-settings: 'opsz' 40; }
.ph .sub { color: var(--ink-2); margin-top: 6px; max-width: 64ch; }
.ph-r { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters .grow { flex: 1; }

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: var(--r-ctl); border: 1px solid var(--rule-2); background: var(--surface); color: var(--ink);
  font-weight: 550; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; margin-left: -2px; }
.btn-primary, .btn-accent { background: linear-gradient(180deg, #f2337f, #e0136b); color: #fff; border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -2px 0 rgba(92, 13, 54, .45), 0 6px 18px -8px rgba(237, 27, 118, .75); text-shadow: 0 1px 1px rgba(92, 13, 54, .25); }
.btn-primary:hover, .btn-accent:hover { background: linear-gradient(180deg, #f6468c, #e81a73); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), inset 0 -2px 0 rgba(92, 13, 54, .45), 0 8px 22px -8px rgba(237, 27, 118, .9); }
.btn-primary:active, .btn-accent:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -1px 0 rgba(92, 13, 54, .45), 0 3px 10px -6px rgba(237, 27, 118, .8); }
.btn-critical { background: var(--critical); color: #fff; border-color: var(--critical); }
.btn-good { background: var(--good-ink); color: #fff; border-color: var(--good-ink); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; animation: spin .7s linear infinite; }
.btn:not(.btn-primary).busy::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: var(--r-ctl); }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; height: 30px; padding: 0 11px; border-radius: 7px; color: var(--ink-2); font-weight: 550; cursor: pointer; font-size: 13px; font-variant-numeric: tabular-nums; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--rule); }
.sel { position: relative; display: inline-flex; align-items: center; }
.sel select { appearance: none; height: 36px; padding: 0 32px 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--rule-2); background: var(--surface); font-weight: 500; cursor: pointer; max-width: 260px; text-overflow: ellipsis; }
.sel .ic { position: absolute; right: 9px; width: 16px; height: 16px; pointer-events: none; color: var(--ink-3); }
.search-in { position: relative; display: flex; align-items: center; }
.search-in .ic { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--ink-3); }
.search-in input { height: 36px; border: 1px solid var(--rule-2); border-radius: var(--r-ctl); background: var(--surface); padding: 0 12px 0 34px; width: 240px; }

.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-l { font-size: 13px; font-weight: 550; }
.field-h { font-size: 12.5px; color: var(--ink-3); }
.field-h .warn { color: var(--warning-ink, #8f5d00); }
.req { color: var(--critical); margin-left: 3px; font-weight: 650; }
.form-req { font-size: 12.5px; color: var(--ink-3); margin: -4px 0 2px; }
.field-e { display: none; font-size: 12.5px; font-weight: 550; color: var(--critical-ink); }
.field.err .field-e { display: block; }
.field.err input, .field.err select, .field.err textarea, .field.err .ctry-btn { border-color: var(--critical); box-shadow: 0 0 0 3px var(--critical-wash); }
.field.err .field-e:empty { display: none; }
/* country picker */
.ctry-btn { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px 0 11px; border-radius: var(--r-ctl); border: 1px solid var(--rule-2); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ctry-btn:hover { border-color: var(--ink-3); }
.ctry-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.ctry-btn .ctry-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctry-btn > .ic { width: 15px; height: 15px; color: var(--ink-3); }
.cflag { display: inline-grid; place-items: center; flex: none; font-size: 18px; line-height: 1; width: 24px; height: 18px; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.cflag.md { font-size: 20px; width: 26px; height: 20px; }
.cflag.sm { font-size: 15px; width: 19px; height: 14px; }
.cflag.code { font-family: inherit; font-size: 9.5px; font-weight: 700; letter-spacing: .02em; border-radius: 3px; background: var(--surface-3); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rule); }
.cflag.none { border-radius: 3px; background: repeating-linear-gradient(135deg, var(--surface-3) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--rule); }
.ctry { display: inline-flex; align-items: center; gap: 6px; }
.picker-list .cflag + .picker-t { margin-left: 2px; }
.field input, .field select, .field textarea, .inp {
  height: 38px; border: 1px solid var(--rule-2); border-radius: var(--r-ctl); padding: 0 11px; background: var(--surface); width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
.field textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border: 1px solid var(--rule-2); border-radius: 16px; cursor: pointer; font-size: 13px; font-weight: 500; user-select: none; }
.chk input, .field .chk input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.chk:has(input:checked) { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chk:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 34px; height: 20px; border-radius: 10px; background: var(--rule-2); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(14px); }

/* ------------------------------------------------------------------ panels */
.panel { background: var(--surface); border-radius: var(--r-panel); box-shadow: 0 0 0 1px var(--rule); min-width: 0; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; min-height: 46px; }
.panel-h h2 { font-size: 15px; font-weight: 600; }
.panel-h .note { color: var(--ink-3); font-size: 12.5px; }
.panel-h .r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.panel-b { padding: 14px 18px 18px; }
.panel-b.flush { padding: 8px 0 6px; }
.link { color: var(--accent-ink); font-weight: 550; font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link .ic { width: 14px; height: 14px; }

.grid { display: grid; gap: 14px; }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-main { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 340px; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ------------------------------------------------------------------ pulse (overview hero) */
.pulse { display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.pulse-l { padding: 22px 22px 20px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 18px; }
.pulse-r { padding: 18px 22px 14px 14px; min-width: 0; }
.hero-l { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.hero-n { font-size: 56px; line-height: 1; font-weight: 600; letter-spacing: -0.045em; font-variation-settings: 'opsz' 40; margin-top: 8px; }
.hero-d { margin-top: 10px; font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip-d { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12.5px; padding: 2px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.chip-d.up { background: var(--good-wash); color: var(--good-ink); }
.chip-d.down { background: var(--critical-wash); color: var(--critical-ink); }
.chip-d.flat { background: var(--surface-3); color: var(--ink-2); }
.pulse-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; border-top: 1px solid var(--rule); padding-top: 16px; }
.mini-l { font-size: 12.5px; color: var(--ink-2); }
.mini-v { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }
.pulse-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; min-height: 32px; flex-wrap: wrap; }
.day-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 11px; border-radius: 15px; background: var(--ink); color: var(--surface); font-weight: 550; font-size: 13px; }
.day-pill button { border: 0; background: rgba(255,255,255,.16); color: inherit; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.day-pill .ic { width: 13px; height: 13px; }
.hint { font-size: 12.5px; color: var(--ink-3); }

.dcols { position: relative; padding-left: 40px; }
.dcols-grid { position: absolute; left: 40px; right: 0; top: 0; height: var(--h); pointer-events: none; }
.dcols-tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--rule); }
.dcols-tick span { position: absolute; right: calc(100% + 8px); top: -8px; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dcols-row { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.dcol { border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; border-radius: 10px; min-width: 0; }
.dcol-plot { height: var(--h); width: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 10px 10px 0 0; transition: background .15s; }
.dcol:hover .dcol-plot { background: color-mix(in oklab, var(--surface-2) 80%, transparent); }
.dcols-row:hover .dcol:not(:hover) .dcol-stack { opacity: .55; }
.has-sel.dcols-row:hover .dcol:not(:hover):not(.sel) .dcol-stack { opacity: .28; }
.dcol-plot { position: relative; }
.dcol-ghost { position: absolute; bottom: 0; left: 50%; width: min(30px, 78%); transform: translateX(-50%); border-radius: 5px 5px 0 0; box-shadow: inset 0 0 0 1.5px var(--rule-2); background: color-mix(in oklab, var(--surface-2) 60%, transparent); pointer-events: none; }
.dcol-v { position: absolute; left: 50%; transform: translate(-50%, -6px); font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity .12s; pointer-events: none; }
.dcol:hover .dcol-v, .dcol.sel .dcol-v { opacity: 1; }
.dcols-row:not(.has-sel):not(:hover) .dcol-v.peak { opacity: 1; }
.dense .dcol-v { display: none; }
.dense .dcol.sel .dcol-v, .dense .dcol:hover .dcol-v { display: block; }
.dcols-over { z-index: 2; }
.dcols-avg { position: absolute; left: 0; right: 0; border-top: 1px solid var(--ink-3); opacity: .7; z-index: 1; pointer-events: none; }
.dcols-avg span { position: absolute; right: 0; top: -20px; font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--surface); padding: 1px 6px; border-radius: 5px; box-shadow: 0 0 0 1px var(--rule); }
.dcol-stack { position: relative; z-index: 1; width: min(24px, 64%); display: flex; flex-direction: column-reverse; gap: 2px; transition: opacity .2s, height .45s var(--ease); }
.dcol-stack i { display: block; min-height: 0; }
.dcol-stack i:last-child { border-radius: 4px 4px 0 0; }
.dcol-stack.grow { animation: grow .7s var(--ease) both; animation-delay: calc(var(--i) * 28ms); transform-origin: bottom; }
@keyframes grow { from { transform: scaleY(0); } }
.has-sel .dcol:not(.sel) .dcol-stack { opacity: .28; }
.dcol-l { display: flex; flex-direction: column; align-items: center; padding: 8px 0 4px; line-height: 1.15; }
.dcol-wd { font-size: 11.5px; color: var(--ink-3); }
.dcol-d { font-size: 13px; font-weight: 550; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dcol.sel .dcol-d { color: var(--surface); background: var(--ink); border-radius: 6px; padding: 0 6px; }
.dcol.sel .dcol-plot { background: var(--surface-2); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; }
.legend b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 2px; }

/* hero additions */
.hero-l b { color: var(--ink); font-weight: 600; margin-left: 2px; }
.hero-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--rule); }
.hero-facts dt { font-size: 12.5px; color: var(--ink-2); }
.hero-facts dd { margin: 2px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.hero-facts dd span { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.plist button { width: 100%; border: 0; background: none; padding: 7px 8px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 1fr auto 52px; grid-template-rows: auto 4px; column-gap: 10px; row-gap: 6px; align-items: center; width: calc(100% + 16px); }
.plist button.on { background: var(--surface-3); }
.plist-n { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13.5px; min-width: 0; }
.plist-n > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.plist-n small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.plist-v { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.plist-d { font-size: 12px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.plist-d.up { color: var(--good-ink); } .plist-d.down { color: var(--critical-ink); }
.plist-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.plist-bar i { display: block; height: 100%; border-radius: 2px; transition: width .45s var(--ease); }
.switch.small { font-size: 12.5px; color: var(--ink-2); gap: 8px; }
.switch.small input { width: 28px; height: 16px; }
.switch.small input::after { width: 12px; height: 12px; }
.switch.small input:checked::after { transform: translateX(12px); }
.chart-legend i.ghost { width: 9px; height: 9px; border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.rangebtn { font-variant-numeric: tabular-nums; gap: 8px; }
.rangebtn .ic:last-child { width: 15px; height: 15px; color: var(--ink-3); margin-right: -4px; }
.rangebtn.on { box-shadow: 0 0 0 1px var(--ink); border-color: var(--ink); }

/* creator picker */
.av-xs { width: 22px; height: 22px; font-size: 9.5px; }
.pickbtn { gap: 8px; max-width: 240px; }
.pickbtn > span:not(.av) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickbtn .ic:first-child { width: 16px; height: 16px; color: var(--ink-2); }
.pickbtn > .ic:last-child { width: 15px; height: 15px; color: var(--ink-3); margin-right: -4px; }
.pickbtn.on { box-shadow: 0 0 0 1px var(--ink); border-color: var(--ink); padding-left: 7px; }
.picker { position: fixed; z-index: 95; width: 320px; max-width: calc(100vw - 16px); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; max-height: min(460px, calc(100vh - 24px)); opacity: 0; transform: translateY(-4px); transition: opacity .12s, transform .14s var(--ease); }
.picker.in { opacity: 1; transform: none; }
.picker-in { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.picker-in .ic { color: var(--ink-3); width: 16px; height: 16px; }
.picker-in input { flex: 1; border: 0; outline: none; background: none; font-size: 14px; min-width: 0; }
.picker-note { display: flex; justify-content: space-between; padding: 8px 14px 2px; font-size: 11.5px; color: var(--ink-3); }
.picker-list { list-style: none; margin: 0; padding: 4px 6px 6px; overflow-y: auto; }
.picker-list li[data-i] { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.picker-list li[data-i] { transition: background-color .12s, box-shadow .12s; }
.picker-list li[aria-selected="true"] .picker-t b { font-weight: 650; }
.picker-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.picker-ic .ic { width: 15px; height: 15px; }
.picker-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.picker-t b { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-t small { color: var(--ink-3); font-size: 12px; }
.picker-h { font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.picker-ck { width: 16px; height: 16px; color: var(--accent); }
.picker-empty { padding: 18px; text-align: center; color: var(--ink-3); }
.scope { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scope b { color: var(--ink); font-weight: 600; }
.scope .iconbtn { width: 26px; height: 26px; margin-left: -4px; }
.scope .iconbtn .ic { width: 15px; height: 15px; }
.rowfilter { width: 28px; height: 28px; margin-right: -8px; opacity: 0; transition: opacity .12s; }
.rows li:hover .rowfilter, .rowfilter:focus-visible { opacity: 1; }
.rowfilter .ic { width: 15px; height: 15px; }
@media (hover: none) { .rowfilter { opacity: .7; } }

/* date range picker */
.drp { position: fixed; z-index: 95; display: grid; grid-template-columns: 168px auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(-4px); transition: opacity .12s, transform .14s var(--ease); max-width: calc(100vw - 16px); }
.drp.in { opacity: 1; transform: none; }
.drp-presets { display: flex; flex-direction: column; gap: 1px; padding: 10px; border-right: 1px solid var(--rule); }
.drp-presets button { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-weight: 500; color: var(--ink-2); }
.drp-presets button.on { background: var(--ink); color: var(--surface); }
.drp-presets button[disabled] { opacity: .4; pointer-events: none; }
.drp-main { position: relative; padding: 14px 16px 0; }
.drp-nav { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; justify-content: space-between; pointer-events: none; }
.drp-nav .iconbtn { pointer-events: auto; width: 32px; height: 32px; }
.drp-nav .iconbtn[disabled] { opacity: .3; pointer-events: none; }
.drp-months { display: grid; grid-template-columns: repeat(2, 252px); gap: 22px; }
.drp-mh { text-align: center; font-weight: 600; height: 22px; line-height: 22px; margin-bottom: 8px; }
.drp-g { display: grid; grid-template-columns: repeat(7, 36px); row-gap: 2px; }
.drp-wd { text-align: center; font-size: 11.5px; color: var(--ink-3); padding-bottom: 6px; }
.drp-d { position: relative; height: 34px; border: 0; background: none; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; color: var(--ink); border-radius: 0; }
.drp-d::before { content: ''; position: absolute; inset: 1px 3px; border-radius: 8px; z-index: 0; }
.drp-d:hover::before { background: var(--surface-3); }
.drp-d.in { background: var(--accent-wash); }
.drp-d.start, .drp-d.end { color: var(--surface); font-weight: 600; }
.drp-d.start::before, .drp-d.end::before { background: var(--ink); inset: 1px 1px; }
.drp-d.start:not(.end) { background: linear-gradient(90deg, transparent 50%, var(--accent-wash) 50%); }
.drp-d.end:not(.start) { background: linear-gradient(90deg, var(--accent-wash) 50%, transparent 50%); }
.drp-d { isolation: isolate; }
.drp-d > * , .drp-d { z-index: 1; }
.drp-d.today:not(.start):not(.end)::after { content: ''; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.drp-d[disabled] { color: var(--ink-3); opacity: .45; cursor: default; }
.drp-d[disabled]:hover::before { background: none; }
.drp-f { display: flex; align-items: flex-end; gap: 10px; padding: 14px 0; margin-top: 12px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.drp-f label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-3); }
.drp-f .inp { width: 150px; height: 34px; font-variant-numeric: tabular-nums; }
.drp-f > .faint { padding-bottom: 8px; }
.drp-n { padding-bottom: 9px; }
/* make the day number sit above its pill */
.drp-d { color: var(--ink); }
.drp-d::before { z-index: -1; }

/* insights row */
.g-ins { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, .9fr); }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; }
.cal-head span { text-align: center; font-size: 11.5px; color: var(--ink-3); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: min-content; align-content: start; gap: 4px; }
.cal-grid > * { display: block; }
.cal-c { aspect-ratio: 1.25; min-width: 0; width: 100%; border: 0; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 550; color: var(--ink-2); font-variant-numeric: tabular-nums; cursor: pointer; padding: 0;
  transition: transform .12s var(--ease), box-shadow .12s; }
button.cal-c:hover { transform: scale(1.06); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink-3); }
.cal-c.dark { color: #fff; }
:root[data-theme="dark"] .cal-c.dark { color: #0e1013; }
.cal-c.sel { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.cal-c.cal-blank { background: none; cursor: default; }
.cal-compact .cal-grid { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); grid-auto-columns: 1fr; gap: 3px; }
.cal-compact .cal-c { aspect-ratio: 1; border-radius: 3px; }
.cal .hm-scale { margin-top: 10px; }
.wdb { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.wdb li { display: grid; grid-template-columns: 34px 1fr 52px; gap: 10px; align-items: center; font-size: 13px; }
.wdb-l { color: var(--ink-2); }
.wdb-t { height: 10px; background: var(--surface-2); border-radius: 0 3px 3px 0; overflow: hidden; }
.wdb-t i { display: block; height: 100%; background: var(--seq-300); border-radius: 0 3px 3px 0; transition: width .45s var(--ease); }
.wdb li.best .wdb-t i { background: var(--series-1); }
.wdb li.best .wdb-l, .wdb li.best b { color: var(--ink); font-weight: 650; }
.wdb b { text-align: right; font-weight: 550; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.wdb li.none { opacity: .45; }

/* ------------------------------------------------------------------ sections & economics */
.sec-h { display: flex; align-items: flex-end; gap: 16px; margin: 34px 0 14px; }
.sec-h h2 { font-size: 22px; font-weight: 640; letter-spacing: -0.022em; font-variation-settings: 'opsz' 32; }
.sec-h p { color: var(--ink-2); margin-top: 4px; max-width: 80ch; font-size: 13.5px; }
.sec-h p b { color: var(--ink); font-weight: 600; }
.econ-kpi .stat-v { font-size: 22px; flex-wrap: wrap; row-gap: 2px; }
.econ-kpi .stat-v .chip-d { font-size: 11.5px; }
.g-econ { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }
.g-econ2 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.econ-pl { gap: 6px; }
.econ-pr { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 4px; row-gap: 7px; column-gap: 10px; align-items: center; padding: 4px 0; }
.econ-pv { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.econ-pv b { font-weight: 650; font-variant-numeric: tabular-nums; }
.econ-pv small { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.econ-tbl td { padding-top: 9px; padding-bottom: 9px; }
.econ-tbl tbody tr[data-ent] { cursor: pointer; }
.econ-tbl th button .ic { width: 13px; height: 13px; }
.cellbar { display: grid; grid-template-rows: auto 4px; gap: 4px; justify-items: end; min-width: 110px; }
.cellbar span { font-weight: 600; font-variant-numeric: tabular-nums; }
.cellbar i { display: block; height: 4px; border-radius: 2px; background: var(--series-1); justify-self: end; }
.cpmbar { display: grid; grid-template-rows: auto 6px; gap: 5px; justify-items: end; min-width: 120px; }
.cpmbar > span:first-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.cpmbar .hi { color: var(--critical-ink); }
.cpmbar .lo { color: var(--good-ink); }
.cpmbar-t { position: relative; width: 100%; height: 6px; background: var(--surface-2); border-radius: 3px; }
.cpmbar-t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--seq-300); }
.cpmbar-t b { position: absolute; top: -3px; width: 2px; height: 12px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.econ-foot { display: flex; align-items: center; gap: 12px; padding: 10px 18px 12px; border-top: 1px solid var(--rule); }
.econ-foot .btn { margin-left: auto; }
.cpm-key, .time-key { display: inline-block; width: 2px; height: 11px; background: var(--ink); border-radius: 1px; vertical-align: -1px; margin-right: 4px; }
.rows.pace > li { display: grid; grid-template-columns: minmax(160px, 1.1fr) minmax(200px, 2fr) minmax(180px, 1.2fr) 170px; gap: 18px; align-items: center; padding: 12px 18px; }
.pace-n { display: flex; flex-direction: column; min-width: 0; }
.pace-n b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pace-bar { display: flex; flex-direction: column; gap: 6px; }
.pace-track { position: relative; height: 10px; border-radius: 5px; background: var(--surface-3); }
.pace-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--good); }
.pace-track i.over { background: var(--critical); }
.pace-track i.under { background: var(--warning); }
.pace-track i.paused { background: var(--ink-3); }
.pace-track b { position: absolute; top: -4px; width: 2px; height: 18px; margin-left: -1px; background: var(--ink); border-radius: 1px; box-shadow: 0 0 0 2px var(--surface); }
.pace-p { display: flex; flex-direction: column; gap: 2px; }
.pace-p b { font-weight: 650; font-variant-numeric: tabular-nums; }
.pace-s { justify-self: end; }
.eff .ept circle { fill: var(--series-1); fill-opacity: .55; stroke: var(--series-1); stroke-width: 1.5; cursor: pointer; transition: fill-opacity .12s; }
.eff .ept:hover circle { fill-opacity: .9; }
.eff .ept.focus circle { fill: var(--ink); stroke: var(--ink); fill-opacity: 1; }
.eff .ept text { font-size: 11.5px; font-weight: 600; fill: var(--ink-2); pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.lc .refl { stroke: var(--ink-3); stroke-width: 1.25; }
.lc .reft { font-weight: 600; fill: var(--ink-2); }

/* ------------------------------------------------------------------ stat strip */
.stats { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.stat { padding: 16px 18px; border-left: 1px solid var(--rule); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat-l { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.stat-v { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; margin-top: 4px; font-variation-settings: 'opsz' 32; display: flex; align-items: baseline; gap: 8px; }
.stat-s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.stat-v .spark { margin-left: auto; align-self: center; }
.meter { height: 6px; border-radius: 3px; background: var(--seq-100); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: var(--series-1); border-radius: 3px; }
.meter.warn { background: var(--warning-wash); } .meter.warn i { background: var(--warning); }
.meter.crit { background: var(--critical-wash); } .meter.crit i { background: var(--critical); }

/* ------------------------------------------------------------------ lists & tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12.5px; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: linear-gradient(var(--surface), var(--surface)); }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl th button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 3px; }
.tbl th button[aria-sort] { color: var(--ink); }
.tbl td.act { white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl td.num, .tbl td.r { font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl th:first-child, .tbl td:first-child { padding-left: 18px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 18px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { font-weight: 550; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who > span { min-width: 0; }
.tbl .who > span { max-width: 40ch; }
.cap { max-width: 36ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--rule); min-width: 0; }
.rows > li:first-child { border-top: 0; }
.rows > li.clickable { cursor: pointer; }
.rows .rank { width: 18px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 12.5px; text-align: right; }
.rows .val { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.rows .val small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12px; }
.bar-in { height: 4px; border-radius: 2px; background: var(--surface-3); margin-top: 5px; overflow: hidden; }
.bar-in i { display: block; height: 100%; background: var(--series-1); border-radius: 2px; }

/* avatars, tags */
.av { --h: 336; width: 34px; height: 34px; border-radius: 34%; flex: none; display: grid; place-items: center; position: relative;
  background: linear-gradient(150deg, hsl(var(--h) 80% 64%), hsl(var(--h) 72% 38%)); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(0, 0, 0, .16);
  font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .01em; text-shadow: 0 1px 1px rgba(0, 0, 0, .18); }
:root[data-theme="dark"] .av { background: linear-gradient(150deg, hsl(var(--h) 75% 56%), hsl(var(--h) 70% 30%)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -2px 0 rgba(0, 0, 0, .3); }
.av-sm { width: 26px; height: 26px; font-size: 10.5px; }
.av.av-xs { width: 22px; height: 22px; font-size: 9.5px; }
.av-lg { width: 64px; height: 64px; font-size: 21px; }
.av-on { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px var(--surface); }
.ptag { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; font-size: 12.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.ptag-n { color: var(--ink); }
small .ptag, .who small .ptag { margin-right: 2px; }

/* platform tiles: fixed brand backgrounds, monogram drawn for this app */
.pm { --s: 18px; width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center; border-radius: calc(var(--s) * .28);
  font: 750 calc(var(--s) * .44)/1 var(--font); letter-spacing: -.01em; color: #fff; overflow: hidden; position: relative; vertical-align: middle; }
.pm-xs { --s: 10px; border-radius: 3px; }
.seg .pm-sm { --s: 16px; }
.pm-sm { --s: 18px; }
.pm-md { --s: 26px; }
.pm-lg { --s: 34px; }
.pm-tiktok { background: #000; text-shadow: -.06em -.05em 0 #25f4ee, .06em .05em 0 #fe2c55; }
.pm-instagram { background: radial-gradient(circle at 28% 108%, #fdf497 0%, #fdf497 6%, #fd5949 42%, #d6249f 62%, #285aeb 96%); }
.pm-youtube { background: #ff0000; }
.pm-facebook { background: #1877f2; }
.pm-snapchat { background: #fffc00; color: #111; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
:root[data-theme="dark"] .pm-tiktok { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
:root[data-theme="dark"] .pm-snapchat { box-shadow: none; }
.pm.has-img { background: none; box-shadow: none; text-shadow: none; }
.pm img { width: 100%; height: 100%; object-fit: contain; display: block; }
.chart-legend .pm, .legend .pm { margin-right: 1px; }
.seg-snapchat, .bar-snapchat { box-shadow: inset 0 0 0 1px var(--p-edge); }
.lc .sa-snapchat { stroke: var(--p-edge); stroke-width: 1; }
.ptags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { display: inline-flex; height: 22px; align-items: center; padding: 0 8px; border-radius: 11px; background: var(--surface-3); font-size: 12px; color: var(--ink-2); }

.st { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 5px; border-radius: 11px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.st-i { width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; }
.st-i svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.st-good { background: var(--good-wash); color: var(--good-ink); }
.st-warning { background: var(--warning-wash); color: var(--warning-ink); }
.st-critical { background: var(--critical-wash); color: var(--critical-ink); }
.st-info { background: var(--info-wash); color: var(--info-ink); }
.st-neutral { background: var(--surface-3); color: var(--ink-2); }
.st-neutral .st-i svg { fill: currentColor; }

.risk { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 600; }
.risk-bar { width: 38px; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.risk-bar i { display: block; height: 100%; border-radius: 3px; }
.risk-low i { background: var(--ink-3); } .risk-low { color: var(--ink-3); font-weight: 500; }
.risk-warning i { background: var(--warning); } .risk-warning { color: var(--warning-ink); }
.risk-serious i { background: var(--serious); } .risk-serious { color: var(--serious-ink); }
.risk-critical i { background: var(--critical); } .risk-critical { color: var(--critical-ink); }

/* ------------------------------------------------------------------ charts */
.lc { display: block; overflow: visible; }
.lc .grid { stroke: var(--rule); stroke-width: 1; }
.lc .ax { fill: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.lc .xhair { stroke: var(--rule-2); stroke-width: 1; pointer-events: none; }
.lc .hdot { pointer-events: none; }
.lc .win { fill: var(--critical); opacity: .09; }
.lc .avgl { stroke: var(--ink-3); stroke-width: 1; opacity: .8; }
.lc .avgt { font-weight: 600; fill: var(--ink-2); }
.lc .selx { stroke: var(--ink); stroke-width: 1.5; }
.ctip-p { color: rgba(255,255,255,.62); }
:root[data-theme="dark"] .ctip-p { color: var(--ink-2); }
.sc .pt { cursor: pointer; stroke: var(--surface); stroke-width: 1.5; opacity: .6; transition: opacity .1s; }
.sc .pt:hover { opacity: 1; }
.sc .pt-flag { fill: var(--critical); opacity: 1; }
.spark { display: block; }
.ctip { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; background: var(--ink); color: var(--surface); border-radius: 10px;
  padding: 9px 11px; font-size: 12.5px; min-width: 150px; opacity: 0; transition: opacity .1s; box-shadow: var(--shadow-pop); }
:root[data-theme="dark"] .ctip { background: var(--surface-3); color: var(--ink); }
.ctip.in { opacity: 1; }
.ctip-h { font-weight: 600; margin-bottom: 5px; text-transform: none; }
.ctip-r { display: flex; align-items: center; gap: 7px; line-height: 1.6; }
.ctip-r i { width: 8px; height: 8px; border-radius: 2px; }
.ctip-r b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; font-weight: 600; }
.ctip-t { border-top: 1px solid rgba(255,255,255,.18); margin-top: 4px; padding-top: 4px; }
.ctip-warn { color: #ffb0b0; margin-top: 4px; font-weight: 550; }
.segbar { display: flex; gap: 2px; height: 28px; margin: 4px 0 12px; }
.segbar-p { display: flex; align-items: center; padding-left: 8px; min-width: 0; border-radius: 4px; }
.segbar-p b { font-size: 12px; font-weight: 600; color: #fff; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 14px; height: 2px; border-radius: 1px; }
.chart-legend i.sq { width: 8px; height: 8px; border-radius: 2px; }
.chart-legend i.dia { width: 8px; height: 8px; transform: rotate(45deg); border-radius: 1px; background: var(--critical); }
.hm { display: grid; gap: 3px; font-size: 11px; color: var(--ink-3); }
.hm-row { display: grid; grid-template-columns: 32px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.hm-c { aspect-ratio: 1.3; border-radius: 3px; min-height: 10px; }
.hm-hl { text-align: left; font-variant-numeric: tabular-nums; }
.hm-scale { display: flex; align-items: center; gap: 3px; justify-content: flex-end; margin-top: 6px; }
.hm-scale i { width: 14px; height: 10px; border-radius: 2px; }
.hm-scale span { margin: 0 4px; }

/* ------------------------------------------------------------------ campaigns */
.camps { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.camp { display: flex; flex-direction: column; padding: 18px; gap: 14px; transition: box-shadow .15s; cursor: pointer; position: relative; }
.camp:hover { box-shadow: 0 0 0 1px var(--rule-2), 0 6px 18px -10px rgba(21,24,30,.18); }
.camp-h { display: flex; gap: 12px; align-items: flex-start; }
.camp-sw { width: 10px; align-self: stretch; border-radius: 3px; background: hsl(var(--h) 55% 55%); flex: none; }
.camp-h h3 { font-size: 16px; }
.camp-h p { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.camp-h .st { margin-left: auto; }
.camp-n { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.camp-n div span { font-size: 12px; color: var(--ink-3); display: block; }
.camp-n div b { white-space: nowrap; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.camp-f { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--rule); padding-top: 12px; }
.camp-f .r { margin-left: auto; display: flex; gap: 4px 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.camp-f .r > * { white-space: nowrap; }
.burn { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: -6px; }
.burn b { color: var(--ink); font-weight: 600; }
.alert-dot { display: inline-flex; align-items: center; gap: 5px; color: var(--critical-ink); font-weight: 600; }
.alert-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--critical); }

.brief { white-space: pre-wrap; line-height: 1.6; color: var(--ink-2); max-width: 70ch; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ creator profile */
.prof { display: flex; gap: 18px; align-items: center; padding: 20px 22px; }
.prof h1 { font-size: 26px; letter-spacing: -0.025em; }
.prof .meta { color: var(--ink-2); display: flex; gap: 8px 14px; flex-wrap: wrap; margin-top: 4px; font-size: 13.5px; }
.prof .r { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.acc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0; }
.acc .faint span, .acc .st { white-space: nowrap; }
.acc { padding: 16px 18px; border-left: 1px solid var(--rule); border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.acc-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.acc-h a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-n { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-3); }
.acc-n b { display: block; color: var(--ink); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); padding: 0 12px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 8px 10px; margin: 0 4px -1px; cursor: pointer; color: var(--ink-2); font-weight: 550; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .cnt { font-size: 11.5px; color: var(--ink-3); margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ integrity */
.flag { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--rule); cursor: pointer; align-items: start; }
.flag:first-child { border-top: 0; }
.flag-score { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.flag-score.critical { background: var(--critical-wash); color: var(--critical-ink); }
.flag-score.serious { background: var(--serious-wash); color: var(--serious-ink); }
.flag-score.warning { background: var(--warning-wash); color: var(--warning-ink); }
.flag-t { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flag-s { color: var(--ink-2); margin-top: 3px; font-size: 13.5px; }
.flag-sig { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sig { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); font-weight: 500; }
.flag-r { text-align: right; font-size: 12.5px; color: var(--ink-3); display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.signals { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.signals li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); }
.signals .w { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--critical-ink); font-size: 15px; }
.signals .w small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.signals b { display: block; font-weight: 600; }
.signals p { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.verdict { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--rule); background: var(--surface); position: sticky; bottom: 0; }

/* ------------------------------------------------------------------ messages */
/* ---------------------------------------------------------------- messages */
.main:has(> #view .chat) { padding-bottom: 12px; }
.chat { position: relative; display: grid; grid-template-columns: 340px minmax(0, 1fr) 0; height: calc(100vh - 82px); min-height: 560px; overflow: hidden;
  background: var(--surface); border-radius: var(--r-panel); box-shadow: 0 0 0 1px var(--rule); transition: grid-template-columns .28s var(--ease); }
.chat.info-open:has(.ch-h) { grid-template-columns: 340px minmax(0, 1fr) 320px; }
.ch-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--rule); background: var(--surface-2); }
:root[data-theme="dark"] .ch-list { background: color-mix(in oklab, var(--surface) 70%, var(--canvas)); }
.ch-list-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 10px 18px; }
.ch-list-h h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.ch-list-h .iconbtn { background: var(--ink); color: var(--surface); width: 32px; height: 32px; border-radius: 10px; }
.ch-list-h .iconbtn:hover { opacity: .88; }
.ch-search { display: flex; align-items: center; gap: 8px; height: 38px; margin: 0 14px; padding: 0 12px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-3); }
.ch-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.ch-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; color: var(--ink); height: 100%; }
.ch-search .ic { width: 16px; height: 16px; }
.ch-tabs { display: flex; gap: 2px; padding: 10px 12px 8px; overflow-x: auto; scrollbar-width: none; }
.ch-tabs button { flex: none; height: 28px; padding: 0 10px; border-radius: 99px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ch-tabs button:hover { background: var(--surface-3); }
.ch-tabs button[aria-selected="true"] { background: var(--ink); color: var(--surface); }
.ch-tabs button[data-n]:not([data-n=""])::after { content: attr(data-n); font-size: 11px; font-weight: 650; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.ch-items { flex: 1; overflow-y: auto; padding: 2px 8px 12px; }
.ch-item { width: 100%; display: flex; gap: 12px; align-items: center; padding: 10px; border: 0; background: none; border-radius: 12px; cursor: pointer; text-align: left; font: inherit; color: inherit; position: relative; }
.ch-item[aria-current="true"] { background: var(--surface); box-shadow: 0 0 0 1px var(--rule), 0 2px 6px -3px rgba(21, 24, 30, .12); }
.ch-item-m { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ch-item-t { display: flex; align-items: center; gap: 5px; min-width: 0; }
.ch-item-t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-item-t time { margin-left: auto; padding-left: 8px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.ch-flag { width: 13px; height: 13px; color: var(--ink-3); }
.ch-item-c { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-item-p { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); min-width: 0; }
.ch-item-p > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.ch-item.unread .ch-item-p > span { color: var(--ink); font-weight: 500; }
.ch-item.unread .ch-item-t time { color: var(--accent); font-weight: 600; }
.ch-att { display: inline-flex; align-items: center; gap: 3px; vertical-align: -2px; }
.ch-att .ic { width: 13px; height: 13px; }
.ch-badge { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 650; display: grid; place-items: center; flex: none; }
.ch-item.muted .ch-badge { background: var(--ink-3); }
.ch-none { padding: 22px 16px; text-align: center; color: var(--ink-3); font-size: 13.5px; line-height: 1.5; }
.ch-sec { padding: 14px 10px 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.ch-hit { width: 100%; text-align: left; border: 0; background: none; font: inherit; color: inherit; padding: 9px 10px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.ch-hit-t { display: flex; justify-content: space-between; gap: 8px; }
.ch-hit-t b { font-weight: 600; font-size: 13px; }
.ch-hit-t time { font-size: 11.5px; color: var(--ink-3); }
.ch-hit-p { font-size: 12.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* group tiles */
.gtile { position: relative; flex: none; display: inline-block; }
.gtile-md { width: 40px; height: 40px; }
.gtile-lg { width: 64px; height: 64px; }
.gtile .av { position: absolute; width: 28px; height: 28px; font-size: 10.5px; box-shadow: 0 0 0 2px var(--surface-2); }
/* the first member sits in front with initials, the second peeks out behind as a plain disc */
.gtile .av:first-child { right: 0; bottom: 0; z-index: 1; }
.gtile .av:nth-child(2) { left: 0; top: 0; font-size: 0; }
.ch-item[aria-current="true"] .gtile .av, .ch-h .gtile .av { box-shadow: 0 0 0 2px var(--surface); }
.gtile-solo { --h: 190; border-radius: 12px; display: grid; place-items: center; background: hsl(var(--h) 42% 90%); color: hsl(var(--h) 45% 28%); }
.gtile-solo .ic { width: 20px; height: 20px; }
.gtile-lg.gtile-solo { border-radius: 20px; }
.gtile-lg.gtile-solo .ic { width: 30px; height: 30px; }
:root[data-theme="dark"] .gtile-solo { background: hsl(var(--h) 25% 22%); color: hsl(var(--h) 55% 78%); }

/* thread */
.ch-main { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ch-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--rule); min-height: 66px; }
.ch-h-t { min-width: 0; text-align: left; border: 0; background: none; font: inherit; color: inherit; padding: 0; cursor: pointer; display: flex; flex-direction: column; }
.ch-h-t b { font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-h-t small { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-h-t .on, .ci-mem .on { color: var(--good-ink); }
.ch-h-r { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.ch-h-r .iconbtn.on { background: var(--surface-3); color: var(--ink); }
.ch-back { display: none; }
.ch-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ch-msgs { flex: 1; overflow-y: auto; padding: 12px 22px 18px; display: flex; flex-direction: column; overscroll-behavior: contain;
  background: radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--ink) 7%, transparent) 1px, transparent 0) 0 0 / 22px 22px; }
.ch-loading, .ch-idle { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; color: var(--ink-3); padding: 24px; }
.ch-loading .ic { width: 28px; height: 28px; animation: pulse-o 1.2s infinite; }
@keyframes pulse-o { 50% { opacity: .3; } }
.ch-idle-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); margin-bottom: 6px; }
.ch-idle-ic .ic { width: 28px; height: 28px; }
.ch-idle b { color: var(--ink); font-size: 17px; font-weight: 650; }
.ch-idle p { max-width: 40ch; line-height: 1.55; font-size: 14px; }
.ch-idle-a { display: flex; gap: 8px; margin-top: 10px; }

.m-dayg { display: flex; flex-direction: column; }
.m-older { display: flex; justify-content: center; padding: 6px 0 10px; }
.m-empty { margin: auto; display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--ink-3); max-width: 34ch; }
.m-empty .ic { width: 30px; height: 30px; }
.m-empty b { color: var(--ink); font-weight: 600; }
.m-day { position: sticky; top: 4px; z-index: 2; display: flex; justify-content: center; margin: 14px 0 10px; pointer-events: none; }
.m-day span { font-size: 12px; font-weight: 550; color: var(--ink-2); padding: 4px 11px; border-radius: 99px; background: color-mix(in oklab, var(--surface) 88%, transparent); box-shadow: 0 0 0 1px var(--rule), 0 2px 6px -3px rgba(21, 24, 30, .15); backdrop-filter: blur(8px); }
.m-new { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: var(--accent); font-size: 12px; font-weight: 650; }
.m-new::before, .m-new::after { content: ''; flex: 1; height: 1px; background: color-mix(in oklab, var(--accent) 45%, transparent); }
.m-sys { align-self: center; max-width: 80%; text-align: center; font-size: 12.5px; color: var(--ink-2); padding: 5px 12px; border-radius: 10px; background: var(--surface-2); margin: 8px 0; box-shadow: inset 0 0 0 1px var(--rule); }
.m-sys time { margin-left: 8px; color: var(--ink-3); font-size: 11px; }

.m-row { display: flex; align-items: flex-end; gap: 8px; position: relative; margin-top: 2px; }
.m-row.first { margin-top: 10px; }
.m-row.own { flex-direction: row-reverse; }
.m-av { width: 26px; flex: none; }
.m-col { display: flex; flex-direction: column; align-items: flex-start; max-width: min(560px, 74%); min-width: 0; }
.m-row.own .m-col { align-items: flex-end; }
.m-name { font-size: 12px; font-weight: 600; margin: 0 0 3px 12px; color: hsl(var(--h) 45% 36%); }
:root[data-theme="dark"] .m-name { color: hsl(var(--h) 55% 72%); }
.m-bub { position: relative; max-width: 100%; padding: 7px 12px 7px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--rule), 0 1px 2px rgba(21, 24, 30, .04); line-height: 1.45; overflow-wrap: anywhere; }
.m-row:not(.own).first .m-bub { border-top-left-radius: 18px; }
.m-row:not(.own):not(.first) .m-bub { border-top-left-radius: 6px; }
.m-row:not(.own):not(.last) .m-bub { border-bottom-left-radius: 6px; }
.m-row.own .m-bub { background: linear-gradient(180deg, #f0287a, #dc136a); color: #fff; box-shadow: inset 0 -2px 0 rgba(92, 13, 54, .3), 0 4px 12px -6px rgba(237, 27, 118, .6); }
.m-row.own:not(.first) .m-bub { border-top-right-radius: 6px; }
.m-row.own:not(.last) .m-bub { border-bottom-right-radius: 6px; }
:root[data-theme="dark"] .m-row:not(.own) .m-bub { background: var(--surface-3); box-shadow: none; }
:root[data-theme="dark"] .m-row.own .m-bub { background: linear-gradient(180deg, #c41462, #a10f50); color: #fff4f8; }
.m-txt { white-space: pre-wrap; display: inline; }
.m-txt a { text-decoration: underline; text-underline-offset: 2px; }
.m-meta { float: right; margin: 6px -2px -2px 10px; font-size: 10.5px; line-height: 1; opacity: .55; white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-bub.media { padding: 3px; }
.m-bub.media .m-meta { position: absolute; right: 10px; bottom: 9px; margin: 0; padding: 3px 7px; border-radius: 99px; background: rgba(0, 0, 0, .45); color: #fff; opacity: 1; }
.m-bub.del { background: transparent !important; color: var(--ink-3) !important; box-shadow: inset 0 0 0 1px var(--rule) !important; }
.m-bub.del i { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.m-bub.del .ic { width: 13px; height: 13px; }
.m-quote { display: flex; flex-direction: column; text-align: left; width: 100%; border: 0; font: inherit; color: inherit; cursor: pointer; margin: 1px 0 6px; padding: 6px 10px; border-radius: 10px;
  background: color-mix(in oklab, currentColor 8%, transparent); border-left: 3px solid var(--accent); min-width: 160px; }
.m-row.own .m-quote { border-left-color: rgba(255, 255, 255, .8); }
.m-quote b { font-size: 12px; font-weight: 650; color: var(--accent); }
.m-row.own .m-quote b { color: #fff; }
.m-quote span { font-size: 12.5px; opacity: .8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-gal { display: grid; gap: 3px; border-radius: 15px; overflow: hidden; margin-bottom: 4px; width: min(340px, 62vw); }
.m-bub.media .m-gal { margin: 0; }
.m-gal.n2 { grid-template-columns: 1fr 1fr; }
.m-gal.n3 { grid-template-columns: 1fr 1fr; }
.m-gal.n3 .m-img:first-child { grid-column: 1 / -1; }
.m-gal.n4 { grid-template-columns: 1fr 1fr; }
.m-img { position: relative; display: block; border: 0; padding: 0; cursor: zoom-in; background: var(--surface-3); overflow: hidden; aspect-ratio: 1; min-height: 80px; }
.m-gal.n1 .m-img { aspect-ratio: 4 / 3; max-height: 380px; }
.m-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.m-img:hover img { transform: scale(1.03); }
.m-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font-size: 22px; font-weight: 650; }
.m-vid { position: relative; width: min(360px, 66vw); border-radius: 15px; overflow: hidden; background: #000; margin-bottom: 4px; }
.m-bub.media .m-vid { margin: 0; }
.m-vid video { display: block; width: 100%; max-height: 420px; }
.m-vid-dl { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; opacity: 0; transition: opacity .15s; }
.m-vid:hover .m-vid-dl { opacity: 1; }
.m-vid-dl .ic { width: 16px; height: 16px; }
.m-aud { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 6px; }
.m-aud > span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.m-aud .ic { width: 15px; height: 15px; }
.m-aud audio { width: min(300px, 60vw); height: 36px; }
.m-file { display: flex; align-items: center; gap: 12px; padding: 9px 12px 9px 9px; border-radius: 12px; margin: 2px 0 6px; min-width: 230px; max-width: 320px;
  background: color-mix(in oklab, currentColor 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, currentColor 12%, transparent); transition: background .15s; }
.m-file:hover { background: color-mix(in oklab, currentColor 11%, transparent); }
.m-file-m { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.m-file-m b { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-file-m small { font-size: 11.5px; opacity: .65; }
.m-file-dl { width: 17px; height: 17px; opacity: .6; }
.m-ext { flex: none; width: 38px; height: 44px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-weight: 750; letter-spacing: .02em; color: #fff; background: #6b7585; position: relative; }
.m-ext::before { content: ''; position: absolute; right: 0; top: 0; border-style: solid; border-width: 0 10px 10px 0; border-color: transparent rgba(255, 255, 255, .55) transparent transparent; border-top-right-radius: 8px; }
.m-ext .ic { width: 18px; height: 18px; }
.m-ext.t-pdf { background: #d93b3b; } .m-ext.t-doc { background: #2b65c9; } .m-ext.t-xls { background: #1d8a4d; } .m-ext.t-ppt { background: #d2642a; } .m-ext.t-zip { background: #7a5bc4; }
.m-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: -5px 6px 0; position: relative; z-index: 1; }
.m-react { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 99px; border: 0; cursor: pointer; font: inherit; font-size: 13px; background: var(--surface); box-shadow: 0 0 0 1px var(--rule), 0 2px 4px -2px rgba(21, 24, 30, .15); color: var(--ink); transition: transform .12s; }
.m-react:hover { transform: translateY(-1px); }
.m-react b { font-size: 11.5px; font-weight: 650; color: var(--ink-2); }
.m-react.mine { box-shadow: 0 0 0 1.5px var(--accent); background: var(--accent-wash); }
.m-react.mine b { color: var(--accent-ink); }
:root[data-theme="dark"] .m-react.mine b { color: var(--pink-ink); }
.m-rcpt { display: inline-flex; align-items: center; gap: 2px; margin: 4px 4px 0; font-size: 11.5px; color: var(--ink-3); }
.m-rcpt .ic { width: 13px; height: 13px; }
.m-rcpt.read { color: var(--accent); }
.m-rcpt .ic + .ic { margin-left: -9px; }
.m-rcpt-av { display: inline-flex; margin-right: 5px; }
.m-rcpt-av .av { width: 16px; height: 16px; font-size: 7.5px; box-shadow: 0 0 0 1.5px var(--surface); }
.m-rcpt-av .av + .av { margin-left: -5px; }
.m-tools { display: flex; gap: 1px; padding: 3px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-pop), 0 0 0 1px var(--rule); align-self: center; opacity: 0; pointer-events: none; transform: translateY(2px); transition: opacity .12s, transform .12s; }
.m-row:hover .m-tools, .m-tools:focus-within { opacity: 1; pointer-events: auto; transform: none; }
.m-tools button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: none; border-radius: 7px; color: var(--ink-2); cursor: pointer; }
.m-tools .ic { width: 16px; height: 16px; }
.m-row.flash .m-bub { animation: flash 1.4s var(--ease); }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--warning) 70%, transparent); } }
.emo-pop { position: fixed; z-index: 90; display: flex; gap: 2px; padding: 5px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-pop), 0 0 0 1px var(--rule); opacity: 0; transform: translateY(4px) scale(.96); transition: opacity .12s, transform .15s var(--ease); }
.emo-pop.in { opacity: 1; transform: none; }
.emo-pop button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; font-size: 19px; cursor: pointer; transition: transform .12s, background .12s; }
.emo-pop button:hover { background: var(--surface-2); transform: scale(1.18); }

.ch-typing { position: absolute; left: 22px; bottom: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 6px 12px 6px 10px; border-radius: 99px; background: var(--surface); box-shadow: 0 0 0 1px var(--rule), 0 4px 10px -4px rgba(21, 24, 30, .15); font-size: 12px; color: var(--ink-2); }
.ch-typing[hidden] { display: none; }
.ch-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); animation: dots 1s infinite; }
.ch-typing i:nth-child(2) { animation-delay: .15s; } .ch-typing i:nth-child(3) { animation-delay: .3s; }
.ch-typing span { margin-left: 5px; }
@keyframes dots { 30% { transform: translateY(-3px); background: var(--ink-2); } 60% { transform: none; } }
.ch-jump { position: absolute; right: 20px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop), 0 0 0 1px var(--rule); }
.ch-jump[hidden] { display: none; }
.ch-jump .ic { width: 18px; height: 18px; }
.ch-jump em { position: absolute; top: -6px; right: -4px; font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 650; display: grid; place-items: center; }
.ch-jump em[hidden] { display: none; }
.ch-drop { position: absolute; inset: 8px; z-index: 5; display: grid; place-items: center; border-radius: 16px; border: 2px dashed var(--accent); background: color-mix(in oklab, var(--accent-wash) 85%, transparent); backdrop-filter: blur(4px); }
.ch-drop[hidden] { display: none; }
.ch-drop div { display: grid; justify-items: center; gap: 4px; color: var(--accent-ink); }
.ch-drop .ic { width: 30px; height: 30px; }
.ch-drop b { font-size: 16px; }
.ch-drop span { font-size: 13px; opacity: .8; }

/* composer */
.cmp { padding: 10px 16px 10px; border-top: 1px solid var(--rule); background: var(--surface); }
.cmp-row { display: flex; align-items: flex-end; gap: 4px; padding: 5px 5px 5px 6px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule); transition: box-shadow .15s; }
.cmp-row:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); background: var(--surface); }
.cmp-row .iconbtn { width: 36px; height: 36px; flex: none; cursor: pointer; }
.cmp-row textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: none; font: inherit; color: var(--ink); line-height: 1.45; padding: 8px 4px; max-height: 180px; }
.cmp-send { width: 38px; height: 38px; flex: none; border-radius: 12px; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--ink); color: var(--surface); transition: opacity .15s, transform .1s; }
.cmp-send:disabled { opacity: .25; cursor: default; }
.cmp-send:not(:disabled):active { transform: scale(.94); }
.cmp-send .ic { width: 18px; height: 18px; }
.cmp-hint { padding: 6px 6px 0; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-ctx { display: flex; align-items: center; gap: 10px; padding: 8px 6px 10px; }
.cmp-ctx[hidden], .cmp-tray[hidden] { display: none; }
.cmp-ctx-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); flex: none; }
.cmp-ctx-ic .ic { width: 16px; height: 16px; }
.cmp-ctx-m { min-width: 0; flex: 1; display: flex; flex-direction: column; border-left: 3px solid var(--accent); padding-left: 10px; }
.cmp-ctx-m b { font-size: 12.5px; color: var(--accent-ink); font-weight: 650; }
:root[data-theme="dark"] .cmp-ctx-m b { color: var(--pink-ink); }
.cmp-ctx-m span { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-tray { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.tray-i { position: relative; flex: none; width: 210px; display: flex; align-items: center; gap: 10px; padding: 7px 30px 7px 7px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; }
.tray-i img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
.tray-m { min-width: 0; display: flex; flex-direction: column; }
.tray-m b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-m small { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tray-i.err { box-shadow: inset 0 0 0 1.5px var(--critical); background: var(--critical-wash); }
.tray-i.err small { color: var(--critical-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-i.done small::before { content: '✓ '; color: var(--good-ink); }
.tray-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: var(--accent); transition: width .2s; }
.tray-x { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--surface); box-shadow: 0 0 0 1px var(--rule); color: var(--ink-2); cursor: pointer; }
.tray-x .ic { width: 12px; height: 12px; }
.cmp-locked { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 13.5px; background: var(--surface-2); }
.cmp-locked .ic { width: 16px; height: 16px; }

/* details panel */
.ch-info { min-width: 0; overflow-y: auto; overflow-x: hidden; border-left: 1px solid var(--rule); background: var(--surface); }
.chat:not(.info-open) .ch-info, .chat:not(:has(.ch-h)) .ch-info { visibility: hidden; }
.ci-top { position: relative; display: grid; justify-items: center; text-align: center; gap: 6px; padding: 28px 22px 20px; border-bottom: 1px solid var(--rule); width: 320px; }
.ci-top .av-xl { width: 72px; height: 72px; font-size: 24px; }
.ci-top h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; margin-top: 6px; }
.ci-top p { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.ci-top .btn { margin-top: 8px; }
.ci-close { position: absolute; top: 10px; right: 10px; }
.ci-camp { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule); font-size: 12.5px; font-weight: 550; }
.ci-camp .ic { width: 14px; height: 14px; }
.ci-sec { padding: 16px 18px; border-bottom: 1px solid var(--rule); width: 320px; }
.ci-sec h3 { font-size: 13px; font-weight: 650; margin-bottom: 10px; display: flex; gap: 6px; }
.ci-sec h3 span { color: var(--ink-3); font-weight: 500; }
.ci-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ci-stats div { padding: 10px; border-radius: 10px; background: var(--surface-2); }
.ci-stats span { display: block; font-size: 11.5px; color: var(--ink-3); }
.ci-stats b { font-size: 16px; font-weight: 650; }
.ci-stats .warn { background: var(--critical-wash); }
.ci-stats .warn b { color: var(--critical-ink); }
.ci-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ci-chips a { font-size: 12.5px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--rule); }
.ci-chips a:hover { box-shadow: inset 0 0 0 1px var(--rule-2); }
.ci-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.ci-thumb { aspect-ratio: 1; border: 0; padding: 0; background: var(--surface-3); cursor: zoom-in; display: grid; place-items: center; color: var(--ink-2); overflow: hidden; }
.ci-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ci-docs { display: flex; flex-direction: column; gap: 2px; }
.ci-doc { display: flex; align-items: center; gap: 10px; padding: 7px; margin: 0 -7px; border-radius: 10px; }
.ci-doc .m-ext { width: 32px; height: 38px; font-size: 9px; }
.ci-doc > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.ci-doc b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-doc small { font-size: 11.5px; color: var(--ink-3); }
.ci-none { font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.ci-add { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; margin: -4px -8px 4px; border: 0; background: none; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 600; color: var(--accent-ink); }
:root[data-theme="dark"] .ci-add { color: var(--pink-ink); }
.ci-add:hover { background: var(--accent-wash); }
.ci-add .ic { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--accent-wash); }
.ci-mem { list-style: none; padding: 0; margin: 0 -8px; }
.ci-mem li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.ci-mem li > span:not(.av) { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.ci-mem b { font-size: 13px; font-weight: 600; }
.ci-mem small { font-size: 11.5px; color: var(--ink-3); }
.ci-rm { width: 28px; height: 28px; opacity: 0; }
.ci-mem li:hover .ci-rm, .ci-rm:focus-visible { opacity: 1; }
.ci-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 4px 0; }
.ci-switch + .ci-switch { margin-top: 10px; }
.ci-switch > span { flex: 1; display: flex; flex-direction: column; }
.ci-switch b { font-size: 13.5px; font-weight: 600; }
.ci-switch small { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.ci-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ci-switch i { flex: none; width: 36px; height: 21px; border-radius: 11px; background: var(--rule-2); position: relative; transition: background .2s; }
.ci-switch i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.ci-switch input:checked + i { background: var(--accent); }
.ci-switch input:checked + i::after { transform: translateX(15px); }
.ci-switch input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }
.ci-switch.boxed { padding: 12px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--rule); }

@media (min-width: 861px) and (max-width: 1359px) {
  .chat.info-open:has(.ch-h) { grid-template-columns: 300px minmax(0, 1fr) 0; }
  .chat { grid-template-columns: 300px minmax(0, 1fr) 0; }
  .ch-info { position: absolute; top: 0; right: 0; bottom: 0; width: 320px; z-index: 6; box-shadow: -20px 0 40px -20px rgba(21, 24, 30, .25); transform: translateX(100%); transition: transform .28s var(--ease), visibility .28s; }
  .chat.info-open .ch-info { transform: none; }
}

/* new group / add members */
.grp-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.pick { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; }
.pick-h { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid var(--rule); background: var(--surface-2); }
.pick-h .ch-search { flex: 1; margin: 0; }
.pick-h select { max-width: 46%; }
.pick-l { list-style: none; margin: 0; padding: 6px; max-height: 300px; overflow-y: auto; }
.pick-l li[hidden] { display: none; }
.pick-l label, .pick-l button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.pick-l label > span:not(.av), .pick-l button > span:not(.av) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-l b { font-size: 13.5px; font-weight: 600; }
.pick-l small { font-size: 12px; color: var(--ink-3); }
.pick-l input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.pick-l.solo { max-height: 420px; margin-top: 10px; padding: 0; }
.pick-l button .ic { color: var(--ink-3); width: 16px; height: 16px; }
.pick-f { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-2); }

/* lightbox */
.lbx { position: fixed; inset: 0; z-index: 120; background: rgba(8, 10, 13, .9); backdrop-filter: blur(8px); display: grid; grid-template-rows: auto 1fr; opacity: 0; transition: opacity .18s; outline: none; }
.lbx.in { opacity: 1; }
.lbx-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; color: #fff; }
.lbx-bar > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lbx-bar b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbx-bar small { color: rgba(255, 255, 255, .6); font-size: 12px; }
.lbx-bar .iconbtn { color: #fff; }
.lbx-bar .iconbtn:hover { background: rgba(255, 255, 255, .12); }
.lbx figure { margin: 0; display: grid; place-items: center; padding: 8px 64px 40px; min-height: 0; }
.lbx img { max-width: 100%; max-height: calc(100vh - 120px); border-radius: 10px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); transform: scale(.97); transition: transform .25s var(--ease); }
.lbx.in img { transform: none; }
.lbx-nav { position: absolute; top: 50%; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.lbx-nav:hover { background: rgba(255, 255, 255, .22); }
.lbx-nav.prev { left: 14px; } .lbx-nav.next { right: 14px; }
.typing { font-size: 12.5px; color: var(--ink-3); padding: 0 22px 6px; min-height: 22px; }
.composer { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--rule); align-items: flex-end; }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--rule-2); border-radius: 12px; padding: 9px 12px; min-height: 40px; max-height: 160px; background: var(--surface); line-height: 1.4; }
.composer textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.quick { display: flex; gap: 6px; padding: 0 14px; overflow-x: auto; }
.quick button { border: 1px solid var(--rule); background: var(--surface); border-radius: 14px; height: 28px; padding: 0 10px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.quick button:hover { border-color: var(--rule-2); color: var(--ink); }

/* ------------------------------------------------------------------ dialogs, menus, toasts */
dialog { border: 0; padding: 0; background: transparent; color: inherit; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(14, 16, 19, .36); }
dialog.modal { width: min(520px, calc(100vw - 24px)); margin: auto; }
dialog.modal.wide { width: min(760px, calc(100vw - 24px)); }
dialog.modal .dlg { animation: pop .16s var(--ease); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
dialog.modal.closing .dlg { animation: pop .12s reverse; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }
dialog.sheet { margin: 0 0 0 auto; height: 100vh; width: min(720px, 100vw); }
dialog.sheet .dlg { height: 100%; display: flex; flex-direction: column; animation: slide .22s var(--ease); }
dialog.sheet.closing .dlg { animation: slide .18s reverse; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.dlg-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px 22px; }
.dlg-h h2 { font-size: 18px; letter-spacing: -0.02em; }
.dlg-h .iconbtn { margin-left: auto; }
.dlg-b { padding: 10px 22px 20px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; flex: 1; min-width: 0; }
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--rule); }
.sheet .dlg-b { padding: 6px 22px 22px; }

/* liquid glass: modals, side sheets and the command palette float on a coloured light */
dialog::backdrop {
  background:
    radial-gradient(40vmax 30vmax at 14% 18%, rgba(36, 159, 156, .22), transparent 62%),
    radial-gradient(38vmax 30vmax at 88% 22%, rgba(237, 27, 118, .2), transparent 62%),
    radial-gradient(40vmax 28vmax at 62% 92%, rgba(255, 141, 181, .2), transparent 62%),
    rgba(22, 8, 18, .22);
  animation: bd-in .25s var(--ease);
}
@keyframes bd-in { from { opacity: 0; } }
:root[data-theme="dark"] dialog::backdrop {
  background:
    radial-gradient(44vmax 34vmax at 16% 20%, rgba(47, 188, 184, .22), transparent 62%),
    radial-gradient(40vmax 32vmax at 86% 24%, rgba(255, 77, 141, .22), transparent 62%),
    radial-gradient(42vmax 30vmax at 64% 90%, rgba(255, 77, 141, .12), transparent 62%),
    rgba(3, 6, 5, .5);
}
dialog .dlg {
  --g-shadow: 0 2px 8px rgba(10, 14, 22, .06), 0 34px 90px -24px rgba(10, 14, 22, .45);
  --g-depth: rgba(255, 255, 255, .5); --g-tint-a: rgba(255, 120, 170, .7); --g-tint-b: rgba(60, 210, 175, .65);
  --line: rgba(26, 12, 22, .09); --well: rgba(255, 255, 255, .74); --well-b: rgba(26, 12, 22, .09);
  position: relative; isolation: isolate; overflow: hidden;
  background: rgba(246, 248, 247, .26);
  -webkit-backdrop-filter: blur(14px) saturate(190%) brightness(1.05); backdrop-filter: blur(14px) saturate(190%) brightness(1.05);
  box-shadow:
    0 0 0 .5px var(--g-hair),
    inset 0 0 0 1px var(--g-line),
    inset 1.5px 1.5px 0 -.5px var(--g-bevel),
    inset -1.5px -1.5px 0 -.5px var(--g-bevel-2),
    inset 0 0 34px -4px var(--g-depth),
    inset 0 -40px 60px -50px rgba(255, 255, 255, .7),
    var(--g-shadow);
}
dialog .dlg .field > label, dialog .dlg .dlg-h h2 { text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
dialog .field input, dialog .field select, dialog .field textarea, dialog .ctry-btn, dialog .inp {
  box-shadow: inset 0 1px 2px rgba(26, 12, 22, .05), 0 1px 0 rgba(255, 255, 255, .6); }
dialog .field input:focus, dialog .field select:focus, dialog .field textarea:focus { box-shadow: 0 0 0 3px var(--accent-wash); }
dialog.modal .dlg { border-radius: 30px; }
dialog.modal, dialog.sheet { overflow: visible; }
dialog.sheet .dlg { border-radius: 30px 0 0 30px; }
dialog .dlg > :not(.gfx) { position: relative; z-index: 1; }
.cmd .dlg { border-radius: 24px; }
dialog .dlg-f { border-top-color: var(--line); }
dialog .dlg-f .btn, dialog .dlg-h ~ .dlg-b .btn-sm { border-radius: 999px; }
dialog .dlg-f .btn { height: 40px; padding: 0 18px; }
dialog .dlg-h { padding: 18px 18px 6px 26px; }
dialog .dlg-b { padding-left: 26px; padding-right: 26px; }
dialog .dlg-f { padding: 14px 18px 18px 26px; }
dialog .dlg-h .iconbtn { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .5);
  box-shadow: 0 0 0 .5px rgba(16, 24, 40, .08), inset 0 0 0 1px rgba(255, 255, 255, .6), inset 1.5px 1.5px 0 -.5px #fff, 0 2px 6px -2px rgba(16, 24, 40, .15); }
dialog .dlg-h .iconbtn:hover { background: rgba(255, 255, 255, .8); }
:root[data-theme="dark"] dialog .dlg-h .iconbtn { background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 1.5px 1.5px 0 -.5px rgba(255, 255, 255, .18); }
:root[data-theme="dark"] dialog .dlg-h .iconbtn:hover { background: rgba(255, 255, 255, .14); }
/* fields sit in the glass as lighter wells */
dialog .field input, dialog .field select, dialog .field textarea, dialog .inp, dialog .ctry-btn, dialog .chk, dialog .ch-search,
dialog .pick, dialog .ci-switch.boxed, dialog .btn:not(.btn-primary):not(.btn-critical):not(.btn-ghost) {
  background-color: var(--well); border-color: var(--well-b); }
dialog .field input, dialog .field select, dialog .ctry-btn, dialog .inp { border-radius: 12px; }
dialog .field textarea { border-radius: 14px; }
dialog .field input:hover, dialog .field select:hover, dialog .field textarea:hover, dialog .ctry-btn:hover { background-color: rgba(255, 255, 255, .85); }
dialog .field input:focus, dialog .field select:focus, dialog .field textarea:focus { background-color: #fff; }
dialog .chk:has(input:checked) { background: var(--ink); border-color: var(--ink); }
dialog .pick { box-shadow: inset 0 0 0 1px var(--well-b); }
dialog .pick-h, dialog .pick-f { background: rgba(255, 255, 255, .35); border-color: var(--line); }
dialog .picker { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(20, 26, 38, .08), var(--shadow-pop); }
:root[data-theme="dark"] dialog .dlg {
  --line: rgba(255, 255, 255, .08); --well: rgba(255, 255, 255, .06); --well-b: rgba(255, 255, 255, .1);
  --g-shadow: 0 2px 8px rgba(0, 0, 0, .3), 0 30px 80px -20px rgba(0, 0, 0, .7);
  --g-depth: rgba(255, 255, 255, .05); --g-tint-a: rgba(255, 77, 141, .45); --g-tint-b: rgba(47, 188, 184, .4);
  background: rgba(20, 10, 18, .42);
  -webkit-backdrop-filter: blur(14px) saturate(160%) brightness(.9); backdrop-filter: blur(14px) saturate(160%) brightness(.9);
}
:root[data-theme="dark"] dialog .dlg .field > label, :root[data-theme="dark"] dialog .dlg .dlg-h h2 { text-shadow: none; }
:root[data-theme="dark"] dialog .field input, :root[data-theme="dark"] dialog .field select, :root[data-theme="dark"] dialog .field textarea, :root[data-theme="dark"] dialog .ctry-btn, :root[data-theme="dark"] dialog .inp { box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
:root[data-theme="dark"] dialog .field input:hover, :root[data-theme="dark"] dialog .field select:hover, :root[data-theme="dark"] dialog .field textarea:hover, :root[data-theme="dark"] dialog .ctry-btn:hover { background-color: rgba(255, 255, 255, .08); }
:root[data-theme="dark"] dialog .field input:focus, :root[data-theme="dark"] dialog .field select:focus, :root[data-theme="dark"] dialog .field textarea:focus { background-color: rgba(255, 255, 255, .09); }
:root[data-theme="dark"] dialog .pick-h, :root[data-theme="dark"] dialog .pick-f { background: rgba(255, 255, 255, .03); }
:root[data-theme="dark"] dialog .picker { background: rgba(30, 34, 42, .9); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), var(--shadow-pop); }
:root[data-theme="dark"] dialog .chk:has(input:checked) { background: var(--ink); color: var(--surface); }
/* people who ask for less transparency get solid panes */
@media (prefers-reduced-transparency: reduce) {
  .gfx i { display: none; }
  .gfx::after { background: var(--surface) !important; }
  dialog::backdrop { background: rgba(14, 16, 19, .5); -webkit-backdrop-filter: none; backdrop-filter: none; }
  dialog .dlg, :root[data-theme="dark"] dialog .dlg { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  dialog .dlg .gfx { --frost: .82; --frost-2: .8; }
  :root[data-theme="dark"] dialog .dlg .gfx { --frost: .86; --frost-2: .88; }
}

.menu { position: fixed; z-index: 90; min-width: 200px; background: var(--surface); border-radius: 12px; padding: 5px; box-shadow: var(--shadow-pop); opacity: 0; transform: translateY(-3px); transition: opacity .1s, transform .1s; }
.menu.in { opacity: 1; transform: none; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-weight: 500; }
.menu button:focus { outline: none; }
.menu button .ic { width: 16px; height: 16px; color: var(--ink-2); }
.menu .mi-crit { color: var(--critical-ink); } .menu .mi-crit .ic { color: inherit; }
.menu hr { border: 0; border-top: 1px solid var(--rule); margin: 5px 0; }

.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow-pop); font-weight: 500;
  opacity: 0; transform: translateY(8px); transition: opacity .18s, transform .18s var(--ease); max-width: min(520px, calc(100vw - 24px)); }
.toast.in { opacity: 1; transform: none; }
.toast-critical { background: var(--critical-ink); color: #fff; }
.toast-a { border: 0; background: none; color: inherit; font-weight: 650; text-decoration: underline; cursor: pointer; }
:root[data-theme="dark"] .toast { background: var(--surface-3); color: var(--ink); }

/* command palette */
.cmd .dlg { padding: 0; }
.cmd .dlg-b { padding: 0; }
.cmd-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.cmd-in input { flex: 1; border: 0; outline: none; background: none; font-size: 16px; }
.cmd-in .ic { color: var(--ink-3); }
.cmd-res { max-height: 420px; overflow-y: auto; padding: 6px; }
.cmd-g { font-size: 12px; color: var(--ink-3); padding: 10px 10px 4px; }
.cmd-i { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.cmd-i[aria-selected="true"] { background: var(--surface-2); }
.cmd-i small { margin-left: auto; color: var(--ink-3); }
.cmd-i .ic { color: var(--ink-2); }

/* empty, skeleton */
.empty { text-align: center; padding: 42px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); margin-bottom: 8px;
  background-image: linear-gradient(135deg, transparent 45%, var(--rule-2) 45% 55%, transparent 55%); }
.empty h3 { font-size: 15px; }
.empty p { color: var(--ink-2); max-width: 44ch; }
.empty .btn { margin-top: 10px; }
.skel { display: grid; gap: 10px; padding: 18px; }
.skel-row { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skel-row:nth-child(3n) { width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-page { padding: 60px; display: grid; place-items: center; color: var(--ink-3); }

/* ------------------------------------------------------------------ auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 42fr) 58fr; background: var(--surface); }
.auth-l { display: flex; flex-direction: column; padding: 32px clamp(28px, 5vw, 72px); min-height: 100vh; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; }
.auth-brand b { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; }
.auth-form { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 400px; margin: 0 auto; padding: 48px 0; }
.auth-form h1 { font-size: clamp(36px, 3.6vw, 46px); line-height: 1.02; font-weight: 650; letter-spacing: -0.045em; font-variation-settings: 'opsz' 40; }
.auth-sub { color: var(--ink-2); font-size: 15px; line-height: 1.5; margin-top: 12px; max-width: 38ch; }
.auth-sub b { color: var(--ink); font-weight: 600; }
.auth-fields { display: grid; gap: 16px; margin-top: 32px; }
.auth-fields.bad { animation: shake .36s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.af { display: grid; gap: 7px; }
.af-l { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.af-h { font-weight: 500; color: var(--ink-3); }
.af-in { position: relative; display: flex; align-items: center; }
.af-in > .ic { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; transition: color .15s; }
.af-in input { width: 100%; height: 48px; padding: 0 46px 0 44px; border: 1px solid var(--rule-2); border-radius: 12px; background: var(--surface); font-size: 15px;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.af-in input::placeholder { color: var(--ink-3); }
.af-in input:hover { border-color: var(--ink-3); }
.af-in input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ink) 9%, transparent); }
.af-in:focus-within > .ic { color: var(--ink); }
.af-eye { position: absolute; right: 6px; width: 36px; height: 36px; border: 0; background: none; border-radius: 9px; display: grid; place-items: center; color: var(--ink-3); cursor: pointer; }
.af-eye:hover { background: var(--surface-2); color: var(--ink); }
.af-eye .ic { width: 18px; height: 18px; }
.af-caps, .af-err { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.af-caps { color: var(--warning-ink); }
.af-caps .ic, .af-err .ic { width: 16px; height: 16px; flex: none; }
.af-err { color: var(--critical-ink); background: var(--critical-wash); padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.af-err[hidden], .af-caps[hidden] { display: none; }
.auth-fields.bad .af-in input { border-color: var(--critical); }
.auth-btn { height: 50px; border-radius: 12px; font-size: 15px; margin-top: 6px; width: 100%; position: relative; overflow: hidden; }
.auth-btn.done { background: var(--accent); border-color: var(--accent); }
.auth-demo { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--rule); border-radius: 12px; cursor: pointer; }
.auth-demo .switch { margin-top: 1px; }
.auth-demo b { display: block; font-weight: 600; }
.auth-demo small { display: block; color: var(--ink-2); font-size: 12.5px; margin-top: 2px; line-height: 1.45; }
.auth-note { display: flex; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.auth-note .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ink-3); }
.auth-note b { color: var(--ink); font-weight: 600; }
.auth-foot { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }

/* the stage: a small live control room, always dark */
.stage { --st-bg: #0d060b; --st-card: rgba(30, 13, 25, .9); --st-line: rgba(255, 134, 178, .07); --st-ink: #f8eef4; --st-ink2: #b9a2b2; --st-ink3: #806a7a;
  position: relative; margin: 14px 14px 14px 0; border-radius: 28px; background: var(--st-bg); color: var(--st-ink); overflow: hidden; min-height: calc(100vh - 28px);
  isolation: isolate; display: flex; flex-direction: column; padding: 28px clamp(24px, 3vw, 44px) clamp(24px, 4vh, 40px); }
:root[data-theme="dark"] .stage { box-shadow: 0 0 0 1px rgba(255, 255, 255, .07); }
.stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.stage-grid { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--st-line) 1px, transparent 1px), linear-gradient(90deg, var(--st-line) 1px, transparent 1px); background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 55% 40%, #000 25%, transparent 80%); mask-image: radial-gradient(ellipse 85% 75% at 55% 40%, #000 25%, transparent 80%); }
.stage-top { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--st-ink2); font-weight: 500; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2fbcb8; box-shadow: 0 0 0 0 rgba(47, 188, 184, .6); animation: livep 2s infinite; }
@keyframes livep { 70% { box-shadow: 0 0 0 8px rgba(47, 188, 184, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 188, 184, 0); } }
.stage-copy { margin-top: 8px; }
.stage-copy h2 { font-size: clamp(24px, 2.5vw, 38px); line-height: 1.06; font-weight: 650; letter-spacing: -0.035em; font-variation-settings: 'opsz' 40; max-width: 16ch; text-wrap: balance; }
.stage-copy p { color: var(--st-ink2); margin-top: 12px; max-width: 46ch; font-size: clamp(13px, 1vw, 15px); line-height: 1.55; }
.stage-plat { display: flex; gap: 8px; margin-top: 18px; }
.stage .pm-tiktok, .landing .pm-tiktok { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }

/* scene: fixed 720×560 design canvas, scaled as one piece by JS */
.scene-fit { position: relative; flex: 1; min-height: 260px; }
.scene { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.8); transform-origin: center; font-size: 14px; }
.sc { position: absolute; background: var(--st-card); border-radius: 18px; color: var(--st-ink);
  box-shadow: 0 0 0 1px var(--st-line), 0 30px 60px -24px rgba(0, 0, 0, .75); backdrop-filter: blur(6px);
  opacity: 0; translate: 0 16px; transition: opacity .8s var(--ease), translate .8s var(--ease); }
.scene.in .sc { opacity: 1; translate: 0 0; }
.scene.in .sc-flag { transition-delay: .25s; } .scene.in .sc-cpm { transition-delay: .45s; } .scene.in .sc-creator { transition-delay: .6s; }
.sc-l { font-size: 12.5px; color: var(--st-ink2); font-weight: 500; white-space: nowrap; }
.sc-chip { font-size: 12px; font-weight: 650; padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.sc-chip.good { background: rgba(10, 172, 35, .16); color: #5bd96d; }
.tick { animation: tick .5s var(--ease); }
@keyframes tick { 0% { color: #ff8db5; } 100% { color: inherit; } }

.sc-main { left: 0; top: 64px; width: 452px; height: 328px; padding: 22px 22px 18px; display: flex; flex-direction: column; }
.sc-bigrow { display: flex; align-items: center; gap: 12px; margin: 6px 0 auto; }
.sc-big { font-size: 46px; line-height: 1.1; font-weight: 650; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; font-variation-settings: 'opsz' 40; white-space: nowrap; }
.mini-cols { height: 150px; display: flex; align-items: flex-end; gap: 7px; margin-top: 16px; }
.mc { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; transform-origin: bottom; transition: height 1.2s var(--ease); }
.scene.in .mc { animation: grow .9s var(--ease) both; animation-delay: calc(.2s + var(--i) * 35ms); }
.mc i { display: block; min-height: 1px; }
.mc i:last-child { border-radius: 4px 4px 0 0; }
.mc-live { position: relative; }
.mc-live::after { content: ''; position: absolute; inset: -5px -2px auto; height: 3px; border-radius: 2px; background: #f44786; box-shadow: 0 0 12px #f44786; }
.sc-legend { display: flex; flex-wrap: nowrap; gap: 14px; margin-top: 14px; font-size: 12px; color: var(--st-ink2); white-space: nowrap; }
.sc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sc-legend i { width: 7px; height: 7px; border-radius: 2px; }

.sc-flag { right: 0; top: 0; width: 332px; padding: 16px 18px; display: grid; gap: 10px; }
.sc-head { display: flex; align-items: center; gap: 12px; }
.flag-ic { width: 38px; height: 38px; border-radius: 11px; background: rgba(240, 82, 82, .15); color: #ff7b7b; display: grid; place-items: center; flex: none; }
.flag-ic .ic { width: 19px; height: 19px; }
.sc-head b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; }
.sc-head div > span { display: block; font-size: 12.5px; color: var(--st-ink2); white-space: nowrap; margin-top: 1px; }
.flag-spark { width: 100%; height: 56px; display: block; }
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--st-ink2); white-space: nowrap; }
.pill-x { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; padding: 4px 9px 4px 6px; border-radius: 8px; background: rgba(240, 82, 82, .15); color: #ff8a8a; white-space: nowrap; }
.pill-x .ic { width: 13px; height: 13px; }

.sc-cpm { right: 8px; top: 232px; width: 232px; height: 146px; padding: 16px 18px; display: flex; flex-direction: column; }
.sc-mid { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 28px; font-weight: 650; letter-spacing: -0.03em; margin-top: 4px; white-space: nowrap; }
.cpm-bars { flex: 1; display: flex; align-items: flex-end; gap: 6px; margin-top: 10px; }
.cpm-bars i { flex: 1; border-radius: 3px 3px 0 0; background: #2c3540; }
.cpm-bars i.hi { background: #f05252; opacity: .75; }

.sc-creator { left: 72px; top: 416px; width: 430px; display: flex; align-items: center; gap: 14px; padding: 16px 20px 16px 16px; }
.sc-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: hsl(330 25% 26%); color: hsl(330 60% 85%); font-weight: 650; font-size: 15px; flex: none; }
.sc-who { min-width: 0; }
.sc-who b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; }
.sc-who span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--st-ink2); margin-top: 4px; white-space: nowrap; }
.sc-gain { margin-left: auto; text-align: right; flex: none; }
.sc-gain b { display: block; font-size: 21px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: #5fd8d3; white-space: nowrap; }
.sc-gain span { font-size: 12px; color: var(--st-ink2); white-space: nowrap; }

@media (max-width: 1100px) {
  .auth { grid-template-columns: 1fr; }
  .stage { display: none; }
  .auth-form { max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } .sc { transition: none; } }

/* a slow light behind the whole page: it runs under the scene card too,
   so there is no hard edge where the two columns meet */
.auth { position: relative; isolation: isolate; overflow: hidden; }
.auth-l { position: relative; }
.auth::before, .auth::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.auth::before { width: 520px; height: 520px; left: -260px; bottom: -280px; background: rgba(36, 159, 156, .16); animation: drift1 18s ease-in-out infinite alternate; }
.auth::after { width: 560px; height: 560px; left: calc(42% - 300px); top: -300px; background: rgba(237, 27, 118, .1); animation: drift2 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(140px, -90px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-120px, 110px) scale(.9); } }
:root[data-theme="dark"] .auth::before { background: rgba(47, 188, 184, .12); }
@media (prefers-reduced-motion: reduce) { .auth::before, .auth::after { animation: none; } }

/* portal */
.welcome { font-size: 30px; letter-spacing: -0.03em; font-weight: 640; font-variation-settings: 'opsz' 40; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1320px) {
  .econ-kpi { --cols: 3 !important; }
  .econ-kpi .stat:nth-child(4) { border-left: 0; }
  .econ-kpi .stat:nth-child(n+4) { border-top: 1px solid var(--rule); }
  .rows.pace > li { grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.6fr) 150px; }
  .pace-p { display: none; }
  .g-ins { grid-template-columns: 1fr 1fr; }
  .g-ins > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
  .g-econ, .g-econ2 { grid-template-columns: 1fr; }
  .g-main, .g-side { grid-template-columns: 1fr; }
  .pulse { grid-template-columns: 1fr; }
  .pulse-l { border-right: 0; border-bottom: 1px solid var(--rule); }
  .pulse-mini { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  :root { --side: 0px; }
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 10px 12px 90px; }
  .searchbtn { min-width: 0; }
  .searchbtn span, .searchbtn kbd { display: none; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--rule); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); padding: 4px 8px; border-radius: 8px; position: relative; }
  .mobile-nav a[aria-current="page"] { color: var(--ink); }
  .mobile-nav .cnt { position: absolute; top: 0; right: 4px; background: var(--critical); color: #fff; font-size: 10px; border-radius: 8px; padding: 0 4px; }
  .g-2, .g-3, .g-ins { grid-template-columns: 1fr; }
  .econ-kpi { --cols: 2 !important; }
  .econ-kpi .stat:nth-child(4) { border-left: 1px solid var(--rule); }
  .econ-kpi .stat:nth-child(2n+1) { border-left: 0; }
  .econ-kpi .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .rows.pace > li { grid-template-columns: 1fr; gap: 8px; }
  .pace-s { justify-self: start; }
  .sec-h h2 { font-size: 19px; }
  .drp { grid-template-columns: 1fr; left: 8px !important; right: 8px; top: 60px !important; max-height: calc(100vh - 80px); overflow: auto; }
  .drp-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--rule); }
  .drp-months { grid-template-columns: 1fr; }
  .drp-months .drp-m:first-child { display: none; }
  .drp-g { grid-template-columns: repeat(7, 1fr); }
  .drp-f .inp { width: 135px; }
  .stats { --cols: 2 !important; }
  .stat:nth-child(2n+1) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .pulse-mini { grid-template-columns: 1fr 1fr; }
  .hero-n { font-size: 46px; }
  .ph h1 { font-size: 25px; }
  .chat, .chat.info-open:has(.ch-h) { grid-template-columns: 1fr; height: calc(100dvh - 150px); border-radius: 12px; }
  .chat.open .ch-list { display: none; }
  .chat:not(.open) .ch-main { display: none; }
  .ch-back { display: grid; }
  .hide-sm { display: none !important; }
  .ch-info { position: fixed; inset: 0; z-index: 70; border: 0; transform: translateX(100%); transition: transform .28s var(--ease); visibility: visible; }
  .chat.info-open .ch-info { transform: none; }
  .chat:not(.info-open) .ch-info { visibility: hidden; }
  .ci-top, .ci-sec { width: auto; }
  .ch-msgs { padding: 10px 12px 16px; }
  .m-col { max-width: 84%; }
  .m-tools { display: none; }
  .cmp { padding: 8px 10px; }
  .cmp-hint { display: none; }
  .grp-top { grid-template-columns: 1fr; }
  .form .row, .form .row3 { grid-template-columns: 1fr; }
  .flag { grid-template-columns: 44px minmax(0, 1fr); }
  .flag-score { width: 44px; height: 44px; font-size: 16px; }
  .flag-r { grid-column: 2; align-items: flex-start; text-align: left; flex-direction: row; }
  .prof { flex-wrap: wrap; }
  .prof .r { margin-left: 0; }
  .hide-m { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .dcol-stack i, .segbar-p, .meter i { forced-color-adjust: none; }
}


/* ================================================================ arena edition
   The look of the references, kept professional: a night arena lit in pink and teal, titles
   and figures in a geometric face, pink controls that press like real buttons. */
.app::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 55vh at 92% -12%, var(--glow-a), transparent 70%),
    radial-gradient(46vw 50vh at 30% 112%, var(--glow-b), transparent 70%); }
:root[data-theme="dark"] .app::before { background:
    radial-gradient(60vw 55vh at 92% -12%, var(--glow-a), transparent 70%),
    radial-gradient(46vw 50vh at 30% 112%, var(--glow-b), transparent 70%),
    radial-gradient(120vw 80vh at 50% 120%, rgba(92, 13, 54, .25), transparent 70%); }

/* titles and figures */
.ph h1, .prof h1, .welcome, .dlg-h h2, .brand b, .auth-form h1, .stage-copy h2, .empty h3 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; font-variation-settings: normal; }
.panel-h h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; font-size: 14.5px; }
.hero-n, .stat-v, .sc-big, .sc-mid { font-family: var(--font-display); font-weight: 750; letter-spacing: -0.04em; font-variant-numeric: tabular-nums lining-nums; font-variation-settings: normal; }
.stat-v { font-size: 23px; }
.brand b { font-size: 16.5px; letter-spacing: -0.03em; }

/* the figure strips carry the pink edge of the reference cards */
.panel.stats { box-shadow: 0 0 0 1px var(--rule), inset 0 -2px 0 var(--pink); }

/* night panels: deep plum, a hairline of pink light on top */
:root[data-theme="dark"] .panel { background: linear-gradient(180deg, #1a0d17, #150a12 60%); box-shadow: 0 0 0 1px var(--rule), inset 0 1px 0 rgba(255, 134, 178, .06); }
:root[data-theme="dark"] .panel.stats { box-shadow: 0 0 0 1px var(--rule), inset 0 1px 0 rgba(255, 134, 178, .06), inset 0 -2px 0 var(--pink), 0 10px 30px -18px rgba(237, 27, 118, .5); }
:root[data-theme="dark"] .btn:not(.btn-primary):not(.btn-accent):not(.btn-critical):not(.btn-good):not(.btn-ghost) { background: #1d0f1a; border-color: var(--rule-2); }
:root[data-theme="dark"] .btn:not(.btn-primary):not(.btn-accent):not(.btn-critical):not(.btn-good):not(.btn-ghost):hover { border-color: rgba(255, 106, 156, .5); }

/* campaign cards: titles and figures in the display face, the pink edge lights up on hover */
.camp-h h3 { font-family: var(--font-display); font-weight: 750; letter-spacing: -0.02em; }
.camp-n div b { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; }
.camp { transition: box-shadow .18s var(--ease), transform .18s var(--ease); }
.camp:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--rule-2), inset 0 -2px 0 var(--pink), 0 14px 30px -16px rgba(237, 27, 118, .45); }
:root[data-theme="dark"] .camp:hover { box-shadow: 0 0 0 1px rgba(255, 106, 156, .3), inset 0 -2px 0 var(--pink), 0 16px 34px -16px rgba(237, 27, 118, .6); }
@media (prefers-reduced-motion: reduce) { .camp:hover { transform: none; } }

/* ---------------------------------------------------------------- link accounts */
.camp-dot { width: 8px; height: 8px; border-radius: 3px; flex: none; background: hsl(var(--h, 330) 60% 52%); }
.chk:has(input:checked) .camp-dot { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .8); }
.ap:empty { display: none; }
.ap { margin-top: -4px; border-radius: 14px; background: var(--well, var(--surface-2)); box-shadow: inset 0 0 0 1px var(--well-b, var(--rule)); overflow: hidden; }
.ap-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line, var(--rule)); font-size: 13px; }
.ap-h b { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
.ap-h span { color: var(--warning-ink); }
.ap-list { list-style: none; margin: 0; padding: 4px 0; max-height: 236px; overflow-y: auto; overscroll-behavior: contain; }
.ap-list li { display: flex; align-items: center; gap: 10px; padding: 7px 14px; min-height: 44px; animation: ap-in .22s var(--ease) both; }
.ap-list li + li { border-top: 1px solid var(--line, var(--rule)); }
@keyframes ap-in { from { opacity: 0; transform: translateY(3px); } }
.ap-w { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.ap-w b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-w small { color: var(--ink-3); font-size: 12px; }
.ap-raw { font-weight: 500 !important; color: var(--ink-2); }
.ap-x { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--warning-wash); color: var(--warning-ink); }
.ap-x .ic { width: 14px; height: 14px; }
.ap-list em { font-style: normal; font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; text-align: right; flex: none; max-width: 46%; }
.ap-list li.ok em { color: var(--good-ink); font-weight: 600; }
.ap-list li.ok em .ic { width: 14px; height: 14px; }
.ap-list li.bad em { color: var(--warning-ink); }
.ap-list li.bad .ap-w b { color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .ap-list li { animation: none; } }
.acc-camps { display: flex !important; align-items: center; gap: 5px; margin-top: 2px; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.acc-camps i { width: 7px; height: 7px; border-radius: 2px; background: hsl(var(--h) 60% 52%); flex: none; }
.acc-camps i + i { margin-left: -3px; box-shadow: 0 0 0 1.5px var(--surface); }

/* wide picker: one row per creator with what helps you choose (accounts, size, campaigns, activity) */
.picker-wide { container-type: inline-size; max-height: min(520px, calc(100vh - 24px)); display: flex; flex-direction: column; }
.picker-wide .picker-list { flex: 1; min-height: 0; }
.picker-head { display: flex; align-items: center; gap: 12px; padding: 8px 14px 6px; font-size: 11.5px; color: var(--ink-3); border-bottom: 1px solid var(--rule); }
.picker-head .pk-h-who { flex: 1; min-width: 0; }
.picker-wide .picker-list li[data-i] { gap: 12px; padding: 8px; min-height: 52px; }
.picker-wide .picker-list li + li[data-i] { margin-top: 1px; }
.picker-wide .picker-h { display: none; }
.picker-wide .picker-t b { font-weight: 600; }
.picker-wide .picker-t small { display: flex; align-items: center; gap: 6px; margin-top: 2px; white-space: nowrap; overflow: hidden; }
.picker-wide .picker-t small > span:not(.st):not(.cflag) { overflow: hidden; text-overflow: ellipsis; }
.picker-wide .picker-t small .st { transform: scale(.88); transform-origin: left center; }
.picker-ck { flex: none; }
.pk-acc { width: 150px; flex: none; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pk-acc small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-acc .pk-none { color: var(--warning-ink); font-weight: 600; }
.pk-marks { display: flex; gap: 3px; }
.pk-num { width: 66px; flex: none; text-align: right; display: flex; flex-direction: column; line-height: 1.2; }
.pk-num b { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-num small { font-size: 11px; color: var(--ink-3); }
.pk-last { width: 84px; }
.pk-last b { font-family: var(--font); font-weight: 600; font-size: 12.5px; letter-spacing: 0; color: var(--ink-2); }
.picker-head .pk-acc, .picker-head .pk-num { display: block; font-size: 11.5px; }
.picker-head .pk-h-who { padding-left: 46px; }
@container (max-width: 640px) { .pk-last { display: none !important; } }
@container (max-width: 500px) { .pk-num { display: none !important; } .pk-acc { width: 96px; } }
:root[data-theme="dark"] dialog .picker { background: rgba(30, 14, 26, .92); }
/* the clear button of search boxes, in the colours of the theme instead of the browser's blue */
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-left: 6px; cursor: pointer; border-radius: 50%; opacity: .7;
  background: var(--surface-3) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M5.2 5.2l5.6 5.6M10.8 5.2l-5.6 5.6' stroke='%2394818f' stroke-width='1.7' stroke-linecap='round'/></svg>") center / 14px no-repeat; }
input[type="search"]::-webkit-search-cancel-button:hover { opacity: 1; }

.ch-item:focus-visible, .ch-hit:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }


/* ================================================================ row highlight
   One quiet blush for every list you can point at: a pink that fades from the left edge,
   a hairline of the same pink, and in tables a thin pink line on the leading edge.
   Defined once, so every list in the product looks the same. */
:root {
  --hl-fill: linear-gradient(90deg, rgba(237, 27, 118, .065) 0%, rgba(237, 27, 118, .028) 62%, rgba(237, 27, 118, .04) 100%);
  --hl-flat: rgba(237, 27, 118, .038);
  --hl-ring: rgba(237, 27, 118, .11);
  --hl-edge: rgba(237, 27, 118, .55);
  --hl-fill-r: linear-gradient(270deg, rgba(237, 27, 118, .065) 0%, rgba(237, 27, 118, .028) 62%, rgba(237, 27, 118, .04) 100%);
}
:root[data-theme="dark"] {
  --hl-fill: linear-gradient(90deg, rgba(244, 71, 134, .12) 0%, rgba(244, 71, 134, .05) 62%, rgba(244, 71, 134, .075) 100%);
  --hl-flat: rgba(244, 71, 134, .065);
  --hl-ring: rgba(255, 106, 156, .15);
  --hl-edge: rgba(255, 106, 156, .7);
  --hl-fill-r: linear-gradient(270deg, rgba(244, 71, 134, .12) 0%, rgba(244, 71, 134, .05) 62%, rgba(244, 71, 134, .075) 100%);
}
.picker-list li.act, .cmd-i[aria-selected="true"],
.pick-l label:hover, .pick-l button:hover,
.plist button:hover,
.ci-doc:hover, .ci-mem li:hover,
.menu button:hover, .menu button:focus-visible, .drp-presets button:not(.on):hover {
  background: var(--hl-fill); box-shadow: inset 0 0 0 1px var(--hl-ring); }
.drp-presets button:not(.on):hover { color: var(--ink); }
.picker-list li[data-i], .cmd-i, .ch-item, .ch-hit, .pick-l label, .pick-l button, .rows > li.clickable, .flag, .plist button,
.ci-doc, .ci-mem li, .menu button, .drp-presets button { transition: background-color .14s, box-shadow .14s; }
/* tables: a flat blush across the row and a thin pink line where the row starts */
.tbl tbody tr:hover, .rows > li.clickable:hover, .flag:hover { background: var(--hl-flat); }
.tbl tbody tr:hover > td:first-child, .rows > li.clickable:hover, .flag:hover { box-shadow: inset 2px 0 0 var(--hl-edge); }
/* conversations in the messages list: the same flat blush and pink line, square like a table row */
.ch-item:not([aria-current="true"]):hover, .ch-hit:hover { background: var(--hl-flat); box-shadow: inset 2px 0 0 var(--hl-edge); border-radius: 0; }
.tbl tbody tr > td:first-child { transition: box-shadow .14s; }
/* the danger item of a menu keeps its own red */
.menu button.mi-crit:hover, .menu button.mi-crit:focus-visible { background: var(--critical-wash); box-shadow: none; }
/* letters that match a search: the same pink, a touch deeper */
.pk-hl { background: rgba(237, 27, 118, .12); color: var(--pink-ink); font-weight: 650; border-radius: 4px; padding: 0 1px; margin: 0 -1px; }
:root[data-theme="dark"] .pk-hl { background: rgba(244, 71, 134, .24); color: #ffc2d8; }

/* messages in a chat: the rounded highlight of the lists, fading from the side the message came from */
.m-row { isolation: isolate; }
.m-row::before { content: ''; position: absolute; inset: -3px -12px; border-radius: 14px; z-index: -1; pointer-events: none;
  background: var(--hl-fill); box-shadow: inset 0 0 0 1px var(--hl-ring); opacity: 0; transition: opacity .16s var(--ease); }
.m-row.own::before { background: var(--hl-fill-r); }
.m-row:hover::before, .m-row:focus-within::before { opacity: 1; }
.m-tools button:hover { background: var(--hl-fill); box-shadow: inset 0 0 0 1px var(--hl-ring); color: var(--ink); }
@media (hover: none) { .m-row:hover::before { opacity: 0; } }

/* ---------------------------------------------------------------- managers */
.mgr-me { font-style: normal; font-size: 11px; font-weight: 600; color: var(--pink-ink); background: var(--pink-wash); border-radius: 99px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; }
.mgr-ct { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.mgr-ct small { color: var(--ink-3); font-size: 12.5px; }
.mgr-camps { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; }
.mgr-camp { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.mgr-camp i { width: 8px; height: 8px; border-radius: 3px; background: hsl(var(--h) 60% 52%); flex: none; }
.mgr-tbl td { vertical-align: middle; }
/* faces of the managers on a campaign card */
.mgr-stack { display: inline-flex; align-items: center; margin-left: 4px; }
.mgr-stack .av { box-shadow: 0 0 0 2px var(--surface), inset 0 1px 0 rgba(255, 255, 255, .35); }
.mgr-stack .av + .av { margin-left: -3px; }
.mgr-stack b { font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-left: 5px; }
:root[data-theme="dark"] .mgr-stack .av { box-shadow: 0 0 0 2px #170b14; }
/* who follows a campaign, under its title */
.mgr-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.mgr-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px 0 4px; border-radius: 99px; background: var(--surface); box-shadow: 0 0 0 1px var(--rule); font-size: 13px; transition: box-shadow .14s, background-color .14s; }
.mgr-chip b { font-weight: 600; }
.mgr-chip small { color: var(--ink-3); font-size: 12px; }
.mgr-chip:hover { background: var(--hl-flat); box-shadow: 0 0 0 1px var(--hl-ring); }
/* manager choices in the campaign form */
.chk-av { padding-left: 4px; }
.chk-av .av { flex: none; }
.chk-av small { color: var(--ink-3); font-size: 11.5px; margin-left: 2px; }
.chk-av:has(input:checked) small, .chk-av:has(input:checked) .faint { color: inherit; opacity: .7; }
/* invitation link */
.inv-link { display: flex; gap: 8px; }
.inv-link input { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 1px solid var(--rule-2); padding: 0 12px; background: var(--well, var(--surface-2)); font-size: 13px; color: var(--ink-2); }
.inv-link .btn { height: 40px; border-radius: 999px; }

/* ---------------------------------------------------------------- sign-in code */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-d { width: 100%; height: 58px; text-align: center; font-family: var(--font-display); font-size: 24px; font-weight: 750; color: var(--ink);
  border: 1px solid var(--rule-2); border-radius: 14px; background: var(--surface); caret-color: var(--pink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.otp-d:nth-child(3) { margin-right: 6px; }
.otp-d:hover { border-color: var(--ink-3); }
.otp-d:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px var(--pink-wash); }
.otp-full .otp-d { border-color: var(--pink); }
.bad .otp-d { border-color: var(--critical); }
.auth-link { border: 0; background: none; padding: 6px 0; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--pink-ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.auth-link:hover:not([disabled]) { text-decoration: underline; text-underline-offset: 3px; }
.auth-link[disabled] { color: var(--ink-3); cursor: default; font-weight: 500; }
.auth-link .ic { width: 15px; height: 15px; }
.auth-alt { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.auth-dev { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border: 1px dashed var(--rule-2); border-radius: 10px; padding: 9px 11px; }
.auth-dev .ic { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--ink-3); }
.auth-dev b { font-family: var(--font-display); letter-spacing: .12em; color: var(--ink); }
.auth-devslot:empty { display: none; }
@media (max-width: 420px) { .otp { gap: 6px; } .otp-d { height: 52px; font-size: 21px; } }

/* ---------------------------------------------------------------- admin */
.st-sub { font-weight: 500; opacity: .8; }
.dur { gap: 6px; }
.dur-date { margin-top: 10px; max-width: 220px; height: 40px; border-radius: 12px; border: 1px solid var(--rule-2); padding: 0 12px; background: var(--surface); }
.dur-date[hidden] { display: none; }
.adm-send { margin-top: 4px; }
.search-in.sm { height: 34px; min-width: 200px; }
.adm-checks { list-style: none; margin: 0; padding: 6px 0 10px; }
.adm-checks li { display: flex; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--rule); }
.adm-checks li:first-child { border-top: 0; }
.adm-checks b { font-weight: 650; }
.adm-checks p { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.adm-checks p b { font-weight: 600; color: var(--ink); }
.adm-checks code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.adm-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.adm-ic .ic { width: 15px; height: 15px; }
.adm-checks li.ok .adm-ic { background: var(--good-wash); color: var(--good-ink); }
.adm-checks li.warn .adm-ic { background: var(--warning-wash); color: var(--warning-ink); }
.adm-bk { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.adm-bk .btn small { color: var(--ink-3); font-weight: 500; margin-left: 4px; }
