/* ReferOn Mini App: the ReferOn admin app style (REFERON_UI_STYLE_GUIDE.md): #F8F8FF page, white cards without borders
   (radius 6, shadow base), one blue #235EA5 for every action, weight 500, Oswald only in table column headers,
   Material Icons Outlined, light motion only (the Motion block at the end) */
:root {
  --bg: #F8F8FF;
  --card: #FFFFFF;
  --line: #E2E8F0;          /* borders */
  --divider: #DBE0E6;       /* table rows, separators */
  --text: #2D3748;
  --text-table: #343944;
  --text-2: #4A5568;        /* secondary text */
  --muted: #5F6B7A;         /* captions, placeholders (ReferOn's #718096 was 4.0:1 on white, under WCAG AA; 2026-10-10) */
  --faint: #A0AEC0;
  --disabled: #CBD5E0;
  --icon-2: #758091;        /* chevrons, second-plan icons */
  --gray-50: #F7FAFC;
  --gray-100: #EDF2F7;
  --accent: #235EA5;
  --accent-hover: #CEE5FC;
  --accent-hover-text: #174376;
  --accent-soft: #EBF5FE;
  --nav-active: #E7EEFF;
  --head-pinned: #F3F9FF;
  --focus: 0 0 0 3px #B8DBFF;
  --up: #027A48;            /* WCAG AA on white (ReferOn's #039855 was 3.7:1) */
  --up-soft: #D1FADF;
  --up-bg: #ECFDF3;
  --down: #D92D20;
  --down-soft: #FEE4E2;
  --down-bg: #FEF3F2;
  --warn: #DC6803;
  --warn-soft: #FFFAEB;
  --count: #F79009;         /* orange counters / notifications only */
  --on-count: #2B1700;      /* digits on an orange counter (white on orange was 2.3:1) */
  --purple: #805AD5;
  --purple-soft: #FAF5FF;
  --dark: #2D3748;          /* tooltips, toasts */
  --on-dark: #FFFFFF;       /* text on tooltips, toasts */
  --on-accent: #FFFFFF;     /* text on a filled blue button */
  --on-color: #FFFFFF;      /* letters on coloured tiles (brand letters, avatars, counters) */
  --elev: #FFFFFF;          /* sheets: one step above the cards in the dark theme */
  --logo: #0074FF;
  --ok-text: #2C6A44; --ok-line: #82F7AE; --wait-text: #B54708; --wait-line: #FEC84B; --bad-line: #FDA29B; --neutral-text: #575E6D;
  --sub-line: #D6C6F5;
  --note-bg: #F5F8FF; --note-line: #D2E0FF; --note-text: #484E5B; --note-icon: #4A7FCE;
  --vis-bg: #F5FAFE; --vis-line: #B8DBFF;
  --chip-bg: #E6F0F6;
  --sel-line: #9DCCFA;      /* the border of a selected outlined chip */
  --tag-line: #C9D9EE; --tag-off-line: #F3C4C4; --off-bg: #FDECEC;
  --bar-dark: #1F2937; --bar-text: #BFDBFE;   /* the selection bar */
  --bar-s: #7BA7DB; --bar-d: #C9D6E8;
  --plate-shadow: 0 1px 2px rgba(23, 25, 35, .1), 0 0 1px rgba(23, 25, 35, .2);
  --nav-shadow: 0 1px 2px rgba(23, 25, 35, .1);
  --img-ring: 0 0 0 1px rgba(0, 0, 0, .08);
  --pin-shadow: 6px 0 8px -6px rgba(0, 0, 0, .16);
  --float-shadow: 0 4px 16px rgba(0, 0, 0, .14), 0 1px 3px rgba(0, 0, 0, .08);
  --bar-shadow: 0 6px 18px rgba(0,0,0,.25);
  --backdrop: rgba(0, 0, 0, .48);
  /* charts */
  --c-cpa: #235EA5; --c-rs: #9DCCFA; --c-sa: #FAC515; --c-cpc: #15B79E; --c-fixed: #805AD5; --c-grid: #EDF2F7; --c-axis: #CBD5E0;
  --c-bad: #D92D20;
  --c-agent: #235EA5; --c-prep: #9DCCFA; --c-human: #A0AEC0;  /* AI requests map: who does the task */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
  --radius: 6px;
  --radius-sheet: 12px;
  --font: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: Oswald, "Arial Narrow", sans-serif;
  --mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  /* Material Icons Outlined as masks: the icon takes the element's text color */
  --i-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  --i-unfold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E");
  --i-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
  --i-help: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z'/%3E%3C/svg%3E");
  --kn-sea: #EEF3F8; --kn-land: #FFFFFF; --kn-land-line: #E3E8EF; --kn-glass: rgba(255, 255, 255, .72); --kn-glass-line: rgba(255, 255, 255, .6); --kn-glass-shadow: 0 4px 16px rgba(23, 25, 35, .12), 0 1px 2px rgba(23, 25, 35, .08); --kn-hero: #235EA5; --kn-on-hero: #FFFFFF; --kn-on-hero-2: rgba(255, 255, 255, .8); --kn-hero-box: rgba(255, 255, 255, .12); --kn-hero-line: rgba(255, 255, 255, .2);
}
/* dark theme (2026-10-10, mockup-dark.html): no pure black / white, lighter surfaces = higher (cards, then sheets),
   the shadows become a 1px light hairline, the one blue lighter (#235EA5 is 2.6:1 on dark), filled buttons get dark text,
   every text pair WCAG AA. app.js sets data-theme before the first paint (Auto = Telegram's colorScheme) */
:root { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111318; --card: #1A1D24; --elev: #22262F;
  --line: #2A2F3A; --divider: #2A2F3A;
  --text: #E4E7EC; --text-table: #D5DAE1; --text-2: #B0B8C4; --muted: #8C95A3; --faint: #6B7482; --disabled: #4A5160; --icon-2: #8C95A3;
  --gray-50: #20242C; --gray-100: #262B34;
  --accent: #6AA6F2; --on-accent: #0E1B2C; --accent-hover: #24364F; --accent-hover-text: #A9CBF7; --accent-soft: #1C2B40; --nav-active: #1C2B40; --head-pinned: #1F2531;
  --focus: 0 0 0 3px rgba(106, 166, 242, .45);
  --up: #47CD89; --up-soft: #12372A; --up-bg: #102A21;
  --down: #F97066; --down-soft: #45201E; --down-bg: #2E1A1A;
  --warn: #FDB022; --warn-soft: #33270F; --on-count: #2B1700;
  --purple: #B794F4; --purple-soft: #2A2340;
  --dark: #E4E7EC; --on-dark: #1A1D24;
  --logo: #4D9BFF;
  --ok-text: #6CE9A6; --ok-line: #1D5C3C; --wait-text: #FEC84B; --wait-line: #5C4110; --bad-line: #6B2A26; --neutral-text: #B0B8C4;
  --sub-line: #4A3B6B;
  --note-bg: #18202E; --note-line: #26364D; --note-text: #B0B8C4; --note-icon: #6AA6F2;
  --vis-bg: #18202E; --vis-line: #26364D;
  --chip-bg: #262B34;
  --sel-line: #2F4D73;
  --tag-line: #2F4D73; --tag-off-line: #6B2A26; --off-bg: #2E1A1A;
  --bar-dark: #E4E7EC; --bar-text: #1C2B40;
  --bar-s: #4C8DE0; --bar-d: #3A404C;
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, .04);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 1px 3px rgba(0, 0, 0, .5);
  --shadow-md: 0 0 0 1px rgba(255, 255, 255, .07), 0 4px 8px rgba(0, 0, 0, .5);
  --shadow-lg: 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 24px rgba(0, 0, 0, .6);
  --plate-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
  --nav-shadow: none;
  --img-ring: 0 0 0 1px rgba(255, 255, 255, .14);
  --pin-shadow: 6px 0 8px -6px rgba(0, 0, 0, .6);
  --float-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 4px 16px rgba(0, 0, 0, .6);
  --bar-shadow: 0 6px 18px rgba(0, 0, 0, .6);
  --backdrop: rgba(0, 0, 0, .62);
  --c-cpa: #4C8DE0; --c-rs: #9DCCFA; --c-sa: #FAC515; --c-cpc: #2ED3B7; --c-fixed: #B794F4; --c-grid: #232831; --c-axis: #3A404C; --c-bad: #F97066;
  --c-agent: #4C8DE0; --c-prep: #9DCCFA; --c-human: #6B7482;
  /* risk ideas / levels: the blue shades flip, higher = brighter on dark */
  --rk-i1: #8FC0FF; --rk-i2: #6AA6F2; --rk-i3: #4C8DE0; --rk-i4: #3D6FA8; --rk-i5: #2E5079;
  --kn-sea: #10141B; --kn-land: #1F242D; --kn-land-line: #2A303B; --kn-glass: rgba(34, 38, 47, .72); --kn-glass-line: rgba(255, 255, 255, .08); --kn-glass-shadow: 0 4px 16px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .3); --kn-hero: #1C3A63; --kn-on-hero: #E4E7EC; --kn-on-hero-2: rgba(228, 231, 236, .72); --kn-hero-box: rgba(255, 255, 255, .07); --kn-hero-line: rgba(255, 255, 255, .12);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); }
body {
  /* fullscreen launch: Telegram draws the status bar and its Close / ⌄ ••• buttons over the page and tells their height (0 in fullsize) */
  --top-inset: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  font-family: var(--font); color: var(--text);
  font-size: 14px; line-height: 20px; padding-bottom: calc(max(72px, var(--nav-h, 0px) + 8px) + env(safe-area-inset-bottom));
}
/* fullscreen: a still band under the status bar and Telegram's buttons, the page scrolls under it; a line once scrolled */
body::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; height: var(--top-inset); background: var(--bg); z-index: 1200; pointer-events: none;
}
body.scrolled::before { border-bottom: 1px solid var(--divider); }
button { font: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--focus); }
.content { padding: calc(16px + var(--top-inset)) 16px 20px; display: flex; flex-direction: column; gap: 16px; max-width: 640px; margin: 0 auto; }

/* icons drawn from a mask: chevrons, the close cross, the "?" hint */
.go, .chev, .rows .r .chev, .trow .chev, .srow .chev {
  display: inline-block; width: 16px; height: 16px; flex: none; font-size: 0; color: var(--icon-2);
  background: currentColor; -webkit-mask: var(--i-chevron) center / 16px no-repeat; mask: var(--i-chevron) center / 16px no-repeat;
}

/* top: logo + partner picker */
.top { display: flex; align-items: center; gap: 12px; }
.logo { color: var(--logo); flex: none; display: flex; }
.logo svg { width: 32px; height: 25px; display: block; }
/* a partner's square logo (icon from /me), a coloured first letter without one */
.picon { width: 20px; height: 20px; border-radius: 4px; flex: none; display: grid; place-items: center; color: var(--on-color); font-weight: 500; font-size: 12px; overflow: hidden; }
.picon.pic { border-radius: 4px; }
.picon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pslot { width: 20px; height: 20px; flex: none; }
/* the partner selector: a white plate like in the admin's sidebar */
.partner {
  flex: 1; min-width: 0; height: 36px; background: var(--card); border: 0; border-radius: var(--radius);
  box-shadow: var(--plate-shadow); padding: 8px 12px; display: flex; align-items: center; gap: 8px;
  font-weight: 500; text-align: left; color: var(--text);
}
.partner .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partner .chev { margin-left: auto; -webkit-mask-image: var(--i-unfold); mask-image: var(--i-unfold); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft) !important; color: var(--accent); flex: none;
  display: grid; place-items: center; font-weight: 500; font-size: 12.8px; text-transform: uppercase;
}

.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* One title row on every screen (§21.4, 2026-10-24: .ad-top, .cx-title, .df-h folded in): h1 alone, or h1 + .sub in
   .tr-main; icons 40×40 on the right stay at the top when a long name takes two lines */
.title-row > .tr-main { flex: 1; min-width: 0; }
.title-row:has(> .tr-main) { align-items: flex-start; }
.title-row h1 { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.title-row .tr-main .sub { margin-top: 2px; }
h1 { font-size: 30px; line-height: 38px; font-weight: 500; margin: 0; color: var(--text); }

/* period chips = the admin's segmented group: selected on a light blue plate, the rest transparent */
.chips { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 8px 12px; border-radius: var(--radius); font-size: 14px; line-height: 20px; font-weight: 500;
  background: transparent; border: 0; color: var(--text-2);
}
.chip.on { background: var(--accent-soft); color: var(--accent); box-shadow: var(--shadow-sm); }
.range { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: -8px; }

/* cards: white, radius 6, shadow base, no border */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 0; position: relative; }

/* dashboard: Total Reward (the KPI card), Traffic tiles, Money rows; any number opens it by day */
.range span { display: block; margin-top: 2px; color: var(--muted); }
.hero { padding: 16px; color: var(--text); cursor: pointer; }
.hero .row1 { font-size: 16px; line-height: 24px; display: flex; align-items: center; }
.hero .see { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--accent); }
.hero .value { font-size: 30px; line-height: 38px; font-weight: 600; margin: 6px 0 14px; word-break: break-all; color: var(--text); font-variant-numeric: tabular-nums; }
.hero .mix { display: flex; height: 8px; border-radius: var(--radius); overflow: hidden; background: var(--gray-100); gap: 2px; }
.hero .mix div { height: 100%; min-width: 2px; }
.hero .legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--text-2); }
.hero .legend span { display: flex; align-items: center; gap: 6px; white-space: nowrap; min-width: 0; }
.hero .legend i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.hero .legend .minus i { border: 1.5px solid var(--faint); }
.hero .legend b { margin-left: auto; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
/* the "?" hint next to a metric name */
.info {
  display: inline-block; width: 16px; height: 16px; border: 0; padding: 0; margin-left: 6px; flex: none; font-size: 0;
  color: var(--faint); background: currentColor; -webkit-mask: var(--i-help) center / 16px no-repeat; mask: var(--i-help) center / 16px no-repeat;
}
.tip {
  position: absolute; left: 12px; right: 12px; z-index: 3; background: var(--dark); color: var(--on-dark); border-radius: var(--radius);
  padding: 8px 12px; font-size: 12px; line-height: 18px; box-shadow: var(--shadow-lg); cursor: default;
}
.tip b { display: block; margin-bottom: 2px; font-weight: 500; }
.sec-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 16px; line-height: 24px; font-weight: 500; }
.sec-head .ico { width: 28px; height: 28px; border-radius: var(--radius); display: grid; place-items: center; font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.tile { background: var(--card); padding: 12px 16px; border: 0; text-align: left; color: var(--text); font: inherit; min-width: 0; }
.tile:active, .rows .r:active { background: var(--gray-50); }
.tile .l { font-size: 14px; color: var(--text-2); }
.tile .v { font-size: 24px; line-height: 32px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.tile.wide { grid-column: span 2; display: flex; justify-content: space-between; align-items: center; }
.tile.wide .v { margin: 0; }
.rows .r {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider);
  font: inherit; font-size: 14px; width: 100%; background: none; text-align: left; color: var(--text-table);
}
.rows .r .n { flex: 1; color: var(--text-2); display: flex; align-items: center; min-width: 0; }
.rows .r .v { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows .r.key .v { font-weight: 600; color: var(--text); }
.rows .r.key .n { font-weight: 500; color: var(--text); }
.rows.extra .r { background: var(--gray-50); }
.hero-line {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2);
}
.hero-line + .hero-line { margin-top: 0; padding-top: 8px; border-top: 0; }
.hero-line span { display: flex; align-items: center; }
.hero-line b { font-weight: 600; white-space: nowrap; color: var(--text); font-variant-numeric: tabular-nums; }
.sec-sub { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); }

/* dashboard tops: countries and affiliates */
.chips.mini { margin: 0; padding: 0 16px 12px; }
.chips.mini .chip { height: 32px; padding: 6px 10px; font-size: 13px; }
.list .row.cx-capdays > .chips.mini { padding: 0; flex: none; flex-wrap: nowrap; } /* desk Settings: No launch after 7 / 5 days */
.list .row.cx-capdays[hidden] { display: none; }
.cx-capdays > div:nth-child(2) { flex: 1; min-width: 0; }
.trows { border-top: 1px solid var(--divider); }
.trow {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider);
  width: 100%; background: none; font: inherit; font-size: 14px; color: var(--text-table); text-align: left;
}
.trow:first-child { border-top: 0; }
button.trow:active { background: var(--gray-50); }
.trow .rank { width: 18px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tname .flag { margin-right: 8px; }
.tname img.flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; vertical-align: -2px; box-shadow: var(--img-ring); }
.tname .aid { color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.tbar { display: block; height: 4px; background: var(--accent-soft); border-radius: 2px; margin-top: 6px; }
.tbar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.tval { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.big { padding: 16px 16px 0; font-size: 24px; line-height: 32px; font-weight: 600; }
.cmp { padding: 2px 16px 0; font-size: 13px; color: var(--muted); }
.chart { padding: 12px 16px 8px; }
.chart svg { width: 100%; height: 160px; display: block; }
/* table card */
.card-title { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 8px; gap: 8px; }
.card-title b { font-size: 16px; font-weight: 500; }
/* a segmented group: buttons 4px apart, no frame */
.seg { display: flex; gap: 4px; }
.seg button { font-size: 14px; line-height: 20px; height: 36px; padding: 8px 12px; border-radius: var(--radius); color: var(--text-2); border: 0; background: none; font-weight: 500; white-space: nowrap; }
.seg button.on { background: var(--accent-soft); color: var(--accent); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--text-table); }
/* column headers: Oswald 500 12px uppercase, as in the admin tables */
th {
  text-align: left; font-family: var(--font-head); font-size: 12px; line-height: 16px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--text-table); font-weight: 500; background: var(--card); padding: 13px 12px; border-bottom: 1px solid var(--divider);
}
th.num, td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td { padding: 12px; border-top: 1px solid var(--divider); }
.neg { color: var(--down); }
.empty { text-align: center; color: var(--muted); padding: 24px 16px; font-size: 14px; }
.load-err { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-2); }
.load-err > .mi { font-size: 24px; color: var(--c-bad); }
.sheet-list .load-err button { width: auto; min-height: 40px; padding: 6px 12px; border: 0; justify-content: center; gap: 0; color: var(--accent); background: var(--card); }

/* shortcuts */
.list .row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--divider); font-weight: 500; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; color: var(--text); }
.list .row:first-child { border-top: 0; }
.list .ico { width: 36px; height: 36px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.list .ico svg { width: 20px; height: 20px; }
.list .row small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; line-height: 18px; margin-top: 2px; }
.list .row .go { margin-left: auto; }
.list .row > div:not(.ico) { flex: 1; min-width: 0; }

/* bottom navigation: the active item gets the admin's active menu plate behind its icon */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--divider);
  display: grid; padding-bottom: env(safe-area-inset-bottom); z-index: 1100; }
.nav button { height: 60px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--text-2); }
.nav button.on { color: var(--accent); }
.nav svg { width: 20px; height: 20px; padding: 4px 16px; box-sizing: content-box; border-radius: var(--radius); color: var(--text-2); }
.nav button.on svg { background: var(--nav-active); color: var(--accent); box-shadow: var(--nav-shadow); }

/* lists and cards (campaigns, affiliates) */
.search {
  width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: var(--radius); font: inherit;
  background: var(--card); box-shadow: var(--shadow); outline: none; color: var(--text);
}
.search::placeholder, .search-in::placeholder, input::placeholder, textarea::placeholder { color: var(--muted); }
.search:focus { box-shadow: var(--shadow), var(--focus); }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* status badges: radius 6, soft background */
.status { font-size: 12px; line-height: 16px; font-weight: 500; border-radius: var(--radius); white-space: nowrap; flex: none; }
.back { color: var(--accent); font-size: 14px; font-weight: 500; border: 0; background: none; padding: 2px 0; text-align: left; align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; }
.back::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--i-chevron) center / 16px no-repeat; mask: var(--i-chevron) center / 16px no-repeat; transform: scaleX(-1); }  /* an icon, not a «‹» glyph (§19.4) */
body.tg-back .back { display: none; }  /* Telegram's own Back does the same (app.js start) */
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); text-align: center; color: var(--muted); font-size: 12px; }
.counters > div, .counters > .cnt { padding: 12px 6px; }
.counters > * + * { border-left: 1px solid var(--line); }
/* a counter that jumps to its block: a plain button, the number in the link blue */
.counters .cnt { border: 0; border-radius: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); }
.counters .cnt b { color: var(--accent); }
.counters .cnt:active { background: var(--accent-soft); }
.card.flash { box-shadow: var(--shadow), 0 0 0 2px var(--accent); }
.counters b { display: block; font-size: 18px; line-height: 24px; font-weight: 600; color: var(--text); }
.kv .row { display: flex; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--divider); font-size: 14px; color: var(--text-table); }
.kv .row:first-child { border-top: 0; }
.kv .k { color: var(--muted); width: 96px; flex: none; }
.kv .v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kv .v.link { color: var(--accent); font-weight: 500; }

/* bottom sheet (partner, filters, row card) */
.sheet-back { position: fixed; inset: 0; background: var(--backdrop); z-index: 1300; display: none; }
.sheet-back.open { display: block; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; max-height: min(80vh, calc(100vh - var(--top-inset) - 8px)); --card: var(--elev); background: var(--card); z-index: 1400;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; display: flex; flex-direction: column;
  visibility: hidden; transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); box-shadow: var(--shadow-lg);
}
.sheet.open { transform: none; visibility: visible; }
.sheet-head { padding: 12px 16px; border-bottom: 1px solid var(--divider); display: flex; align-items: center; justify-content: space-between; }
.sheet-head b { font-weight: 500; }
.sheet-head b:focus { outline: none; }
/* ‹ one sheet back; shown in Telegram too (owner 2026-11-04: Telegram's Back at the top was not found, «нет пути назад») */
.sheet-up { width: 40px; height: 40px; margin: -4px 4px -4px -12px; padding: 0; justify-content: center; align-self: center; flex: none; }
.sheet-up[hidden] { display: none; }
body.tg-back .sheet-up:not([hidden]) { display: inline-flex; }
.sheet-up + b { flex: 1; min-width: 0; }
.sheet-x {
  border: 0; width: 40px; height: 40px; margin: -4px -8px -4px 0; border-radius: var(--radius); flex: none; font-size: 0; color: var(--text-2);
  background: currentColor; -webkit-mask: var(--i-close) center / 20px no-repeat; mask: var(--i-close) center / 20px no-repeat;
}
.sheet-body { overflow-y: auto; display: flex; flex-direction: column; min-height: 0; }
.sheet-tools { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--divider); }
/* form fields: 1px #E2E8F0, radius 6, 40px, focus ring */
.sheet input[type=search], .sheet input[type=text], .sheet input[type=date], .sheet input[type=month], .sheet input[type=number], .login-field input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; background: var(--card); outline: none; color: var(--text);
}
.sheet input:focus, .login-field input:focus { border-color: var(--accent); box-shadow: var(--focus); }
.sheet-tools textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; background: var(--card); color: var(--text); resize: vertical;
}
.sheet-tools textarea:focus { border-color: var(--accent); }
.sheet-list { overflow-y: auto; }
.sheet-list button { width: 100%; text-align: left; min-height: 48px; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); background: none; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-list button:first-child { border-top: 0; }
.sheet-list button.on { color: var(--accent); font-weight: 500; background: var(--accent-soft); }
.sheet-list small { color: var(--muted); font-weight: 400; }
.sheet-list .check { width: 20px; height: 20px; border-radius: var(--radius); border: 1px solid var(--disabled); background: var(--card); flex: none; display: grid; place-items: center; color: var(--on-accent); }
.sheet-list .on .check { background: var(--accent); border-color: var(--accent); }
.sheet-list .check.none { border-color: transparent; background: none; }
.sheet-list .check { font-size: 0; position: relative; }  /* the tick is an icon, not the «✓» glyph */
.sheet-list .on .check::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; background: var(--on-accent); -webkit-mask: var(--i-check) center / 14px no-repeat; mask: var(--i-check) center / 14px no-repeat; }
#fin-months .chip .mi { margin: 0; font-size: 20px; vertical-align: -5px; }
.sheet-list .item { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: auto; border: 0; padding: 0; color: inherit; min-height: 0; background: none; }
.sheet-foot { padding: 12px 16px; border-top: 1px solid var(--divider); display: flex; gap: 8px; }
.sheet-foot button { flex: 1; }
/* secondary button: white, blue text, shadow base */
.btn-light { background: var(--card); color: var(--accent); border: 0; box-shadow: var(--shadow); border-radius: var(--radius); min-height: 40px; padding: 8px 16px; font-weight: 500; }
.btn-light:active { background: var(--accent-hover); color: var(--accent-hover-text); }
.btn-light:disabled, .btn-primary:disabled, button:disabled { opacity: .4; cursor: not-allowed; }
.danger-link { color: var(--down) !important; }

/* report builder */
.title-row .btn { border: 0; background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); padding: 6px 12px; font-size: 14px; font-weight: 500; color: var(--accent); white-space: nowrap; }
.section { padding: 12px 16px; }
.section + .section { border-top: 1px solid var(--divider); }
.label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; }
.label span { font-weight: 400; }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
.pill {
  font-size: 14px; line-height: 20px; min-height: 32px; padding: 6px 12px; border-radius: var(--radius); border: 0;
  background: var(--gray-100); color: var(--text-2); font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.pill.on { background: var(--accent-soft); color: var(--accent); box-shadow: var(--shadow-sm); }
.pill.add { color: var(--accent); background: none; box-shadow: inset 0 0 0 1px var(--disabled); }
.pill .x { color: var(--faint); padding-left: 2px; }
.sub { font-size: 13px; line-height: 18px; color: var(--muted); }
.run-bar {
  position: fixed; left: 0; right: 0; bottom: var(--nav-h); padding: 12px 16px;  /* over the bar, whatever its height */
  background: var(--bg); border-top: 1px solid var(--divider); z-index: 1000;
}
/* primary button: #235EA5, white 500, shadow sm, 40px */
.run-bar button { width: 100%; max-width: 608px; display: block; margin: 0 auto; height: 40px; border-radius: var(--radius); border: 0; background: var(--accent); color: var(--on-accent); font-weight: 500; font-size: 16px; box-shadow: var(--shadow-sm); }
.run-bar button:disabled { opacity: .4; }
body.has-run { padding-bottom: calc(var(--nav-h) + 76px); }
/* report v2: folded settings, compact totals, rows as a table or cards */
.summary { padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.summary .txt { flex: 1; min-width: 0; font-size: 13px; line-height: 18px; }
.summary .txt b { display: block; font-size: 14px; line-height: 20px; font-weight: 500; }
.summary .txt span { color: var(--muted); }
.edit { font: inherit; font-size: 14px; font-weight: 500; color: var(--accent); background: var(--accent-soft); height: 32px; padding: 6px 12px; border-radius: var(--radius); border: 0; white-space: nowrap; box-shadow: var(--shadow-sm); }
.fold-row { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
/* report settings: one line per setting */
.srow { width: 100%; min-height: 48px; padding-top: 8px; padding-bottom: 8px; border: 0; background: none; font: inherit; color: var(--text); text-align: left; }
button.srow { cursor: pointer; }
.section + .srow { border-top: 1px solid var(--divider); }
button.srow:active { background: var(--gray-50); }
.slabel { font-size: 14px; font-weight: 500; flex: none; }
.srow .seg { margin-left: auto; }
.sval { flex: 1; min-width: 0; text-align: right; color: var(--accent); font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sval.none { color: var(--muted); font-weight: 400; }
.sec-head .fold { margin: -4px -8px -4px 8px; border: 0; background: none; color: var(--text-2); width: 40px; height: 40px; border-radius: var(--radius); font-size: 12px; }
/* underlined tabs: the selected one blue with a 2px line, the rest grey */
.tabs { display: flex; gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--divider); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 10px 0; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--accent); border-color: var(--accent); }
.sec-head > .sub { margin-left: auto; font-weight: 400; }
.tgrid { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.tgrid .cell { background: var(--card); padding: 8px 12px; min-width: 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.tgrid .cell:nth-child(3n) { border-right: 0; }
.tgrid .cell .l { display: block; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgrid .cell .v { display: block; font-size: 16px; line-height: 24px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tgrid .cell.wide { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; background: var(--head-pinned); border-right: 0; }
.tgrid .cell.wide .l { font-size: 14px; color: var(--text); font-weight: 500; }
.strip { display: flex; gap: 4px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip span { flex: none; background: var(--gray-100); border-radius: var(--radius); padding: 4px 8px; font-size: 13px; white-space: nowrap; color: var(--text-table); }
.strip i { font-style: normal; color: var(--muted); margin-right: 6px; }
.toolbar { display: flex; gap: 8px; padding: 0 16px 12px; align-items: center; }
.search-in { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; font: inherit; background: var(--card); outline: none; color: var(--text); }
.search-in:focus { border-color: var(--accent); box-shadow: var(--focus); }
#rows-body.busy { opacity: .4; pointer-events: none; }
.tablewrap { overflow-x: auto; border-top: 1px solid var(--divider); -webkit-overflow-scrolling: touch; }
.rtable { border-collapse: separate; border-spacing: 0; font-size: 14px; width: max-content; min-width: 100%; color: var(--text-table); }
.rtable th, .rtable td { padding: 0 12px; height: 48px; white-space: nowrap; text-align: right; border-bottom: 1px solid var(--divider); border-top: 0; font-variant-numeric: tabular-nums; }
.rtable th { height: 46px; padding: 13px 12px; font-family: var(--font-head); font-size: 12px; line-height: 16px; letter-spacing: .6px; text-transform: uppercase; color: var(--text-table); background: var(--card); font-weight: 500; cursor: pointer; }
.rtable th.sorted { color: var(--accent); }
.rtable th:first-child, .rtable td:first-child {
  position: sticky; left: 0; z-index: 1; text-align: left; background: var(--card); min-width: 128px; max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; box-shadow: 1px 0 0 var(--divider), var(--pin-shadow);
}
.rtable th:first-child { background: var(--head-pinned); cursor: default; }
.rtable td:first-child { color: var(--accent); font-weight: 500; }
.rtable td:first-child small { display: block; color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 400; }
.rtable tr.tot td { font-weight: 600; background: var(--head-pinned); color: var(--text); }
.rtable tbody tr[data-row] { cursor: pointer; }
.rtable tbody tr[data-row]:active td { background: var(--gray-50); }
.hint-line { font-size: 13px; line-height: 18px; color: var(--muted); padding: 8px 16px 12px; }
.sortline { display: flex; justify-content: space-between; gap: 8px; padding: 0 16px 8px; }
.sortline button { border: 0; background: none; padding: 12px 0; margin: -12px 0; font: inherit; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }  /* ~44px to tap, same look */
.sortline b { color: var(--accent); font-weight: 500; }
.item { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--divider); background: none; padding: 12px 16px; font: inherit; color: var(--text-table); }
.item:active { background: var(--gray-50); }
.item .h { display: flex; align-items: baseline; gap: 8px; }
.item .rank { color: var(--muted); font-size: 12px; width: 18px; flex: none; }
.item .name { flex: 1; min-width: 0; font-weight: 500; font-size: 14px; color: var(--accent); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.item .main { font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.item .id { display: block; color: var(--muted); font-size: 13px; line-height: 18px; margin: 2px 0 0 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0 26px; overflow: visible; padding: 0; }
.item .chips span { font-size: 12px; background: var(--gray-100); border-radius: var(--radius); padding: 2px 8px; color: var(--text-table); font-variant-numeric: tabular-nums; }
.item .chips i { font-style: normal; color: var(--muted); margin-right: 4px; }
.item .chips b { font-weight: 500; }
.item .bar { display: block; height: 4px; background: var(--accent-soft); border-radius: 2px; margin: 8px 0 0 26px; }
.item .bar span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* grouping: values the same in every row, the row title picker, grouping columns */
.const-line { display: flex; gap: 4px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; }
.const-line::-webkit-scrollbar { display: none; }
.const-line span { flex: none; font-size: 13px; background: var(--head-pinned); border-radius: var(--radius); padding: 4px 8px; white-space: nowrap; color: var(--text-table); }
.const-line i { font-style: normal; color: var(--muted); margin-right: 6px; }
.title-pick { display: flex; justify-content: space-between; align-items: center; padding: 0 16px 8px; font-size: 13px; color: var(--muted); }
.title-pick button { border: 0; background: none; padding: 0; font: inherit; color: var(--muted); }
.title-pick b { color: var(--accent); font-weight: 500; }
.rtable th.dim, .rtable td.dim { text-align: left; max-width: 170px; overflow: hidden; text-overflow: ellipsis; color: var(--text-table); }
.rtable th.dim { cursor: default; }
/* row card: one block per metric group */
.sheet-head b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-right: 12px; }
.vblocks { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.vblock { background: var(--card); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.vhead { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--divider); }
.vhead .ico { width: 24px; height: 24px; border-radius: var(--radius); display: grid; place-items: center; font-size: 13px; }
.vblock .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--divider); font-size: 14px; color: var(--text-table); }
.vblock .row:nth-child(2) { border-top: 0; }
.vblock .row span:first-child { color: var(--text-2); }
.vblock .row span:last-child { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.vblock .row .dimv { white-space: normal !important; text-align: right; font-weight: 500 !important; overflow-wrap: anywhere; }
.vblock .row.total { background: var(--head-pinned); font-weight: 600; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); color: var(--muted); font-size: 13px; }
.totals div { padding: 12px 8px; text-align: center; min-width: 0; }
.totals div + div { border-left: 1px solid var(--line); }
.totals b { display: block; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stale { opacity: .55; }
/* a warning note: orange-50 plate, orange-600 text */
.hint { background: var(--warn-soft); color: var(--wait-text); border: 0; border-radius: var(--radius); padding: 10px 12px; font-size: 14px; }
.rank { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 22px; display: inline-block; }
.who { font-weight: 500; word-break: break-word; color: var(--accent); }
.who small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; line-height: 18px; }
tr.tap { cursor: pointer; }
tr.tap:active td { background: var(--gray-50); }
.more { display: block; width: 100%; text-align: center; color: var(--accent); font-size: 14px; font-weight: 500; padding: 12px; border: 0; border-top: 1px solid var(--divider); background: none; }
.sort-btn { border: 0; background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); height: 32px; padding: 6px 12px; font-size: 14px; color: var(--accent); font-weight: 500; }
.kv-list .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--divider); font-size: 14px; color: var(--text-table); }
.kv-list .row span:last-child { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.kv-list .group { padding: 16px 16px 6px; font-family: var(--font-head); font-size: 13px; line-height: 18px; font-weight: 500; letter-spacing: .6px; text-transform: uppercase; color: var(--text-table); }
.kv-list .group + .row { border-top: 0; }
.kv-list .total { font-weight: 600; }
.dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dates label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }

/* states (no animations, only the spinner that says "loading") */
.skeleton { background: var(--gray-100); border-radius: var(--radius); }
.sk-rows { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; }  /* skelRows(): a list still loading (§21.4) */
.sk-rows .skeleton { height: 44px; }
.more .rk-spin { display: inline-block; vertical-align: middle; }
.notice { padding: 28px 20px; text-align: center; }
.notice b { display: block; font-size: 18px; line-height: 28px; font-weight: 500; margin-bottom: 6px; }
.notice p { color: var(--muted); margin: 0 0 16px; }
/* Log in inside the app (2026-11-18, mockup-app-login.html): the field = the .sheet input rule above */
.login-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.login-foot { display: contents; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field span { font-size: 13px; line-height: 18px; color: var(--muted); }
.login-msg { display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); overflow-wrap: anywhere; }
.login-msg .mi { font-size: 20px; color: var(--icon-2); margin: 0; }
.login-host { font-size: 16px; line-height: 24px; font-weight: 500; overflow-wrap: anywhere; }
.btn-primary .rk-spin { display: inline-block; vertical-align: -3px; margin-right: 8px; }
.btn-primary { background: var(--accent); color: var(--on-accent); border: 0; border-radius: var(--radius); min-height: 40px; padding: 8px 16px; font-weight: 500; box-shadow: var(--shadow-sm); }
.btn-primary:active { background: var(--accent-hover-text); }
.toast {
  position: fixed; left: 50%; bottom: calc(max(80px, var(--nav-h, 0px) + 8px) + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--dark); color: var(--on-dark); padding: 8px 16px; border-radius: var(--radius); font-size: 14px; z-index: 1700;
  opacity: 0; pointer-events: none; box-shadow: var(--shadow-lg);
  width: max-content; max-width: calc(100vw - 32px); text-align: center; overflow-wrap: anywhere;
}
.toast.show { opacity: 1; }
/* the bot is updating / a new version is ready: a plate on top of everything */
#top-bar {
  position: fixed; top: calc(8px + max(env(safe-area-inset-top), var(--top-inset))); left: 50%; transform: translateX(-50%); z-index: 1700;
  background: var(--dark); color: var(--on-dark); padding: 8px 16px; border-radius: var(--radius); font-size: 14px; white-space: nowrap;
  display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-lg); cursor: pointer;
}
#top-bar b { color: var(--accent-soft); font-weight: 500; }
#top-bar .spin { width: 12px; height: 12px; border: 2px solid color-mix(in srgb, var(--on-dark) 36%, transparent); border-top-color: var(--on-dark); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* phones zoom the page into a field with a font under 16px: every field is 16px */
input, textarea, select, .search, .search-in, .sheet input[type=search], .sheet input[type=text], .sheet input[type=date], .login-field input { font-size: 16px; }
.sheet input[type=month], .sheet input[type=number] { font-size: 16px; }
.list-rest { display: flex; flex-direction: column; gap: 16px; }

/* ---------- avatars and pictures: initials in blue on a light blue circle, as in the admin tables ---------- */
.avatar-btn { border: 0; background: none; padding: 0; flex: none; border-radius: 50%; }
.avatar, .av { overflow: hidden; }
.avatar img, .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av > img { position: absolute; inset: 0; }  /* fills the circle whatever the picture's shape */
.av { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 500; font-size: 12.8px; text-transform: uppercase; flex: none; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }
.av.big { width: 56px; height: 56px; font-size: 20px; }
.av.huge { width: 84px; height: 84px; font-size: 28px; border: 4px solid var(--card); box-shadow: var(--shadow-md); }

/* ---------- lists: campaigns, affiliates ---------- */
.searchwrap { position: relative; }
.searchwrap svg { position: absolute; left: 10px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.searchwrap .search { padding-left: 38px; }
.listbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -4px; }
.listbar .sub { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.listbar .linkbtn { padding: 12px 0 12px 8px; margin: -12px 0; }  /* ~44px to tap, same look */
.listbar .sub { flex: none; }
.listbar .sortline-btn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
/* one toolbar for every list (2026-10-07, mockup-design-pass.html): search + Filters on one row */
.tools { display: flex; gap: 8px; }
.tools .searchwrap { flex: 1; min-width: 0; }
.tools .search { height: 40px; }
.fbtn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 0; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow); color: var(--accent); font-weight: 500; }
.fbtn .mi { font-size: 20px; margin: 0; }
.fbtn .n { background: var(--accent); color: var(--on-accent); border-radius: 10px; font-size: 11px; line-height: 16px; padding: 0 6px; }
.applied { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.applied .chip { height: 32px; padding: 6px 10px; font-size: 13px; background: var(--accent-soft); color: var(--accent); box-shadow: none; }
/* a long value list never runs past the card (owner's screenshot 2026-11-04): one line, cut with … */
.applied .chip { max-width: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icotog { display: inline-flex; background: var(--card); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); border-radius: var(--radius); overflow: hidden; }
.icotog button { border: 0; background: none; width: 38px; height: 34px; display: grid; place-items: center; color: var(--text-2); }
.icotog button.on { background: var(--accent-soft); color: var(--accent); }
.icotog .mi { font-size: 18px; margin: 0; }
.more-chip { color: var(--accent) !important; }
.lrow {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; width: 100%; border: 0; border-top: 1px solid var(--divider);
  background: none; text-align: left; color: var(--text-table); font: inherit;
}
.lrow:first-child { border-top: 0; }
.lrow-w { display: flex; align-items: center; border-top: 1px solid var(--divider); }
.lrow-w:first-child { border-top: 0; }
.lrow-w .lrow { border-top: 0; flex: 1; min-width: 0; padding-right: 4px; }
.lrow-w .row-go { padding-right: 16px; color: var(--faint); }
/* the list template (mockup-media-items-v2.html, 2026-10-11): one-line title, the key fact line, one meta line,
   one trailing action; Media items and Campaigns share it */
.title-row .title-seg { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px; }
.title-row .btn { height: 40px; }
.title-row.end { justify-content: flex-end; }
.title-row > .chips { flex: 1; min-width: 0; margin: 0 0 0 -16px; padding-left: 16px; }
.title-row .btn.ico { width: 40px; padding: 0; display: grid; place-items: center; flex: none; }
.title-row .btn.ico .mi { margin: 0; font-size: 22px; }
.title-row .title-seg { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.title-row .title-seg button { padding: 8px 10px; }
.lrow-w.one .ltitle { -webkit-line-clamp: 1; }
.lrow-w.on { background: var(--accent-soft); }
.lrow-w .lrow .fbox { width: 20px; height: 20px; margin: 8px; }
.lhead { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lhead .ltitle { flex: 1; min-width: 0; }
.lhead .status { flex: none; }
.lhead .lid { flex: none; font-size: 13px; line-height: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lmeta.lsplit { display: flex; gap: 4px; min-width: 0; }
.lmeta.lsplit .clip { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lmeta.lsplit .sep { flex: none; }
.lmeta.lsplit .keep { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.lhead .tgeo { flex: none; display: inline-flex; align-items: center; font-size: 12px; line-height: 16px; color: var(--muted); }
.lhead .tgeo img.flag, .lhead .tgeo .flag { width: 16px; height: 12px; border-radius: 2px; margin-right: 4px; object-fit: cover; font-size: 14px; }
.ldeal { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; line-height: 18px; color: var(--text-2); white-space: nowrap; }
.ldeal .clip { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dp { flex: none; font-size: 12px; line-height: 16px; font-weight: 600; padding: 0 5px; border-radius: 4px; letter-spacing: .2px; }
.dp.cus { color: var(--accent); box-shadow: inset 0 0 0 1px var(--tag-line); }
.dp.inh { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.lrow-w .ibtn { flex: none; align-self: stretch; width: 52px; border: 0; background: none; color: var(--accent); display: grid; place-items: center; padding: 0 8px 0 0; }
.lrow-w .ibtn .mi { font-size: 20px; margin: 0; }
.lrow-w .ibtn.sm { width: 40px; padding: 0; }
.lrow-w .ibtn.sm:last-child { width: 44px; padding-right: 4px; }
.lrow-w .ibtn.dim { color: var(--icon-2); }
.sheet-tools .qa.am-qa { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-tools .qa.am-qa button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; }
.am-list .item { display: flex; align-items: center; gap: 12px; }
.am-list .item .mi { color: var(--icon-2); margin: 0; font-size: 20px; }
.chip.label { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; pointer-events: none; }
.chip.label .mi { font-size: 16px; margin: 0; }
.chip .cnt-b { margin-left: 6px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.listbar .lb-tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; flex: 1; }
.listbar .lb-tabs button { padding: 8px 10px; }
.listbar .lb-tabs .cnt { margin-left: 4px; background: var(--count); color: var(--on-count); border-radius: var(--radius); font-size: 11px; padding: 0 5px; line-height: 16px; display: inline-block; font-weight: 600; }
.lrow-w .ibtn:active { background: var(--gray-50); }
.ghead { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 16px; background: var(--gray-50); border-top: 1px solid var(--divider); min-height: 40px; }
.ghead:first-child { border-top: 0; }
.ghead .mi { color: var(--icon-2); font-size: 18px; margin: 0; }
.ghead .t { flex: 1; min-width: 0; font-size: 13px; line-height: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ghead .t b { color: var(--text-2); font-weight: 500; }
.ghead .linkbtn { font-size: 13px; }
.ghead + .lrow-w { border-top: 1px solid var(--divider); }
.suggest { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 8px 6px 12px; }
.suggest > .mi { color: var(--icon-2); margin: 0; }
.suggest .t { flex: 1; min-width: 0; font-size: 13px; line-height: 18px; }
.suggest .t b { display: block; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest .t span { color: var(--muted); font-size: 13px; }
.listbar .lb-right { gap: 4px; }
.icotog1 { border: 0; background: none; width: 36px; height: 36px; border-radius: var(--radius); color: var(--icon-2); display: grid; place-items: center; padding: 0; }
.icotog1 .mi { font-size: 20px; margin: 0; }
.icotog1.on { background: var(--accent-soft); color: var(--accent); }
.lrow:active, .irow:active { background: var(--gray-50); }
.lrow .go, .irow .go { margin-left: auto; }
.blogo { width: 36px; height: 36px; border-radius: var(--radius); display: grid; place-items: center; color: var(--on-color); font-weight: 500; font-size: 15px; flex: none; }
.blogo.big { width: 56px; height: 56px; font-size: 22px; }
.lmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* the entity name = a blue link, the caption under it grey 12px */
.ltitle { font-weight: 500; font-size: 14px; color: var(--accent); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lmeta { font-size: 13px; line-height: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lmeta img.flag, .pbadges img.flag, .spill img.flag, .mi-row img.flag, .kv img.flag { width: 16px; height: 12px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; object-fit: cover; }
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 6px; vertical-align: 1px; background: var(--disabled); flex: none; }
.sdot.ok { background: var(--up); }
.sdot.wait { background: var(--count); }
.sdot.bad { background: var(--down); }
.sscroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.sscroll::-webkit-scrollbar { display: none; }

/* ---------- cards: campaign, affiliate ---------- */
.phero { overflow: hidden; }
.phead { display: flex; gap: 12px; align-items: center; padding: 16px 16px 12px; }
.pinfo { flex: 1; min-width: 0; }
.pinfo h2 { margin: 0 0 2px; font-size: 20px; line-height: 28px; font-weight: 500; overflow-wrap: anywhere; }
.idcopy { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); font-weight: 500; }
.pbadges { padding: 0 16px 12px; }
.linkbox { display: flex; align-items: center; gap: 8px; margin: 0 16px 12px; background: var(--gray-50); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--radius); padding: 4px 4px 4px 12px; }
.sheet-tools .linkbox { margin: 0; }
.lurl { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-light.sm { padding: 6px 12px; font-size: 14px; flex: none; }
.phero .counters { border-top: 1px solid var(--line); }
.actions-card { padding: 12px; }
.agrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
/* the row is always full: 1-4 actions in one row, 5-6 in two even rows of 3 */
.agrid.n2 { grid-template-columns: repeat(2, 1fr); }
.agrid.n4 { grid-template-columns: repeat(4, 1fr); }
.agrid.n4 .act { padding: 10px 2px 8px; }
.act.danger { color: var(--down); background: var(--down-bg); }
/* the deal: rules as rows, the inherited plan in one line, the history behind a button (a timeline sheet) */
.rule-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--divider); }
.rule-row .kind { flex: none; min-width: 40px; text-align: center; font-size: 11px; font-weight: 600; line-height: 20px; padding: 0 4px; border-radius: 4px; color: var(--accent); background: var(--accent-soft); }
.rule-row .grow { flex: 1; min-width: 0; }
.rule-row .grow b { display: block; font-weight: 500; overflow-wrap: anywhere; }
.rule-row .grow small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; }
.rule-row .val { font-weight: 600; white-space: nowrap; }
.inh-line { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--divider); color: var(--text-2); font-size: 13px; }
.inh-line .mi { font-size: 18px; margin: 0; color: var(--icon-2); }
.inh-line b { font-weight: 500; color: var(--text); }
.tl { padding: 4px 16px 8px; }
.tl-ev { display: grid; grid-template-columns: 18px 1fr auto; gap: 2px 10px; padding: 10px 0; position: relative; }
.tl-ev::before { content: ""; position: absolute; left: 8px; top: 26px; bottom: -10px; width: 2px; background: var(--divider); }
.tl-ev:last-child::before { display: none; }
.tl-ev .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--faint); background: var(--card); margin-top: 1px; }
.tl-ev.now .dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }
.tl-ev b { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.tl-ev .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tl-ev small { grid-column: 2 / -1; color: var(--muted); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
/* action tiles = light (secondary) buttons */
.act {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: var(--radius);
  border: 0; background: var(--accent-soft); font: inherit; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--accent);
}
.act:active { background: var(--accent-hover); color: var(--accent-hover-text); }
.agrid-note { padding: 8px 4px 0; text-align: center; font-size: 13px; }
.sheet-foot.agrid { display: grid; }
.kstats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.kstats div { padding: 12px 8px; text-align: center; min-width: 0; }
.kstats div + div { border-left: 1px solid var(--line); }
.kstats span { font-size: 12px; color: var(--muted); }
.kstats b { display: block; font-size: 18px; line-height: 24px; font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kstats .hl b { color: var(--accent); }
.kv .row { align-items: center; }
.cp { border: 0; background: none; color: var(--accent); font-size: 14px; padding: 0 2px; flex: none; }
.wrapv { white-space: normal !important; text-align: right; overflow-wrap: anywhere; }
.ilist { border-top: 1px solid var(--divider); }
.irow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; color: var(--text-table); text-align: left; }
.irow:first-child { border-top: 0; }
.irow .sdot { margin: 0; }
.irow .ltitle { font-size: 14px; -webkit-line-clamp: 1; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 16px 16px; align-items: center; }
.tag { border: 0; background: var(--gray-100); border-radius: var(--radius); padding: 4px 10px; font: inherit; font-size: 12px; line-height: 16px; color: var(--text-2); }
.contacts { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; }

/* ---------- More: profile (the admin's user card: light blue plate) ---------- */
.profile { overflow: hidden; }
.pills.center { justify-content: center; margin-top: 6px; }
.profile .counters { border-top: 1px solid var(--line); }
.counters b.small { font-size: 14px; line-height: 1.6; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.counters b small { font-size: 12px; color: var(--muted); font-weight: 400; }
.sugs { display: flex; flex-wrap: wrap; gap: 8px; }
.sess { border-top: 1px solid var(--divider); }
.srow { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--divider); }
.srow:first-child { border-top: 0; }
.sico { width: 32px; height: 32px; border-radius: var(--radius); background: var(--gray-100); display: grid; place-items: center; flex: none; }
.sinfo { flex: 1; min-width: 0; font-size: 14px; }
.sinfo small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; margin-top: 2px; }
.sinfo .status { font-size: 11px; padding: 1px 6px; }
.sip { flex: none; border: 0; background: var(--gray-100); color: var(--text-2); border-radius: var(--radius); padding: 4px 8px; font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- admin (owner only) ---------- */
.ad-entry { display: flex; align-items: center; gap: 12px; padding: 16px; width: 100%; font: inherit; text-align: left; color: var(--text); }
.ad-entry .ico { width: 40px; height: 40px; border-radius: var(--radius); background: var(--nav-active); color: var(--accent); display: grid; place-items: center; flex: none; }
.ad-entry div { flex: 1; }
.ad-entry b { font-weight: 500; }
.ad-entry small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; margin-top: 2px; }
.ad-entry .go { color: var(--icon-2); }
/* admin sections = underlined tabs on a white card */
.ad-tabbar { display: grid; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ad-tabbar button { border: 0; background: none; font: inherit; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; }
.ad-tabbar button { min-width: 0; padding: 8px 2px; }
.ad-tabbar button .mi { display: block; font-size: 18px; margin: 0 auto 2px; }
/* "what the numbers mean": an (i) in a card head opens a plain list inside the card */
.ad-help { padding: 0 16px 12px; font-size: 13px; line-height: 18px; color: var(--text-2); }
.ad-help div { padding: 4px 0; }
.ad-help b { font-weight: 500; color: var(--text); }
.sec-head .info { margin-left: 0; cursor: pointer; }
.ad-tabbar button.on { color: var(--accent); border-bottom-color: var(--accent); }
#adm-body, #mem-body { display: flex; flex-direction: column; gap: 16px; }
.ad-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.ad-tiles div { background: var(--card); padding: 12px; }
.ad-tiles span { font-size: 12px; color: var(--muted); }
.ad-tiles b { display: block; font-size: 20px; line-height: 28px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ad-tiles b.sm { font-size: 16px; }
.ad-tiles b small { font-size: 13px; color: var(--muted); font-weight: 400; }
.ad-tiles b.good { color: var(--up); }
.ad-tiles b.bad { color: var(--down); }
.ad-meter { padding: 4px 16px 16px; }
.ad-mrow { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 8px; color: var(--text-2); }
.ad-mrow b { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--text); }
.ad-track { height: 8px; border-radius: 4px; background: var(--gray-100); overflow: hidden; }
.ad-track.sm { height: 6px; margin-top: 6px; max-width: 140px; }
.ad-track i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.ad-track.warn i { background: var(--count); }
.ad-track.blue i { background: var(--accent); }
.ad-track.grey i { background: var(--faint); }
.ad-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); background: none; width: 100%; font: inherit; text-align: left; color: var(--text-table); }
.card > .ad-row:first-child { border-top: 0; }
.ad-row:active { background: var(--gray-50); }
.ad-av { position: relative; flex: none; display: inline-flex; }
.ad-av .st { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--card); }
.st.online { background: var(--up); }
.st.recent { background: var(--count); }
.st.away, .st.never { display: none; }
.st.rev { background: var(--down); }
.ad-who .m .online { color: var(--up); font-weight: 500; }
.ad-sort { align-items: center; margin: 0 0 12px; padding: 0 16px; }
.ad-sort .lbl { font-size: 13px; color: var(--muted); flex: none; }
.ad-sort .chip { height: 28px; padding: 4px 10px; font-size: 13px; flex: none; }
.ad-who { flex: 1; min-width: 0; }
.ad-who .n { font-size: 14px; font-weight: 500; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-who .m { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-who .n.wrap { white-space: normal; font-weight: 400; color: var(--text-table); }
.ad-who .m.warn { color: var(--wait-text); font-weight: 500; }
.ad-right { text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.ad-right b { display: block; color: var(--text); font-size: 14px; font-weight: 500; }
.ad-av .av.big { border-radius: 50%; }  /* people are round everywhere in the admin */
.ad-av.big .st { right: 2px; bottom: 2px; width: 14px; height: 14px; }
.ad-hero { display: flex; gap: 12px; align-items: center; padding: 16px; }
.ad-hero h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; }
.ad-stat3 { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; border-top: 1px solid var(--line); }
.ad-stat3 div { padding: 10px 4px; font-size: 12px; color: var(--muted); }
.ad-stat3 b { display: block; font-size: 18px; line-height: 24px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
/* the budget choice = a segmented group */
.ad-seg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0 16px 16px; }
.ad-seg button { border: 0; background: none; font: inherit; text-align: center; height: 36px; padding: 6px 0; font-size: 14px; font-weight: 500; border-radius: var(--radius); color: var(--text-2); }
.ad-seg button.on { background: var(--accent-soft); box-shadow: var(--shadow-sm); color: var(--accent); }
.ad-seg button.off { color: var(--down); }
.ad-peer { width: 100%; border: 0; background: var(--warn-soft); font: inherit; text-align: left; }
.ad-peer .k { color: var(--warn) !important; }
.ad-peer .v { color: var(--accent); font-weight: 500; }
/* person card, variant A (mockup-person-card.html, 2026-10-19): feature labels, 4 actions, Top up sheet, warnings */
.ad-fchips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.ad-fchips span, .ad-fchips s { font-size: 12px; line-height: 22px; padding: 0 8px; border-radius: 11px; font-weight: 500; background: var(--nav-active); color: var(--accent); }
.ad-fchips s { background: var(--gray-100); color: var(--muted); }
.ad-qacts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 0 16px 16px; }
.ad-qacts button { border: 0; background: var(--nav-active); color: var(--accent); border-radius: var(--radius); min-height: 56px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; font-size: 12px; line-height: 16px; font-weight: 500; }
.ad-qacts .mi { font-size: 22px; margin: 0; }
.ad-restore { padding: 0 16px 16px; }
.ad-tops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 16px 12px; }
.ad-tops button { border: 1px solid var(--line); background: var(--card); color: var(--accent); border-radius: var(--radius); min-height: 44px; font: inherit; font-size: 15px; font-weight: 500; }
.ad-more { display: block; width: 100%; border: 0; border-top: 1px solid var(--divider); background: none; padding: 12px 16px; text-align: left; font: inherit; font-size: 14px; font-weight: 500; color: var(--accent); }
.ad-period { margin: 0 16px 4px; }
.ad-period button { flex: 1; }
.ad-cost { padding: 0 16px 12px; text-align: center; }
.ad-login b { font-weight: 500; color: var(--text-2); }
.ad-warn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; background: none; font: inherit; text-align: left; color: var(--wait-text); }
.ad-warn + .ad-warn { border-top: 1px solid var(--divider); }
.ad-warn .t { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; }
.ad-warn small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.ad-warn .go { color: var(--icon-2); }
.card > .mc-switch:first-child { border-top: 0; }
.ad-new { width: 100%; }
.ad-text { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font: inherit; font-size: 16px; resize: vertical; background: var(--card); color: inherit; outline: none; }
.ad-text:focus { border-color: var(--accent); box-shadow: var(--focus); }
.ad-inv { padding: 12px 16px 4px; }
.ad-inv .h { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
.ad-inv .ad-track { max-width: none; margin: 8px 0 6px; }
.ad-link { margin: 8px 16px 4px; background: var(--gray-50); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--radius); padding: 10px 12px; font-size: 12px;
           font-family: var(--mono); color: var(--text-2); word-break: break-all; }
.ad-acts { display: flex; gap: 16px; padding: 8px 16px 12px; }
.ad-acts button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--accent); padding: 0; }
.ad-acts button.red { color: var(--down); }
.ad-err { font-family: var(--mono); font-size: 13px; padding: 8px 16px; border-top: 1px solid var(--divider); color: var(--text-2); overflow-wrap: anywhere; }
.zero { color: var(--faint); }

/* postbacks of an affiliate (its card) */
#card-pb .pb-foot { display: flex; gap: 8px; padding: 12px 16px 16px; }
#card-pb .pb-foot button { flex: 1; }
#card-pb .pb-note { margin: 0 16px 12px; }
.pb-mtitle { padding: 16px 16px 4px; }
/* the postback log (Log chip, Postback log page, a row's sheet; mockup-postback-log.html) */
.pl-sum { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 16px 12px; font-size: 13px; line-height: 18px; color: var(--muted); }
.pl-sum .linkbtn .mi { font-size: 16px; vertical-align: -3px; margin: 0 2px 0 0; color: var(--down); }
.pl-row .lmeta b { font-weight: 500; color: var(--down); }
.pl-row .lmeta b.ok { color: var(--ok-text); }
.pl-row .lmeta b.wait { color: var(--wait-text); }
.pl-row > .mi.go, #card-pb .irow > .mi.lead, #card-pb .irow > .mi.go, #pl-list .irow > .mi.go { color: var(--icon-2); }
#pl-list > .ilist:first-child { border-top: 0; }
.pl-ans { margin: 0 16px 12px; }
.pl-ans pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/19px var(--mono); background: var(--gray-50); color: var(--text); padding: 8px 10px; border-radius: var(--radius); margin: 0; }
.pl-ans .none { font-size: 14px; color: var(--muted); }
.pl-note { display: flex; gap: 8px; align-items: flex-start; background: var(--note-bg); border: 1px solid var(--note-line); color: var(--note-text); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; line-height: 18px; margin: 0 16px 12px; }
.pl-note .mi { color: var(--note-icon); font-size: 18px; margin: 0; }
.pl-err { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px; text-align: center; font-size: 14px; color: var(--muted); }
.pl-err .mi { font-size: 22px; margin: 0; color: var(--icon-2); }
.pl-sk { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.pl-sk .skeleton { height: 44px; }
.card > .pl-sk:first-child { padding-top: 16px; }
.pl-tmpl { padding: 10px 16px; border-top: 1px solid var(--divider); font-size: 13px; line-height: 18px; color: var(--muted); overflow-wrap: anywhere; }
.pl-tmpl b { display: block; font-weight: 500; color: var(--text-2); margin-bottom: 2px; }
.pl-view { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.pl-view .lbl { font-size: 13px; line-height: 18px; color: var(--muted); }
.pl-view .chips { margin: 0 -16px; }
.pl-view .dates { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pl-view .dates label { min-width: 0; }
.pl-view .dates input { min-width: 0; width: 100%; box-sizing: border-box; }
#card-pb { scroll-margin-top: 12px; }
/* the postbacks block after a jump to it: a focus ring for a moment (set and removed by app.js, no animation) */
#card-pb.flash { box-shadow: var(--shadow), var(--focus); }

/* ---------- Icons: Google Material Symbols Outlined, as in the ReferOn admin (no emoji anywhere in the app) ----------
   The class gets the icon NAME as its text ("edit", "payments"); only the listed icons are loaded (index.html). */
.mi, .ico, .aico, .sico, .flag.mi {
  font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; letter-spacing: normal; text-transform: none;
  white-space: nowrap; direction: ltr; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased; font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20; overflow: hidden;
}
.mi { display: inline-block; font-size: 18px; line-height: 1; width: 1em; vertical-align: -4px; margin-right: 6px; flex: none; }
.mi:last-child { margin-right: 0; }
/* a leading icon in a text button keeps its 6px gap (design-review-2026-10-18); an icon-only one gets .solo */
.btn-light .mi:first-child, .btn-primary .mi:first-child, .ad-acts button .mi:first-child { margin-right: 6px; }
.btn-light .mi.solo, .btn-primary .mi.solo { margin-right: 0; }
/* these buttons space the icon with their own flex gap */
.qa button .mi:first-child, .cx-opens > button .mi:first-child, .cx-pbtns > button .mi:first-child, .cx-ibtns > button .mi:first-child, .fb-sheet .btn-light .mi:first-child { margin-right: 0; }
.sec-head .ico, .vhead .ico { background: none; color: var(--text-2); font-size: 20px; width: 20px; height: 20px; line-height: 20px; }
.aico { font-size: 22px; line-height: 24px; height: 24px; }
.sico { font-size: 18px; color: var(--text-2); }
.list .ico { font-size: 20px; }
.ad-entry .ico { font-size: 22px; }
.flag.mi { font-size: 16px; color: var(--muted); vertical-align: -3px; margin-right: 4px; }
.status .mi, .lmeta .mi, .stitle .mi { font-size: 14px; vertical-align: -2px; margin-right: 3px; }
.hint .mi { vertical-align: -4px; }
.ad-tabs .mi, .tabs .mi { margin-right: 4px; }

/* Status badges outlined like the admin (white plate, colored border), not filled */
.status { background: var(--card); border: 1px solid var(--divider); color: var(--neutral-text); padding: 1px 6px; }
.status.ok { color: var(--ok-text); background: var(--card); border-color: var(--ok-line); }
.status.no { color: var(--neutral-text); background: var(--card); border-color: var(--divider); }
.status.wait { color: var(--wait-text); background: var(--card); border-color: var(--wait-line); }
.status.bad { color: var(--down); background: var(--card); border-color: var(--bad-line); }
.status.plat { color: var(--accent); background: var(--nav-active); border-color: transparent; }

/* Sheets as the admin panels: title 20 px; footer = secondary at its width + the main button filling the rest */
.sheet-head b { font-size: 20px; line-height: 28px; }
.sheet-foot { border-top-color: var(--line); }
.sheet-foot:not(.agrid) .btn-light { flex: 0 1 auto; }
.sheet-foot:not(.agrid) .btn-light:only-child { flex: 1; }

/* the bulk operations switch in the admin person card: two equal halves */
#adm-bulk { grid-template-columns: 1fr 1fr; }
#adm-bulk button { white-space: nowrap; }

/* campaign access (admin: Visibility row + access list with Add / Remove) */
.acc-vis { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--vis-bg); border-bottom: 1px solid var(--vis-line); border-radius: var(--radius) var(--radius) 0 0; }
.acc-vis .mi { color: var(--accent); margin: 0; }
.acc-vis b { font-weight: 500; }
.acc-vis .linkbtn { margin-left: auto; }
.acc-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--divider); }
.acc-name { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: var(--text); }
.acc-name b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-name small { color: var(--muted); font-size: 13px; }
.acc-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; }
.acc-foot .btn-primary { flex: 1; }

/* brand logos (ReferOn brand icons): the letter tile until the logo arrives, then the logo on white */
.blogo { overflow: hidden; }
.blogo.has-img { background: var(--card) !important; box-shadow: inset 0 0 0 1px var(--line); }
.blogo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.blogo.sm { width: 28px; height: 28px; font-size: 13px; }
.blogo.xs { width: 20px; height: 20px; font-size: 11px; border-radius: 4px; }
.chip.bchip, .chip.more-chip, #brand-chips .chip { display: inline-flex; align-items: center; gap: 6px; }
#brand-chips .chip .mi { margin: 0; font-size: 16px; }
.sheet-list .bpick { justify-content: flex-start; }
.sheet-list .bpick .item { flex: 1; }
.acc-row[hidden] { display: none; }

/* deals in the cards (admin: C = custom, i = inherited; history with Active / Past) */
.plan-mark { width: 18px; height: 18px; border-radius: 4px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--on-color); flex: none; vertical-align: -3px; }
.plan-mark.c { background: var(--accent); color: var(--on-accent); }
.plan-mark.i { background: var(--faint); }
pre.rules { margin: 0 16px 12px; padding: 10px 12px; background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius); font: 12px/17px var(--mono); color: var(--text-table); white-space: pre-wrap; overflow-wrap: anywhere; }
.cap { color: var(--muted); font-size: 13px; font-weight: 500; padding: 8px 16px 4px; }
.hist { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 16px; border-top: 1px solid var(--divider); align-items: center; }
#hist-tabs { padding: 10px 16px 6px; }
.info-alert { display: flex; gap: 10px; align-items: flex-start; margin: 0 16px 12px; padding: 10px 12px; background: var(--note-bg); border: 1px solid var(--note-line); border-radius: var(--radius); color: var(--note-text); font-size: 13px; }
.info-alert .mi { color: var(--note-icon); margin: 0; }
#item-plan { border-top: 1px solid var(--line); }
.hist > * { min-width: 0; }

/* Admin journal (2026-10-06, mockup-logs.html): Recent feed, a person's Log, the AI tab */
.ad-tabbar { grid-template-columns: repeat(6, 1fr); }
.lg-row { display: flex; gap: 10px; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); background: none; width: 100%; font: inherit; text-align: left; align-items: flex-start; color: var(--text-table); }
.lg-row.tap:active { background: var(--gray-50); }
.lg-row > .mi.ico { font-size: 18px; color: var(--muted); margin-top: 1px; flex: none; }
.lg-main { flex: 1; min-width: 0; }
.lg-main .t { font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.lg-main .t b { color: var(--accent); font-weight: 500; }
.lg-main .m { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.lg-main .m .status { margin-right: 4px; }
.lg-time { font-size: 13px; color: var(--muted); white-space: nowrap; flex: none; }
.lg-day { padding: 8px 16px 4px; font-size: 13px; font-weight: 500; color: var(--muted); border-top: 1px solid var(--divider); background: var(--gray-50); }
.lg-req { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.lg-num { font-weight: 600; color: var(--text-table); }
.lg-num.bad { color: var(--down); }
.lg-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 16px 12px; }
.lg-sum div { font-size: 13px; color: var(--muted); }
.lg-sum b { display: block; font-size: 16px; font-weight: 600; color: var(--text-table); }
.lg-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; white-space: normal; }
.lg-tools span { font: 12px var(--mono); padding: 1px 6px; border: 1px solid var(--divider); border-radius: 4px; background: var(--card); }
/* Admin › AI: one question as a full-height sheet (2026-11-09, mockup-ai-question-sheet.html, admin.js openAiQuestion) */
.lg-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }  /* AI rows: time + › */
.lg-side .go-mi { font-size: 20px; color: var(--icon-2); }
.sheet.full { top: calc(var(--top-inset) + 8px); max-height: none; }
.sheet.full .sheet-body { flex: 1; background: var(--bg); }
.aq-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); flex: 1 0 auto; }
.aq-body > .sk-rows { padding: 0; }
.aq-who { display: flex; gap: 12px; align-items: center; }
.aq-who > div { min-width: 0; }
.aq-who .n { font-weight: 500; color: var(--accent); overflow-wrap: anywhere; }
.aq-who .s { font-size: 13px; line-height: 18px; color: var(--muted); overflow-wrap: anywhere; }
.aq-who > .status { margin-left: auto; flex: none; }
.aq-body .sec-head .fold.push-end { margin-left: auto; }
.aq-q { padding: 0 16px 16px; font-size: 16px; line-height: 24px; white-space: pre-wrap; overflow-wrap: anywhere; }
.aq-folded { max-height: 300px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.aq-fold { padding: 0 16px 14px; }
.aq-cut { padding: 0 16px 14px; font-size: 13px; line-height: 18px; color: var(--muted); }
.aq-none { padding: 0 16px 16px; color: var(--muted); }
/* «Prepared» (2026-11-12, mockup-ai-question-preview.html A): one block per preview the answer made */
.aq-prev { padding-bottom: 14px; }
.aq-prev + .aq-prev { border-top: 1px solid var(--divider); padding-top: 12px; }
.aq-prev .h { display: flex; align-items: center; gap: 8px; padding: 0 16px 8px; }
.aq-prev .h b { font-weight: 500; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.aq-lines { margin: 0 16px; padding: 10px 12px; background: var(--gray-50); border-radius: var(--radius);
  font: 13px/20px var(--mono); color: var(--text-table); white-space: pre-wrap; overflow-wrap: anywhere; }
.aq-prev .aq-fold, .aq-prev .aq-cut { padding: 8px 16px 0; }
.aq-prev .err { padding: 8px 16px 0; font-size: 13px; line-height: 18px; color: var(--down); overflow-wrap: anywhere; }
.aq-prev .who { padding: 8px 16px 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.aq-meta + .aq-cut { padding-top: 10px; }
.aq-chat { padding: 0 16px 16px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.aq-tools.lg-tools { margin: 0; padding: 0 16px 12px; gap: 6px; }
.aq-meta .r { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--divider); }
.aq-meta .k { color: var(--muted); flex: none; }
.aq-meta .v { color: var(--text-table); text-align: right; min-width: 0; overflow-wrap: anywhere; }
/* the answer: rich_msg.to_html's tags (p, b, i, u, s, code, pre, a, blockquote, h3, h4, ul, ol, li, table, details, hr) */
.aq-a { padding: 0 16px 16px; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 10px; }
.aq-a > p { margin: 0; white-space: pre-wrap; }
.aq-a b, .aq-a strong { font-weight: 600; }
.aq-a a { color: var(--accent); }
.aq-a code { font-family: var(--mono); font-size: 14px; background: var(--gray-50); padding: 1px 4px; border-radius: 4px; }
.aq-a pre { margin: 0; padding: 10px 12px; background: var(--gray-50); border-radius: var(--radius); font: 14px/20px var(--mono); overflow-x: auto; white-space: pre; }
.aq-a pre code { background: none; padding: 0; }
.aq-a h3, .aq-a h4 { margin: 4px 0 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.aq-a ul, .aq-a ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.aq-a blockquote { margin: 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--line); color: var(--text-2); }
.aq-a details summary { color: var(--accent); cursor: pointer; }
.aq-a hr { border: 0; border-top: 1px solid var(--divider); margin: 0; width: 100%; }
.aq-a mark { background: var(--warn-soft); color: inherit; }
.aq-a tg-spoiler { background: var(--gray-100); color: transparent; border-radius: 4px; }
.aq-tbl { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.aq-tbl table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.aq-tbl th { font: 500 12px/16px var(--font-head); letter-spacing: .6px; text-transform: uppercase; color: var(--text-table); text-align: left; padding: 8px 10px; background: var(--gray-50); }
.aq-tbl td { padding: 8px 10px; border-top: 1px solid var(--divider); color: var(--text-table); }
.aq-tbl td[align="right"], .aq-tbl th[align="right"] { text-align: right; white-space: nowrap; }
.aq-rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); }
.aq-rows > div { padding: 8px 10px; display: grid; grid-template-columns: minmax(80px, 40%) 1fr; gap: 2px 8px; font-size: 14px; line-height: 20px; }
.aq-rows > div + div { border-top: 1px solid var(--divider); }
.aq-rows .k { color: var(--muted); overflow-wrap: anywhere; }
.aq-rows .v { color: var(--text-table); overflow-wrap: anywhere; }
.lg-more { display: block; width: 100%; border: 0; border-top: 1px solid var(--divider); background: none; padding: 12px; font: inherit; font-size: 14px; font-weight: 500; color: var(--accent); }
.card .chips.lg-chips { margin: 0; padding: 0 16px 10px; }
.lg-tabs { margin-bottom: 8px; }

/* Affiliate dashboard (2026-10-06, mockup-affiliate.html) */
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.qa button { display: flex; align-items: center; justify-content: center; gap: 6px; }

/* Dashboard blocks + Customize (2026-10-06) */
.dash-custom { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin: 4px 0 14px; }
.link-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; text-align: left; color: var(--text-table); }
.link-row .grow { flex: 1; min-width: 0; border: 0; background: none; font: inherit; text-align: left; padding: 0; color: inherit; }
.link-row b { display: block; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row small { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row .chev { color: var(--muted); }
.cust-row { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--divider); font-size: 14px; }
.cust-row > .mi { color: var(--muted); font-size: 18px; }
.cust-row .grow { flex: 1; min-width: 0; }
.cust-mv { border: 0; background: none; width: 36px; height: 36px; border-radius: var(--radius); color: var(--accent); padding: 0; }
.cust-mv .mi { font-size: 18px; }
.cust-mv:disabled { color: var(--disabled); }
/* the nav without a hidden tab (Affiliates for a plain affiliate) keeps equal columns */
.nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.nav button[hidden] { display: none; }
/* AI Desk first (docs/plan-nav-desk-first.md): Needs you on the Inbox tab, the counter shape of the lists */
.nav[hidden] { display: none; }
#dnav button { position: relative; }
#dnav .nbadge { position: absolute; top: 6px; left: calc(50% + 10px); z-index: 2; background: var(--count); color: var(--on-count); border-radius: var(--radius); font-size: 11px; line-height: 16px; font-weight: 600; padding: 0 5px; }
/* the desk switcher in the Inbox / Chats title row: 24/30 next to the program icon (§21.4) */
.cx-desksw { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; color: var(--text); text-align: left; font: inherit; }
.cx-desksw .grow { min-width: 0; }
.cx-desksw b { display: block; font-size: 24px; line-height: 30px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-desksw .sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-desksw > .mi { font-size: 20px; color: var(--icon-2); flex: none; }
.cx-desks .item small { display: block; }
.cx-desks .picon.cx-all { background: var(--accent-soft); color: var(--accent); }
.cx-desks .picon .mi { margin: 0; font-size: 20px; }

/* Forms (2026-10-06): media item, postbacks, deal */
.frow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; text-align: left; color: var(--text-table); }
.card.list .frow:first-child { border-top: 0; }
.frow.col { flex-direction: column; align-items: stretch; gap: 8px; }
.frow .fl { flex: none; min-width: 96px; font-size: 13px; color: var(--muted); }
.frow .fv { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.frow .fv.ph { color: var(--accent); font-weight: 500; }
.frow .chev { color: var(--muted); }
.finput { flex: 1; min-width: 0; border: 1px solid var(--divider); border-radius: var(--radius); padding: 8px 10px; font: inherit; font-size: 16px; background: var(--card); color: var(--text-table); text-align: right; }
.frow.col .finput, .frow.col textarea { text-align: left; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.mrow { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.mrow select { border: 1px solid var(--divider); border-radius: var(--radius); padding: 6px 8px; font: inherit; font-size: 16px; background: var(--card); }
.rule-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; }
.preview-box { padding: 0 16px 14px; font-size: 13px; line-height: 19px; overflow-wrap: anywhere; }
.preview-box pre { white-space: pre-wrap; font: 12px/17px var(--mono); background: var(--gray-50); padding: 8px 10px; border-radius: var(--radius); margin: 6px 0; }
.done-card { padding: 18px 16px; text-align: center; }
.done-ico .mi { font-size: 40px; color: var(--up); }
.done-ico.wait .mi { color: var(--accent); }  /* not credited yet: Stars waiting / in the chat */
.done-text { margin: 6px 0 12px; font-size: 15px; }
.link-box { background: var(--gray-50); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; font-size: 13px; overflow-wrap: anywhere; text-align: left; }
.fill-ai textarea { width: 100%; }

/* Profile hero without the cover band: a big photo, little empty space (the owner, 2026-10-06) */
.phero .av.huge { width: 128px; height: 128px; font-size: 42px; border: 0; box-shadow: var(--shadow); }
/* the Admin entry in More: an admin zone, marked red */

/* UAP program cards (2026-10-06): partner, login, cabinet address and currency each on their own */
.progs { display: flex; flex-direction: column; gap: 8px; padding: 4px 16px 8px; }
.prog { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--divider); border-radius: var(--radius); background: var(--card); font: inherit; text-align: left; color: var(--text-table); }
.prog.on { background: var(--accent-soft); border-color: var(--accent); }
.prog-ico .picon { width: 36px; height: 36px; font-size: 15px; }
.prog-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prog-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.prog-top b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-top .status .mi { font-size: 13px; }
.prog-meta { display: flex; align-items: center; gap: 5px; font-size: 13px; line-height: 18px; color: var(--muted); min-width: 0; }
.prog-meta .mi { font-size: 14px; flex: none; }
.prog-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-cur { flex: none; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 2px 6px; border: 1px solid var(--divider); border-radius: 4px; background: var(--card); }
.prog .chev { color: var(--muted); }
/* Dashboard › All programs (UAP, 2026-10-16, mockup-uap-dashboard.html A) */
#blk-uap .sec-head .sub { font-size: 13px; color: var(--muted); }
.uap-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); background: var(--card); color: var(--text); font: inherit; text-align: left; }
.uap-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.uap-row:active { background: var(--gray-50); }
.uap-row.inside { padding-left: 40px; }
.uap-row > .picon { width: 32px; height: 32px; font-size: 14px; border-radius: 6px; }
.uap-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.uap-main .nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.uap-main .nm b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uap-main .nm .status { font-size: 11px; line-height: 14px; padding: 0 5px; }
.uap-main .nm .status .mi { font-size: 12px; }
.uap-main small { font-size: 13px; line-height: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uap-main small .mi { font-size: 14px; vertical-align: -2px; margin-right: 2px; }
.uap-main small.uap-err .mi { color: var(--icon-2); margin-right: 3px; }
.uap-sk { display: block; height: 12px; margin-top: 4px; }
.uap-num { flex: none; max-width: 40%; display: flex; flex-direction: column; align-items: flex-end; }
.uap-num b { max-width: 100%; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uap-num b.neg { color: var(--down); }
.uap-act { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 4px; font-size: 13px; font-weight: 500; color: var(--accent); white-space: nowrap; }
.uap-act .mi { font-size: 16px; }
.uap-row .chev { color: var(--muted); }
/* All programs, the affiliate's home (2026-10-16, mockup-uap-home.html) */
.partner .apps-ico { width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 16px; flex: none; }
.prog .apps-big { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 22px; }
.all-strip { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); font: inherit; font-size: 13px; line-height: 18px; color: var(--text-2); text-align: left; }
.all-strip .mi { color: var(--icon-2); font-size: 18px; flex: none; }
.all-strip .go { margin-left: auto; }
.all-strip b { color: var(--text); font-weight: 500; }
.all-note { padding: 8px 16px 12px; }
.all-hero { cursor: default; }
.all-hero .cur-v { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.all-hero .value { margin: 6px 0 8px; }
.all-hero .value.sm { font-size: 22px; line-height: 28px; margin: 2px 0 8px; }
.all-hero .cur-tag { flex: none; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 1px 6px; border: 1px solid var(--divider); border-radius: 4px; }
.all-hero .mix.thin { height: 6px; margin-bottom: 10px; }
.all-hero .legend { grid-template-columns: 1fr; }
.all-hero .legend b, .all-hero .hero-line b { display: flex; flex-direction: column; align-items: flex-end; white-space: normal; }
.all-hero .legend b em, .all-hero .hero-line b em { font-style: normal; white-space: nowrap; }
.all-hero .legend span { align-items: flex-start; }
#app .empty .more { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
#all-money .rows .r { cursor: default; }
.rows .r .v.multi, .tile .v.multi-v { display: flex; flex-direction: column; align-items: flex-end; line-height: 18px; }
.tile .v.multi-v { align-items: flex-start; line-height: 26px; }
.prog-of { color: var(--muted); font-size: 13px; margin-left: 6px; }
.dealr { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; color: var(--text); text-align: left; }
.dealr:first-child { border-top: 0; }
.dealr:disabled { opacity: 1; }
.dealr .picon { width: 28px; height: 28px; border-radius: 6px; font-size: 13px; }
.dealr .dm { flex: 1; min-width: 0; }
.dealr b { font-weight: 500; display: block; }
.dealr small { font-size: 13px; line-height: 18px; color: var(--text-2); display: block; }
.dealr .chev { color: var(--muted); }
.balp { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--divider); font-size: 13px; color: var(--text-2); }
.balp span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balp b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bal .big.sm { font-size: 20px; line-height: 26px; }
.all-bal3 b { display: block; }

/* Profile, variant A (2026-10-06, mockup-profile-v2.html): a photo row + three numbers, tighter rows */
.pa-id { display: flex; gap: 14px; padding: 14px 16px 12px; align-items: flex-start; }
.av.pa-av { width: 72px; height: 72px; font-size: 24px; flex: none; }
.pa-who { flex: 1; min-width: 0; }
.pa-who h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-login { border: 0; background: none; padding: 12px 0; margin: -12px 0; font: inherit; font-size: 13px; line-height: 18px; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.pa-login .mi { font-size: 14px; color: var(--accent); }
.pa-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.pa-tags .status { font-size: 11px; line-height: 16px; }
.pa-stats { display: flex; border-top: 1px solid var(--divider); }
.pa-stats button { flex: 1; padding: 8px 10px 9px; text-align: center; border: 0; border-left: 1px solid var(--divider); background: none; font: inherit; color: inherit; }
.pa-stats button:first-child { border-left: 0; }
.pa-stats b { display: block; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--text); }
.pa-stats small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.pa-bar { display: block; margin: 4px 8px 0; height: 4px; border-radius: 2px; background: var(--gray-100); overflow: hidden; }
.pa-bar i { display: block; height: 100%; background: var(--accent); }
#app .kv .row { padding-top: 9px; padding-bottom: 9px; }

/* the AI balance (2026-10-06): the profile card and the admin person card */
.bal-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 0 16px 10px; }
.bal-row .bal { font-size: 26px; line-height: 32px; font-weight: 600; color: var(--text); }
.bal-row .bal.neg { color: var(--down); }
.bal-hist .row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 16px; border-top: 1px solid var(--divider); font-size: 13px; }
.bal-hist .k { color: var(--muted); }
.bal-hist .v { font-weight: 600; color: var(--up); }
.bal-hist .v.neg { color: var(--down); }

/* USDT top-up (2026-10-06) */
.pay-box { padding: 6px 16px 16px; }
.pay-box .cap { color: var(--muted); font-size: 13px; }
.pay-amount { display: flex; align-items: baseline; gap: 6px; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 28px; font-weight: 600; color: var(--text); }
.pay-amount small { font-size: 14px; color: var(--muted); }
.pay-amount .mi, .pay-addr .mi { font-size: 18px; color: var(--accent); align-self: center; }
.pay-net { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.pay-net .mi { font-size: 16px; }
.pay-addr { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--divider); border-radius: var(--radius); background: var(--gray-50); padding: 10px; font: inherit; text-align: left; }
.pay-addr code { flex: 1; min-width: 0; font: 13px/18px var(--mono); overflow-wrap: anywhere; color: var(--text-table); }

.pay-x { border: 0; background: none; padding: 6px; color: var(--muted); display: flex; }
.pay-x:active { color: var(--down); }
/* top-up v2 (2026-10-15, mockup-topup-v2): the 3 steps, the exchange-fee card, where the hash is, the results */
.pay-steps { display: flex; gap: 6px; margin: 12px 16px 4px; }
.pay-step { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: var(--radius); background: var(--gray-50); border: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--text-2); }
.pay-step .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--line); color: var(--text-2); }
.pay-step .n .mi { font-size: 14px; }
.pay-step.on { background: var(--accent-soft); border-color: var(--sel-line); color: var(--accent); }
.pay-step.on .n { background: var(--accent); color: var(--on-accent); }
.pay-step.done .n { background: var(--up-soft); color: var(--up); }
.pay-fee { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px; background: var(--warn-soft); border: 1px solid var(--wait-line); border-radius: var(--radius); font-size: 13px; line-height: 18px; color: var(--text-table); }
.pay-fee > .mi { color: var(--warn); }
.pay-fee b.t { display: block; color: var(--wait-text); font-size: 14px; margin-bottom: 2px; }
.pay-fee .ex { margin: 6px 0; padding: 6px 8px; border-radius: var(--radius); background: var(--card); font-variant-numeric: tabular-nums; }
.pay-where { margin-top: 8px; border: 1px solid var(--note-line); background: var(--note-bg); border-radius: var(--radius); color: var(--note-text); font-size: 13px; line-height: 18px; }
.pay-where summary { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-weight: 500; cursor: pointer; list-style: none; }
.pay-where summary::-webkit-details-marker { display: none; }
.pay-where summary .mi { color: var(--note-icon); }
.pay-where summary .fold { margin-left: auto; }
.pay-where[open] summary .fold { transform: rotate(180deg); }
.pay-where ul { margin: 0; padding: 0 12px 10px 40px; }
.pay-where li { margin: 2px 0; }
.pay-why { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--gray-50); border: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--text-2); text-align: left; }
.pay-why div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.pay-why span:first-child { color: var(--muted); }
.pay-why p { margin: 8px 0 0; }
.pay-tx { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--accent); font-size: 13px; text-decoration: none; }
.pay-tx .mi { font-size: 16px; }
.pay-refused { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--down-bg); border: 1px solid var(--bad-line); font-size: 13px; line-height: 18px; color: var(--text-table); }
.pay-refused > b { display: flex; align-items: center; gap: 6px; color: var(--down); font-size: 14px; margin-bottom: 4px; }
.pay-refused > b .mi { font-size: 18px; }
.pay-refused .own { display: flex; gap: 8px; margin-top: 8px; color: var(--text-2); }
.pay-refused .own .mi { color: var(--accent); font-size: 18px; }


/* companies and finance (2026-10-06) */
.segwrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px; }
.segwrap .seg button { flex: 1; }
.card > .bal { padding: 4px 16px 12px; }
.bal .lbl { font-size: 13px; line-height: 18px; color: var(--muted); }
.bal .big { font-size: 28px; line-height: 36px; font-weight: 600; color: var(--text); }
.bal3 { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--divider); }
.bal3 div { padding: 10px 12px; min-width: 0; }
.bal3 div + div { border-left: 1px solid var(--divider); }
.bal3 span { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.bal3 b { font-size: 15px; font-weight: 600; color: var(--text); }
.ptype { width: 32px; height: 32px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.ptype .mi { margin: 0; }
.status.tiny { font-size: 11px; line-height: 14px; padding: 1px 6px; vertical-align: 1px; }
button.status { border: 0; font-family: inherit; cursor: pointer; }
.fin-grid { grid-template-columns: repeat(2, 1fr); }

/* fixed fee budget (fees.js, 2026-10-06) */
.sum3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.sum3 div { padding: 12px; min-width: 0; }
.sum3 div + div { border-left: 1px solid var(--divider); }
.sum3 span { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.sum3 b { display: block; font-size: 15px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; } /* full amounts with cents: $1,234,567.89 */
.note-line { padding: 8px 16px 10px; font-size: 13px; line-height: 18px; color: var(--muted); border-top: 1px solid var(--divider); }
.fee-co { display: flex; justify-content: space-between; gap: 8px; padding: 10px 16px 4px; font-size: 13px; font-weight: 600; color: var(--text-2); border-top: 1px solid var(--divider); }
.fee-list .fee-co:first-child { border-top: 0; }
.fee-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 16px 10px; }
.fee-row .grow { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: inherit; }
.fee-row b { display: block; font-size: 14px; font-weight: 500; color: var(--text-table); }
.fee-row small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin: 1px 0 3px; }
.fee-row .amt { font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--text); }
.fee-row .amt.neg, .fee-res .amt.neg { color: var(--down); }
.fbox { width: 20px; height: 20px; flex: none; margin-top: 1px; border: 1.5px solid var(--icon-2); border-radius: 4px; background: var(--card); padding: 0; }
.fbox.on { background: var(--accent); border-color: var(--accent); }
.fbox.on::after { content: "✓"; color: var(--on-accent); font-size: 13px; line-height: 17px; display: block; text-align: center; }
.fbox.none { visibility: hidden; }
.fee-send { position: sticky; bottom: calc(var(--nav-h, 64px) + 8px); z-index: 2; }
.fee-send .btn-primary { width: 100%; height: 44px; box-shadow: var(--shadow); }
.fee-res { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--divider); }
.fee-res .grow { flex: 1; min-width: 0; }
.fee-res b { display: block; font-size: 14px; font-weight: 500; }
.fee-res small { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.fee-res.ok > .mi { color: var(--up); }
.fee-res.failed > .mi { color: var(--down); }
.fee-res.skipped > .mi { color: var(--muted); }
.ff-buttons { display: flex; gap: 8px; margin-bottom: 12px; }
.ff-buttons button { flex: 1; height: 44px; }
.btn-light.danger { color: var(--down); }
.fee-tools { display: flex; flex-direction: column; gap: 8px; }
.fee-tools .chips { margin: 0; padding: 0; }
.fee-tools .chip .cnt { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 400; }
.fee-tools .chip.on .cnt { color: var(--accent); }
.fee-tools .search-in { width: 100%; }
.fee-row.flash { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.fee-search { display: flex; gap: 8px; align-items: center; }
.fee-search .search-in { flex: 1; min-width: 0; }
.fee-search .btn-light { white-space: nowrap; flex: none; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.sortline-btn { align-self: flex-start; border: 0; background: none; padding: 12px 0; margin: -12px 0; font: inherit; font-size: 13px; color: var(--text-2); }  /* ~44px to tap */
.sortline-btn b { color: var(--accent); font-weight: 500; }
.sortline-btn .mi { font-size: 16px; margin-right: 4px; vertical-align: -3px; }
.ff-body .finput { max-width: 55%; }
.fee-res.unknown > .mi { color: var(--warn); }
/* nav v2: section titles inside the Profile's lists */
.list-title { padding: 10px 16px 4px; font: 500 12px/16px var(--font-head); letter-spacing: .6px; text-transform: uppercase; color: var(--text-table); }

/* Media items (media.js, nav v2) */
.linkbtn { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 500; padding: 0 0 0 8px; }
.linkbtn, .cp, .mi-copy, .idcopy { padding-top: 10px; padding-bottom: 10px; margin-top: -10px; margin-bottom: -10px; }  /* ~40px to tap, same look */
.sel-bar { position: sticky; bottom: calc(var(--nav-h, 64px) + 8px); z-index: 3; display: flex; align-items: center; gap: 4px; background: var(--bar-dark); color: var(--card); border-radius: 10px; padding: 8px 10px; box-shadow: var(--bar-shadow); font-size: 13px; }
.sel-bar .n { background: var(--card); color: var(--bar-dark); border-radius: 6px; padding: 1px 7px; font-weight: 600; }
.sel-bar .grow { flex: 1; margin-left: 4px; }
.sel-bar button { border: 0; background: none; color: var(--bar-text); font: inherit; font-size: 12px; font-weight: 500; padding: 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.sel-bar button .mi { font-size: 18px; margin: 0; color: var(--bar-text); }

/* Finance › Fixed fee (finance.js, nav v2) */
.fin-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 16px; border-top: 1px solid var(--divider); cursor: pointer; }
.fin-list > .fin-row:first-child, .fin-list > .fin-grp:first-child { border-top: 0; }
.fin-row.on { background: var(--accent-soft); }
.fin-row .grow { flex: 1; min-width: 0; }
.fin-row b { display: block; font-size: 14px; font-weight: 500; color: var(--text-table); overflow-wrap: anywhere; }
.fin-row small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.fin-row .amt { font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--text); text-align: right; }
.fin-row .amt.neg { color: var(--down); }
.fin-row .amt .per { display: inline; font-size: 13px; font-weight: 400; color: var(--muted); }
.fin-row .fbox { margin-top: 1px; }
.fin-grp { display: flex; justify-content: space-between; gap: 8px; width: 100%; border: 0; border-top: 1px solid var(--divider); background: var(--gray-50); padding: 9px 16px 7px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); text-align: left; }
.fin-grp small { font-weight: 400; color: var(--muted); }
.tag-out { font-size: 10px; font-weight: 600; line-height: 14px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--down); color: var(--down); vertical-align: 1px; }
.on-year { font-weight: 600; }
.acts4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.acts4 button { height: 40px; }

/* the fixed fee form (2026-10-07): labels above full-width fields, From | To side by side, Name + Auto */
.ff-card { margin-bottom: 12px; }
.ff-card > .frow:first-child { border-top: 0; }
.ff-card .frow.col .fl { min-width: 0; }
.ff-two { gap: 12px; }
.ff-two label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ff-two .finput, .ff-card .frow.col .finput { text-align: left; width: 100%; }
.ff-name { display: flex; gap: 8px; align-items: center; }
.ff-name .finput { flex: 1; }

/* the Reward plans block (2026-10-07, mockup-deals.html variant A) */
.rp-seg { display: flex; gap: 4px; margin: 0 16px 10px; background: var(--gray-50); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--radius); padding: 3px; }
.rp-seg button { flex: 1; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 500; height: 28px; border-radius: 4px; color: var(--text-2); }
.rp-seg button.on { background: var(--card); color: var(--accent); box-shadow: var(--shadow-sm); }
.rp-seg .c { color: var(--muted); font-weight: 400; margin-left: 4px; }
.plan-line { display: flex; align-items: center; gap: 8px; padding: 0 16px 10px; min-width: 0; }
.plan-line b { font-weight: 500; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.status.sub { color: var(--purple); border-color: var(--sub-line); background: var(--purple-soft); }
.ta { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.ta th { font-family: var(--font-head); font-weight: 500; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px 8px; border-top: 1px solid var(--divider); background: var(--gray-50); }
.ta td { padding: 7px 8px; border-top: 1px solid var(--divider); vertical-align: top; overflow-wrap: anywhere; }
.ta th:first-child, .ta td:first-child { padding-left: 16px; width: 44px; }
.ta th:last-child, .ta td:last-child { padding-right: 16px; text-align: right; }
.ta td.k { color: var(--accent); font-weight: 600; font-size: 11px; }
.ta td small { display: block; color: var(--muted); font-size: 11px; line-height: 14px; }
.ta td .v { font-weight: 600; white-space: nowrap; }
.more .mi { font-size: 18px; vertical-align: -4px; margin-left: 2px; }
.rp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--divider); }
.rp-note { color: var(--muted); font-size: 13px; line-height: 18px; min-width: 0; }
.rp-foot button { flex: none; border: 0; background: none; padding: 0; font: inherit; font-weight: 500; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.rp-foot .mi { font-size: 18px; margin: 0; }
.rp-sum { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; }
.rp-brow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; text-align: left; color: var(--text); }
.rp-brow.open { background: var(--accent-soft); }
.rp-brow .grow { flex: 1; min-width: 0; }
.rp-brow .grow b { display: block; font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.rp-brow .grow small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; }
.rp-brow > .mi { color: var(--icon-2); font-size: 20px; margin: 0; }
.rp-logos { display: flex; flex: none; }
.rp-logos > * + * { margin-left: -8px; box-shadow: 0 0 0 2px var(--card); }
.rp-sub { background: var(--gray-50); }
.rp-sub .ta th { background: transparent; }

/* ===== Risk (Beta, risk.js, mockup-risk.html): affiliates' risk scores ===== */
.rk-beta { font-size: 11px; line-height: 16px; font-weight: 500; padding: 0 6px; border-radius: var(--radius); color: var(--accent); background: var(--accent-soft); letter-spacing: .3px; text-transform: uppercase; }
.rk-note { display: flex; gap: 12px; align-items: flex-start; background: var(--note-bg); border: 1px solid var(--note-line); border-radius: var(--radius); padding: 10px 12px; color: var(--note-text); font-size: 13px; line-height: 18px; }
.rk-note b { display: block; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.rk-note .ic { width: 28px; height: 28px; border-radius: 50%; background: var(--nav-active); display: grid; place-items: center; flex: none; }
.rk-note .ic .mi { color: var(--note-icon); margin: 0; font-size: 18px; }
.rk-note .linkbtn { display: block; padding: 4px 0 0; font-size: 13px; }
.rk-ctx { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: -4px; }
.rk-ctx .sub { color: var(--muted); font-size: 13px; }
.rk-ctx .linkbtn { display: inline-flex; align-items: center; gap: 4px; padding: 0; font-size: 14px; }
.rk-ctx .linkbtn .mi { font-size: 18px; margin: 0; }
.rk-tabs { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.rk-n { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 400; }
.rk-n.new { color: var(--on-count); background: var(--count); border-radius: var(--radius); padding: 0 6px; line-height: 16px; display: inline-block; font-weight: 500; }
.rk-score { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.rk-score .pillv { min-width: 38px; text-align: center; border: 1px solid var(--divider); background: var(--card); border-radius: var(--radius); font-weight: 600; font-size: 14px; line-height: 20px; padding: 1px 6px; color: var(--text); font-variant-numeric: tabular-nums; }
.rk-score.hi .pillv { color: var(--down); }
.rk-bar { width: 40px; height: 4px; border-radius: 2px; background: var(--gray-100); overflow: hidden; display: block; }
.rk-bar i { display: block; height: 100%; background: var(--faint); }
.rk-score.hi .rk-bar i { background: var(--down); }
.rk-bar.wide { width: 100%; height: 6px; border-radius: 3px; }
.rchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rchip { font-size: 12px; line-height: 16px; font-weight: 500; padding: 2px 7px; border-radius: var(--radius); background: var(--chip-bg); color: var(--neutral-text); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sig { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 16px; border-top: 1px solid var(--divider); }
.sig b { font-weight: 500; }
.sig .ev { grid-column: 1; font-size: 13px; line-height: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sig .w { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); font-size: 13px; text-align: right; }
.sig .w small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.sig.low b, .sig.low .w { color: var(--muted); }
.tq { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tq th { font-family: var(--font-head); font-weight: 500; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--text-table); text-align: right; padding: 8px; background: var(--head-pinned); border-top: 1px solid var(--divider); }
.tq th:first-child { text-align: left; padding-left: 16px; }
.tq td { padding: 8px; border-top: 1px solid var(--divider); text-align: right; color: var(--text-table); white-space: nowrap; }
.tq td:first-child { text-align: left; padding-left: 16px; white-space: normal; color: var(--text-2); }
.tq th:last-child, .tq td:last-child { padding-right: 16px; }
.tq td.bad { color: var(--down); font-weight: 600; }
.foot-note { padding: 8px 16px 12px; font-size: 13px; line-height: 18px; color: var(--muted); border-top: 1px solid var(--divider); }
.foot-note .linkbtn { padding: 0; font-size: 13px; }
textarea.ta { display: block; width: 100%; min-height: 64px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: 16px; color: var(--text); background: var(--card); resize: none; box-shadow: var(--shadow-sm); }
.rk-explain { font-size: 14px; line-height: 20px; color: var(--text); }
.cbx { display: flex; gap: 10px; align-items: flex-start; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: var(--text); }
.box20 { width: 20px; height: 20px; border-radius: var(--radius); border: 1px solid var(--disabled); background: var(--card); flex: none; display: grid; place-items: center; }
.box20.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.box20 .mi { font-size: 16px; margin: 0; }
.rk-steps p { margin: 0 0 10px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.rk-steps p b { color: var(--text); font-weight: 500; }
.srow .grow { flex: 1; min-width: 0; }
.srow .grow b { display: block; font-weight: 500; }
.srow .grow small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; }
.seg .rk-beta, .srow .rk-beta { margin-left: 6px; vertical-align: 1px; }
.rk-explain { display: flex; flex-direction: column; gap: 10px; }
.rk-explain p { margin: 0; }
.rk-xpart b { display: block; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.rk-xpart p, .rk-xpart li { color: var(--text-2); font-size: 14px; line-height: 20px; }
.rk-xpart ul { margin: 0; padding-left: 18px; }

/* ===== Duplicate accounts (dups.js, mockup-duplicates.html) ===== */
.dz-grp { display: block; width: 100%; padding: 0; border: 0; text-align: left; font: inherit; color: var(--text); margin-bottom: 10px; }
.dz-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px 8px; }
.dz-head .grow { flex: 1; min-width: 0; }
.dz-head b { display: block; font-weight: 500; }
.dz-head small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; }
.dz-head.big { padding-bottom: 6px; }
.dz-head.big b { font-size: 18px; line-height: 26px; }
.dz-st { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 16px 12px; }
.dz-acc { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--divider); width: 100%; }
.dz-acc.rowbtn { border-left: 0; border-right: 0; border-bottom: 0; background: none; font: inherit; text-align: left; color: var(--text); }
.dz-acc .av { width: 32px; height: 32px; font-size: 12px; }
.dz-acc .grow { flex: 1; min-width: 0; display: block; }
.dz-acc .grow b { color: var(--accent); font-weight: 500; }
.dz-acc .grow b small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
.dz-acc .co { display: block; font-size: 13px; line-height: 18px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-acc .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.dz-more { display: block; padding: 4px 16px 8px; font-size: 13px; color: var(--muted); }
.dz-foot { display: block; padding: 8px 16px 12px; border-top: 1px solid var(--divider); }
.dz-foot .rchips { margin-top: 0; }
.rchip.strong { background: var(--accent-soft); color: var(--accent); }
button.rchip { border: 0; font-family: inherit; }
.dz-tag { font-size: 11px; line-height: 16px; font-weight: 500; padding: 0 6px; border-radius: var(--radius); border: 1px solid var(--divider); color: var(--neutral-text); margin-left: 6px; vertical-align: 1px; }
.dz-co { display: block; padding: 10px 16px; border-top: 1px solid var(--divider); }
.dz-co b { font-weight: 500; }
.dz-co b small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
.dz-co .co { display: block; font-size: 13px; line-height: 18px; color: var(--text-2); }
.dz-explain { background: var(--note-bg); border: 1px solid var(--note-line); border-radius: var(--radius); padding: 10px 12px; color: var(--note-text); font-size: 13px; line-height: 18px; margin-bottom: 8px; }
.dz-explain .sub { display: block; margin-top: 6px; }
#dz-kinds .chip .cnt { margin-left: 6px; color: var(--muted); font-weight: 400; }
#dz-kinds .chip.on .cnt { color: var(--accent); }
/* Risk card "Why": one sign = what it means, this vs peers, how far, points */
/* the AI's own opinion in the risk card (ai.save_risk_opinion) */
.rk-ai-op { display: flex; align-items: center; gap: 12px; padding: 0 16px 8px; }
.rk-ai-op .n { font-size: 24px; line-height: 30px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-ai-op .n.hi { color: var(--down); }
.rk-ai-op .n small { font-size: 13px; color: var(--muted); font-weight: 500; }
.rk-ai-op b { font-weight: 500; font-size: 14px; line-height: 19px; }
.rk-ai-why { margin: 0; padding: 0 16px 10px 32px; font-size: 13px; line-height: 18px; color: var(--text-2); }
.rk-why { padding: 12px 16px; border-top: 1px solid var(--divider); }
.rk-why .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rk-why .top b { font-weight: 500; }
.rk-why .pts { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-why .pts small { font-weight: 400; color: var(--muted); font-size: 13px; }
.rk-why .means { font-size: 13px; line-height: 18px; color: var(--text-2); margin-top: 2px; }
.rk-why .cmp { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; margin-top: 8px; }
.rk-why .cmp span { display: flex; flex-direction: column; }
.rk-why .cmp small { font-size: 13px; line-height: 18px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.rk-why .cmp b { font-weight: 600; font-size: 16px; line-height: 22px; font-variant-numeric: tabular-nums; }
.rk-why .cmp b.bad { color: var(--down); }
.rk-why .cmp .x { font-size: 12px; line-height: 22px; color: var(--down); font-weight: 500; }
.rk-why .detail { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 6px; }
.rk-why.low .top b, .rk-why.low .cmp b.bad { color: var(--muted); }
.dz-tag.main { color: var(--accent); border-color: var(--sel-line); background: var(--accent-soft); }
.dz-tag.big { margin: 2px 0 0; flex: none; font-size: 12px; padding: 1px 6px; }
.dz-reason { margin: 0 16px 12px; padding: 8px 12px; border-radius: var(--radius); background: var(--gray-50); font-size: 13px; line-height: 18px; color: var(--text-2); }
.dz-reason b { display: block; font-weight: 500; color: var(--text); }
.dz-merge { display: flex; gap: 12px; align-items: flex-start; padding: 4px 4px 8px; }
.dz-merge > .mi { font-size: 22px; color: var(--accent); margin: 0; }
.dz-merge b { font-weight: 500; }
.dz-merge p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; line-height: 18px; }
.dz-co.main { background: var(--head-pinned); }
.dz-corow { display: flex; gap: 12px; align-items: flex-start; }
.dz-corow .box20 { margin-top: 2px; padding: 0; cursor: pointer; }
.dz-corow .grow { flex: 1; min-width: 0; }
.dz-accs { margin: 8px -16px -10px; }
.dz-grp .dz-acc { padding: 8px 16px; }
.dz-cotop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dz-cotop b { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dz-grp .dz-cotop { justify-content: flex-start; }
.dz-cnt { flex: none; font-size: 12px; line-height: 16px; font-weight: 600; padding: 1px 6px; border-radius: var(--radius); background: var(--gray-100); color: var(--text-2); font-variant-numeric: tabular-nums; }
.dz-cnt.many { background: var(--accent-soft); color: var(--accent); }
.dz-grp .dz-acc { align-items: center; }
.dz-cobody { flex: 1; min-width: 0; border: 0; background: none; padding: 0; font: inherit; text-align: left; color: var(--text); display: block; }
.dz-cobody .co { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.dz-why { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.dz-co.off .dz-cobody b, .dz-co.off .dz-cnt { color: var(--faint); }
.dz-chev { width: 16px; height: 16px; flex: none; margin-top: 2px; background: var(--icon-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z'/%3E%3C/svg%3E") center / 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z'/%3E%3C/svg%3E") center / 16px no-repeat; }
.dz-chev.up { transform: rotate(180deg); }
.dz-mainrow { padding: 8px 16px 4px; }
.rk-why .sign { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 6px; }
.rk-why .conf { display: block; font-size: 13px; line-height: 18px; color: var(--muted); font-style: italic; margin-top: 4px; }
/* a sheet's fixed parts never shrink (only the lists scroll): long texts in .srow overlapped (2026-10-08) */
.sheet-body > *:not(.sheet-list) { flex-shrink: 0; }
#sig-list { flex-shrink: 0; overflow: visible; }  /* Notifications: the program list sits among many rows, the sheet scrolls as a whole */
#pk-feats { flex-shrink: 0; overflow: visible; }  /* Package: the switches sat at 0 px under 4 inputs on a phone (2026-11-06) */
.cl-row .pk-feats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }  /* Packages: what each one switches on, under its price */
.srow.col { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--divider); }
.srow.col .seg { margin-left: 0; }
.rk-also { margin-top: 10px; }
.rk-also .h { font-size: 13px; line-height: 18px; color: var(--muted); margin-bottom: 4px; }
.rk-also table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.rk-also th { font-family: var(--font-head); font-weight: 500; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-table); text-align: right; padding: 4px 0 4px 8px; }
.rk-also td { padding: 4px 0 4px 8px; border-top: 1px solid var(--divider); text-align: right; white-space: nowrap; color: var(--text-table); }
.rk-also td:first-child, .rk-also th:first-child { text-align: left; padding-left: 0; white-space: normal; color: var(--text-2); }
.rk-also td.bad { color: var(--down); font-weight: 600; }
.rk-stake b.bad, .rk-lv .v.bad, .rk-money .bad, .rk-grp .s .bad { color: var(--down); }
/* Risk: a running check (spinner, step, bar) */
.rk-scan { display: flex; align-items: center; gap: 12px; background: var(--gray-50); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.rk-scan .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rk-scan b { font-weight: 500; color: var(--accent); }
.rk-scan small { font-size: 13px; line-height: 18px; color: var(--muted); }
.rk-spin { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); flex: none; animation: rk-spin .8s linear infinite; }
@keyframes rk-spin { to { transform: rotate(360deg); } }
.rk-prog { display: block; height: 4px; border-radius: 2px; background: var(--gray-100); overflow: hidden; margin-top: 6px; }
.rk-prog i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ===== messages from the owner (admin.js; mockup-messages.html) ===== */
.mp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.mp-quick .chip { height: 30px; padding: 4px 10px; font-size: 13px; }
.mp-quick .chip small { color: var(--muted); margin-left: 4px; font-weight: 400; font-size: 12px; }
.mp-quick .chip.on small { color: var(--accent); }
.ck { width: 20px; height: 20px; border-radius: var(--radius); border: 1px solid var(--disabled); background: var(--card); flex: none; display: grid; place-items: center; }
.ck .mi { font-size: 16px; margin: 0; color: transparent; }
.mp-row.on { background: var(--accent-soft); }
.mp-row.on .ck { background: var(--accent); border-color: var(--accent); }
.mp-row.on .ck .mi { color: var(--on-accent); }
.mp-tags { font-size: 12px; color: var(--muted); flex: none; }
.mp-bar { position: sticky; bottom: calc(var(--nav-h) + 8px); z-index: 3; display: flex; align-items: center; gap: 10px; background: var(--card); box-shadow: var(--shadow-md); border-radius: var(--radius); padding: 10px 12px; margin-top: 10px; }
.mp-bar .n { flex: 1; font-weight: 500; }
.mp-bar .n small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; line-height: 16px; }
.mc-to { display: flex; align-items: center; gap: 8px; padding: 0 16px 12px; }
.mc-to .pills { flex: 1; min-width: 0; flex-wrap: wrap; }  /* every recipient visible, none cut off (§21.3) */
.mc-to .pill { white-space: nowrap; }
.mc-fld { padding: 0 16px 12px; }
.mc-input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; font: inherit; font-size: 16px; color: var(--text); background: var(--card); outline: none; }
.mc-input:focus { border-color: var(--accent); box-shadow: var(--focus); }
.label .bad { color: var(--down); font-weight: 500; }
.mc-ai { margin: 0 14px 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--accent-soft); }
.mc-ai .label { color: var(--accent); }
.mc-ai .label .t { font-weight: 500; }
.mc-ai .label .mi { font-size: 16px; vertical-align: -3px; margin-right: 4px; }
.mc-ai textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font: inherit; font-size: 16px; background: var(--card); color: var(--text); resize: vertical; outline: none; }
.mc-ai textarea:focus { border-color: var(--accent); }
.mc-ai-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.mc-ai-row .sub { flex: 1; }
.mc-ai-row .btn-primary { padding: 6px 14px; display: inline-flex; align-items: center; }
.mc-switch { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; text-align: left; color: var(--text); }
.mc-switch .txt { flex: 1; font-size: 14px; font-weight: 500; }
.mc-switch .txt .mi { font-size: 18px; vertical-align: -4px; color: var(--icon-2); }
.mc-switch .txt .sub { display: block; font-weight: 400; margin-top: 2px; }
.mc-switch .sw, .row-sw .sw { height: 20px; border-radius: 10px; background: var(--disabled); position: relative; flex: none; margin-top: 2px; }
.mc-switch .sw::after, .row-sw .sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--on-color); }
.mc-switch .sw.on, .row-sw .sw.on { background: var(--accent); }
.mc-switch .sw.on::after, .row-sw .sw.on::after { left: auto; right: 2px; }
.ms-bar { height: 6px; border-radius: 3px; background: var(--gray-100); display: flex; overflow: hidden; margin: 6px 0 2px; }
.ms-bar i { display: block; height: 100%; }
.ms-bar .a { background: var(--up); }
.ms-bar .s { background: var(--bar-s); }
.ms-bar .d { background: var(--bar-d); }
.ms-bar .f { background: var(--down); }
.ms-ack { color: var(--up); font-weight: 500; }
.ms-seen { color: var(--text-table); }
.ms-bad { color: var(--down); font-weight: 500; }
.lg-main .m .mi, .ad-who .m .mi { font-size: 14px; vertical-align: -3px; margin-right: 3px; }
.ms-text { padding: 0 14px 4px; font-size: 14px; line-height: 20px; color: var(--text-table); white-space: pre-wrap; overflow-wrap: anywhere; }
.ms-text.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ms-more { padding: 0 14px 8px; }
.ms-sum { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--divider); }
.ms-sum.three { grid-template-columns: repeat(3, 1fr); }
.ms-sum div { padding: 12px 8px; text-align: center; }
.ms-sum div + div { border-left: 1px solid var(--divider); }
.ms-sum span { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.ms-sum b { font-size: 18px; font-weight: 600; color: var(--text); }
.mc-prev { margin-top: 10px; }
.mc-prev-body { padding: 10px 12px; border-radius: var(--radius); background: var(--gray-50); border: 1px solid var(--line); font-size: 14px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.mc-prev-body blockquote, .ms-text blockquote { margin: 4px 0; padding-left: 10px; border-left: 3px solid var(--accent); }
.mc-prev-body a, .ms-text a { color: var(--accent); }

/* risk card v2 (2026-10-09, mockup-risk-card-v2.html variant B): hero with two tiles, sticky tabs, bottom bar */
:root { --rk-i1: #174376; --rk-i2: #235EA5; --rk-i3: #3A8EF7; --rk-i4: #9DCCFA; --rk-i5: #CEE5FC; }
.rk-hero { padding: 14px 16px 12px; }
.rk-hero .top { display: flex; gap: 12px; align-items: center; }
.rk-hero .who { flex: 1; min-width: 0; }
.rk-hero .who b { display: block; font-size: 18px; line-height: 24px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-hero .who small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; }
.rk-hero .stline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 12px; line-height: 16px; color: var(--muted); }
.rk-duo { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.rk-tile { display: flex; flex-direction: column; align-items: flex-start; padding: 10px 12px; min-width: 0; text-align: left; border: 0; background: none; font: inherit; color: var(--text); }
.rk-duo > * + * { border-left: 1px solid var(--line); }
.rk-tile .lab { font-size: 12px; line-height: 16px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.rk-tile .lab .mi { font-size: 16px; margin: 0; }
.rk-tile .num { font-size: 28px; line-height: 34px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.rk-tile .num small { font-size: 13px; color: var(--muted); font-weight: 500; }
.rk-tile .num.hi { color: var(--down); }
.rk-tile .v { font-size: 13px; line-height: 17px; font-weight: 500; }
.rk-tile .w { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.rk-tile .up { color: var(--down); font-weight: 600; }
.rk-tile .dn { color: var(--up); font-weight: 600; }
.rk-tile .open { color: var(--accent); font-size: 13px; font-weight: 500; margin-top: 4px; }
.rk-sticky { position: sticky; top: var(--top-inset, 0px); z-index: 30; margin: 0 -16px; padding: 0 16px; background: var(--bg); }
.rk-utabs { display: flex; overflow-x: auto; scrollbar-width: none; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.rk-utabs::-webkit-scrollbar { display: none; }
.rk-utabs button { flex: 1 1 auto; border: 0; background: none; padding: 10px 6px 9px; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.rk-utabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.rk-utabs .cnt { margin-left: 4px; background: var(--count); color: var(--on-count); border-radius: var(--radius); font-size: 11px; padding: 0 5px; line-height: 16px; display: inline-block; font-weight: 600; }
.rk-pane { display: flex; flex-direction: column; gap: 12px; }
.rk-mix { padding: 12px 16px 4px; }
.rk-mix .mix-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rk-mix .mix-h b { font-weight: 500; font-size: 15px; }
.rk-sbar { display: flex; height: 8px; border-radius: 4px; background: var(--gray-100); overflow: hidden; margin: 8px 0 4px; gap: 2px; }
.rk-sbar i { display: block; height: 100%; }
.rk-reason { display: grid; grid-template-columns: 10px 1fr auto 16px; gap: 0 10px; align-items: center; width: 100%; padding: 9px 16px; border: 0; border-top: 1px solid var(--divider); background: none; text-align: left; font: inherit; color: var(--text); }
.rk-reason.more { grid-template-columns: 1fr auto; }
.rk-reason.more .sub { font-size: 13px; }
.rk-reason:active { background: var(--gray-50); }
.rk-reason .sq, .rk-idea .sq { width: 10px; height: 10px; border-radius: 2px; }
.rk-reason .t { min-width: 0; }
.rk-reason .t b { display: block; font-weight: 500; font-size: 14px; line-height: 19px; }
.rk-reason .t small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--text-2); font-size: 13px; line-height: 18px; overflow: hidden; margin-top: 1px; }
.rk-reason .t small .bad { font-weight: 600; }
.rk-reason .p, .rk-idea .ih .p { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.rk-reason .p small, .rk-idea .ih .p small { color: var(--muted); font-weight: 400; font-size: 13px; }
.rk-reason .mi, .rk-idea .ih .mi { color: var(--icon-2); font-size: 16px; margin: 0; }
.rk-idea { border-top: 1px solid var(--divider); }
.rk-idea .ih { display: grid; grid-template-columns: 10px 1fr auto 18px; gap: 0 10px; align-items: center; width: 100%; padding: 12px 16px; border: 0; background: none; text-align: left; font: inherit; color: var(--text); }
.rk-idea .ih b { font-weight: 500; }
.rk-idea .ib { padding: 0 16px 12px 36px; }
.rk-idea .means { font-size: 13px; line-height: 18px; color: var(--text-2); }
.rk-idea .sign { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 8px; text-transform: uppercase; letter-spacing: .3px; }
.rk-vs { margin-top: 6px; }
.rk-vs .row { display: grid; grid-template-columns: 88px 1fr auto; gap: 8px; align-items: center; padding: 3px 0; font-size: 13px; color: var(--text-2); }
.rk-vs .bar { height: 8px; border-radius: 4px; background: var(--gray-100); overflow: hidden; }
.rk-vs .bar i { display: block; height: 100%; background: var(--faint); }
.rk-vs .row.me .bar i { background: var(--down); }
.rk-vs .row b { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text); text-align: right; white-space: nowrap; }
.rk-vs .row.me b { color: var(--down); }
.rk-idea .times { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--down); }
.rk-idea .peerline { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.rk-idea .conf { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; color: var(--wait-text); margin-top: 6px; }
.rk-idea .conf .mi { font-size: 14px; margin: 0; }
.rk-idea .rk-also { margin-top: 10px; }
.rk-whysum { padding: 12px 16px; font-size: 13px; line-height: 18px; color: var(--text-2); border-top: 1px solid var(--divider); background: var(--gray-50); border-radius: 0 0 var(--radius) var(--radius); }
.rk-whysum b { font-weight: 500; color: var(--text); }
.rk-whysum .linkbtn { font-size: 13px; padding: 0; }
.rk-empty-ai { padding: 0 16px 12px; font-size: 13px; line-height: 18px; color: var(--text-2); }
.rk-empty-ai b { font-weight: 500; }
.rk-xbox { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--divider); }
.rk-xbox > b { font-weight: 500; }
.rk-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.rk-tiles div { padding: 10px 8px; text-align: center; min-width: 0; }
.rk-tiles div + div { border-left: 1px solid var(--line); }
.rk-tiles span { display: block; font-size: 11px; line-height: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-tiles b { display: block; font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.rk-tiles b.bad { color: var(--down); }
.rk-tiles + .tq th { border-top: 0; }
.rk-subh { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 6px; font-weight: 500; font-size: 14px; border-top: 1px solid var(--divider); }
.rk-subh .sub { font-weight: 400; }
.rk-shares { padding: 4px 16px 10px; }
.rk-shares .h { font-size: 13px; color: var(--muted); padding: 8px 0 4px; text-transform: uppercase; letter-spacing: .3px; }
.rk-shares .r { display: grid; grid-template-columns: 92px 1fr 44px; gap: 8px; align-items: center; padding: 3px 0; font-size: 13px; color: var(--text-2); }
.rk-shares .r span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-shares .bar { height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.rk-shares .bar i { display: block; height: 100%; background: var(--rk-i3); }
.rk-shares .r b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text); }
.rk-mtabs { display: flex; gap: 4px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.rk-mtabs::-webkit-scrollbar { display: none; }
.rk-mtabs button { border: 0; background: none; border-radius: var(--radius); padding: 4px 10px; font: inherit; font-size: 13px; font-weight: 500; color: var(--text-2); min-height: 32px; white-space: nowrap; flex: none; }
.rk-mtabs button.on { background: var(--accent-soft); color: var(--accent); }
.rk-mchart { padding: 8px 16px 4px; }
.rk-mchart svg { display: block; width: 100%; height: auto; font-family: inherit; }
.tq.rk-tight th, .tq.rk-tight td { padding-left: 5px; padding-right: 5px; }
.tq.rk-tight th:first-child, .tq.rk-tight td:first-child { padding-left: 16px; white-space: nowrap; }
.tq.rk-tight th:last-child, .tq.rk-tight td:last-child { padding-right: 16px; }
.rk-spark { padding: 0 16px; }
.rk-spark svg { display: block; width: 100%; height: 48px; margin-top: 4px; }
.tl-ev.mark .dot { border-color: var(--accent); }
.rk-notebox { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.rk-notebox .row { display: flex; justify-content: space-between; align-items: center; }
/* the bottom nav is 60px + the phone's safe area (iPhone home bar): floating bars keep 12px above it */
:root { --nav-h: calc(60px + env(safe-area-inset-bottom)); }
.rk-bbar { position: sticky; bottom: calc(var(--nav-h) + 12px); z-index: 20; display: flex; gap: 10px; background: var(--card); border-radius: 10px; box-shadow: var(--float-shadow); padding: 10px; margin: 8px 0 4px; }
.rk-bbar .btn-primary { flex: 1; min-height: 44px; }
.rk-bbar .stbtn { min-height: 44px; flex: none; max-width: 46%; }
.rk-bbar .stbtn .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-stsheet { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.rk-stsheet #rk-picks { display: flex; flex-direction: column; gap: 8px; }
.rk-stsheet .row { display: flex; gap: 8px; }
.rk-stsheet .row .btn-primary { flex: 1; }
.rk-rcard { display: grid; grid-template-columns: 36px 1fr 20px; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-align: left; width: 100%; font: inherit; color: var(--text); }
.rk-rcard .ri { width: 36px; height: 36px; border-radius: 50%; background: var(--gray-100); display: grid; place-items: center; color: var(--text-2); }
.rk-rcard .ri .mi { font-size: 20px; margin: 0; }
.rk-rcard b { display: block; font-weight: 500; }
.rk-rcard small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; }
.rk-rcard .rd { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); }
.rk-rcard.on { background: var(--accent-soft); border-color: var(--sel-line); }
.rk-rcard.on .rd { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--card), 0 0 0 3px var(--accent-hover); }
.rk-rcard.danger b { color: var(--down); }
.rk-pbody { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.rk-months { display: flex; flex-wrap: wrap; gap: 6px; }
.rk-months button { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 4px 10px; font: inherit; font-size: 13px; font-weight: 500; color: var(--text-2); min-height: 34px; }
.rk-months button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--sel-line); }
.rk-pbody .btn-primary:disabled { opacity: .45; }
.rk-prow { display: grid; grid-template-columns: 1fr auto 16px; gap: 0 10px; align-items: center; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); background: none; text-align: left; font: inherit; color: var(--text); }
.rk-prow .t b { display: block; font-weight: 500; }
.rk-prow .t small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.rk-prow .mi { color: var(--icon-2); font-size: 16px; margin: 0; }
.rk-psheet { padding: 4px 0 0; }
.rk-psheet .rk-idea:first-of-type { border-top: 0; }

/* Admin › People v2 (mockup-admin-people-v2.html): last seen on the right, feature badges, Select, the Features sheet */
.ad-prow { align-items: flex-start; }
.ad-prow .go { align-self: center; color: var(--faint); }
.ad-prow .ck { margin-top: 10px; }
.ad-prow .ad-right { min-width: 64px; padding-top: 1px; }
.ad-right .when { display: block; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text); white-space: nowrap; }
.ad-right .when.online { color: var(--up); }
.ad-right .when.old { color: var(--muted); font-weight: 400; }
.ad-right .bal { display: block; font-size: 13px; line-height: 18px; margin-top: 2px; }
.ad-right .bal .low { color: var(--wait-text); font-weight: 500; }
.ad-feats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ad-ft { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--radius); font-size: 11px; line-height: 18px; font-weight: 500; color: var(--accent); box-shadow: inset 0 0 0 1px var(--tag-line); }
.ad-ft.off { color: var(--down); box-shadow: inset 0 0 0 1px var(--tag-off-line); }
.ad-plbar .ad-sort { margin: 0; }
.ad-selhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.ad-selhead:empty { display: none; }
.ad-selhead .sub { font-size: 13px; }
#adm-body .sel-bar { margin-top: 10px; }
.ad-fsec { padding: 12px 16px; border-top: 1px solid var(--divider); }
.ad-fsec:first-child { border-top: 0; }
.ad-fsec .t { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
.ad-fsec .t .mi { font-size: 20px; color: var(--text-2); margin: 0; }
.ad-fsec .t .cnt { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--muted); }
.ad-seg.three { grid-template-columns: repeat(3, 1fr); margin: 8px 0 0; }
.ad-seg.three button.on.off { color: var(--down); background: var(--off-bg); }
.ad-tell { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); background: var(--gray-50); font: inherit; font-size: 14px; text-align: left; color: var(--text); }
.ad-tell .ck { margin-top: 1px; }
.ad-tell.on .ck { background: var(--accent); border-color: var(--accent); }
.ad-tell.on .ck .mi { color: var(--on-accent); }
.ad-tell .sub { margin-top: 2px; font-size: 13px; line-height: 18px; }
#adm-applied:empty { display: none; }

/* risk list v2 (2026-10-09, mockup-risk-list-b.html + the quick marks of A) */
.rk-ovh { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px 0; }
.rk-ovh b { display: block; font-weight: 500; font-size: 15px; }
.rk-ovh .sub { display: block; margin-top: 1px; }
.rk-ovh .linkbtn { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex: none; padding: 10px 0; margin: -10px 0; font-size: 14px; }
.rk-ovh .linkbtn:disabled { color: var(--faint); }
.rk-ovh .linkbtn .mi { font-size: 16px; margin: 0; }
#rk-ov .rk-ctx, #rk-ov #rk-ctx { margin: 0; }
#rk-ov .rk-scan { margin: 10px 16px 0; }
.rk-ovbig { display: flex; align-items: baseline; gap: 6px; padding: 10px 16px 0; flex-wrap: wrap; }
.rk-ovbig .n { font-size: 24px; line-height: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rk-ovbig .t { color: var(--text-2); font-size: 13px; }
.rk-dist { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin: 8px 16px 0; background: var(--gray-100); }
.rk-dist i { display: block; height: 100%; }
.rk-lv { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 16px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.rk-lv button { border: 0; background: none; padding: 8px 10px; text-align: left; min-width: 0; font: inherit; color: var(--text); }
.rk-lv button + button { border-left: 1px solid var(--line); }
.rk-lv button.on { background: var(--accent-soft); }
.rk-lv button.on .l { color: var(--accent); }
.rk-lv .l { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; }
.rk-lv .l i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.rk-lv .v { display: block; font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rk-stake { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 12px; border-top: 1px solid var(--divider); }
.rk-stake > div { padding: 10px 16px; min-width: 0; display: flex; flex-direction: column; }
.rk-stake > div + div { border-left: 1px solid var(--divider); }
.rk-stake .l { font-size: 12px; line-height: 16px; color: var(--muted); }
.rk-stake b { font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-path { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px 4px; border-top: 1px solid var(--divider); }
.rk-path b { font-weight: 500; font-size: 14px; }
.rk-pat { display: grid; grid-template-columns: 18px 1fr 56px 30px; gap: 0 8px; align-items: center; width: 100%; padding: 7px 16px; border: 0; background: none; text-align: left; font: inherit; color: var(--text); }
.rk-pat:active { background: var(--gray-50); }
.rk-pat.on { background: var(--accent-soft); }
.rk-pat.on .t { color: var(--accent); }
.rk-pat .mi { font-size: 16px; color: var(--icon-2); margin: 0; }
.rk-pat .t { font-weight: 500; font-size: 13px; line-height: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pat .bar { height: 6px; border-radius: 3px; background: var(--gray-100); overflow: hidden; }
.rk-pat .bar i { display: block; height: 100%; background: var(--accent); }
.rk-pat .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }
.rk-patmore { display: flex; justify-content: space-between; padding: 6px 16px 12px; }
.rk-patmore .linkbtn { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; padding: 0; }
.rk-patmore .linkbtn .mi { font-size: 16px; margin: 0; }
.rk-fold { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 8px 16px 12px; text-align: left; font: inherit; font-size: 13px; color: var(--text-2); }
.rk-fold b { font-weight: 600; color: var(--text); }
.rk-fold b.bad { color: var(--down); }
.rk-fold .mi { color: var(--icon-2); margin: 0; }
.rk-note.rk-note-sm { padding: 8px 12px; font-size: 13px; line-height: 18px; }
.rk-note.rk-note-sm b { display: inline; margin: 0; }
.rk-note.rk-note-sm .linkbtn { display: inline; padding: 0; font-size: 13px; }
.rk-listcard { overflow: hidden; }
.rk-stabs { box-shadow: none; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--divider); }
.rk-stabs .c { margin-left: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
.rk-listcard .listbar { padding: 8px 16px; border-bottom: 1px solid var(--divider); margin: 0; }
.rk-row2 { display: grid; grid-template-columns: 44px 1fr; gap: 0 12px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--divider); cursor: pointer; }
.rk-row2:first-child { border-top: 0; }
.rk-row2:active { background: var(--gray-50); }
.rk-row2 .sc { text-align: center; padding-top: 1px; }
.rk-row2 .sc b { display: block; font-size: 24px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rk-row2 .sc b.hi { color: var(--down); }
.rk-row2 .sc small { display: block; font-size: 10px; line-height: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; margin-top: 2px; }
.rk-row2 .mid { min-width: 0; display: block; }
.rk-row2 .nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rk-row2 .nm b { font-weight: 500; font-size: 15px; line-height: 20px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rk-row2 .nm small { color: var(--muted); font-size: 13px; flex: none; }
.rk-row2 .nm .status { margin-left: auto; flex: none; }
.rk-row2 .why { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: 13px; line-height: 18px; color: var(--text); }
.rk-row2 .why em { font-style: normal; font-weight: 600; white-space: nowrap; }
.rk-row2 .meta { margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.rk-row2 .meta .idea { display: inline-flex; align-items: center; gap: 3px; min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; }
.rk-row2 .meta .idea .it { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.rk-row2 .meta .idea .rk-more { flex: none; margin-left: 2px; }
.rk-row2 .meta .idea .mi { font-size: 14px; margin: 0; }
.rk-row2 .tr { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.rk-row2 .tr svg { display: block; width: 56px; height: 22px; }
.rk-row2 .tr .ch { font-size: 13px; line-height: 18px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 26px; text-align: right; }
.rk-row2 .tr .ch.up { color: var(--down); }
.rk-row2 .tr .ch.dn { color: var(--up); }
.rk-row2 .tr .ch.eq { color: var(--muted); font-weight: 500; }
.rk-row2 .tr .per { font-size: 13px; line-height: 18px; color: var(--muted); }
.rk-row2 .rk-money { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--muted); }
.rk-qm { display: flex; gap: 6px; margin-top: 8px; }
.rk-qm button { flex: 1 1 0; justify-content: center; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 3px 6px; font: inherit; font-size: 12px; font-weight: 500; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; min-height: 34px; }
.rk-qm button .mi { font-size: 15px; margin: 0; }
.rk-qm button.danger { color: var(--down); }
.rk-qm button:active { background: var(--accent-soft); }
.rk-foot { padding: 10px 16px; border-top: 1px solid var(--divider); text-align: center; }
/* Risk list C (2026-10-10, mockup-risk-list-c.html): scope line, quick filters, suggestions, company / manager, groups */
.rk-scope { display: flex; gap: 10px; align-items: flex-start; background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; line-height: 18px; color: var(--text-2); }
.rk-scope .mi { color: var(--accent); font-size: 18px; margin: 1px 0 0; }
.rk-scope b { color: var(--text); font-weight: 600; }
.rk-qf { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -4px -16px 0; padding: 0 16px; }
.rk-qf::-webkit-scrollbar { display: none; }
.rk-qf button { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 4px 8px 4px 10px; font: inherit; font-size: 13px; font-weight: 500; color: var(--text-2); display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; min-height: 34px; max-width: 220px; }
.rk-qf button .mi { font-size: 16px; color: var(--icon-2); margin: 0; }
.rk-qf button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--sel-line); }
.rk-qf button.on .mi { color: var(--accent); }
.rk-qf:empty { display: none; }
.rk-sugg { background: var(--card); box-shadow: var(--shadow-md, var(--shadow)); border-radius: var(--radius); margin-top: -6px; overflow: hidden; }
.rk-sugg button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 9px 12px; text-align: left; font: inherit; font-size: 14px; color: var(--text); border-top: 1px solid var(--divider); }
.rk-sugg button:first-child { border-top: 0; }
.rk-sugg button:active { background: var(--gray-50); }
.rk-sugg .mi { color: var(--icon-2); margin: 0; }
.rk-sugg .k { color: var(--muted); font-size: 12px; width: 62px; flex: none; }
.rk-sugg .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-sugg .t small, .rk-pick small { color: var(--muted); font-size: 13px; }
.rk-sugg .n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.applied .rk-clear { font-size: 13px; padding: 0 4px; }
.rk-lbl { display: flex; gap: 14px; align-items: center; min-width: 0; }
.rk-lbl .sortline-btn { flex: none; max-width: none; overflow: visible; }
.rk-row2 .rk-who { display: flex; gap: 12px; margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--text-2); min-width: 0; }
.rk-row2 .rk-who > span { display: inline-flex; align-items: center; gap: 3px; min-width: 0; flex: 0 1 auto; }
.rk-row2 .rk-who .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rk-row2 .rk-who .mi { font-size: 14px; color: var(--icon-2); margin: 0; }
.rk-row2 .rk-who .co { color: var(--accent); }
.rk-grp { display: flex; align-items: center; gap: 8px; padding: 8px 16px; min-height: 52px; background: var(--gray-50); border-top: 1px solid var(--divider); cursor: pointer; }
.rk-grp.open .l .t { color: var(--accent); }
.rk-grp:first-child { border-top: 0; }
.rk-grp > .mi { color: var(--icon-2); font-size: 20px; margin: 0; }
.rk-grp .l { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-grp .l .t { font-weight: 500; font-size: 13px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-grp .s { color: var(--muted); font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-grp .s b { color: var(--down); font-weight: 600; }
.rk-grp .linkbtn { font-size: 13px; flex: none; }
.rk-pick { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex: none; }
.rk-pick .ps { position: relative; border-bottom: 1px solid var(--divider); }
.rk-pick .ps .mi { position: absolute; left: 10px; top: 10px; color: var(--muted); margin: 0; }
.rk-pick .ps input { width: 100%; height: 40px; border: 0; padding: 0 10px 0 34px; font: inherit; font-size: 16px; color: var(--text); background: var(--card); }
.rk-pick label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 14px; border-top: 1px solid var(--divider); cursor: pointer; }
.rk-pick label:first-child { border-top: 0; }
.rk-pick label .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pick label .n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rk-pick input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; }

/* Motion (2026-10-19, DESIGN.md from the skill smooth-mobile-ui; the owner: «плавная, чёткая, юркая»): soft,
   Telegram / iOS-like, things follow the finger and land gently. Only opacity / transform; no ease-in; tokens only.
   "Reduce motion" on the phone turns the movement off (the rules live inside this media query), fades stay */
:root {
  --ease: cubic-bezier(.2, 0, 0, 1);          /* moving on screen */
  --ease-out: cubic-bezier(.05, .7, .1, 1);   /* entering: fast start, soft landing */
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);/* a sheet leaving: no slow start, a flick carries on */
  --ease-spring: cubic-bezier(.05, .7, .1, 1); /* the toast; no overshoot since the review of 2026-10-22 (no bounce) */
  --ease-glide: cubic-bezier(.2, 0, 0, 1);    /* a plate travelling between options; no overshoot since 2026-10-22 */
  --ease-swipe: cubic-bezier(.25, .7, .2, 1); /* a page landing after a swipe */
  --t-1: 120ms; --t-2: 200ms; --t-3: 300ms; --t-glide: 200ms; --t-4: 420ms;
}
/* the sheet's grab bar (drag it down to close, app.js sheetDrag); on the head's top padding, the head keeps its height */
.sheet-head { position: relative; touch-action: none; }
.sheet-grab { position: absolute; top: 5px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--disabled); pointer-events: none; }
.sheet.dragging, .sheet.dragging ~ .sheet-back, .sheet-back.dragging { transition: none !important; }
/* the segmented controls: one plate under the chosen option (app.js placeSegPlates) */
.seg.has-plate { position: relative; }
.seg.has-plate button { position: relative; z-index: 1; }
.seg.has-plate button.on { background: none; box-shadow: none; }
.seg-plate { position: absolute; left: 0; top: 0; border-radius: var(--radius); background: var(--accent-soft); box-shadow: var(--shadow-sm); pointer-events: none; }
/* a tab's page moving under the finger (app.js tab swipe) */
#app.swiping { will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  /* sheets rise softly and leave quicker; the backdrop fades with them */
  .sheet { transform: translateY(105%); transition: transform var(--t-2) var(--ease-drawer), visibility 0s linear var(--t-2); }
  .sheet.open { transform: none; transition: transform var(--t-3) var(--ease-out), visibility 0s; }
  .sheet-body.swap { animation: rf-fade var(--t-2) var(--ease); }  /* one sheet replaced by the next (a picker from Filters) */
  .sheet-back { display: block; opacity: 0; visibility: hidden; transition: opacity var(--t-2) var(--ease), visibility 0s linear var(--t-2); }
  .sheet-back.open { opacity: 1; visibility: visible; transition: opacity var(--t-3) var(--ease-out), visibility 0s; }
  /* the toast springs up 20px and fades in; it leaves in 150ms with no bounce */
  .toast { transform: translate(-50%, 20px); transition: opacity 150ms var(--ease), transform 150ms var(--ease); }
  .toast.show { transform: translate(-50%, 0); transition: opacity var(--t-2) var(--ease-out), transform var(--t-3) var(--ease-spring); }
  .content { overflow-x: clip; }  /* a block coming in from the side never widens the page (the page and the nav would shift) */
  /* the bottom nav plate travels under the chosen icon (app.js placeNavInd); screens come in once (app.js enterAnim) */
  .nav.has-ind button.on svg { background: none; box-shadow: none; }
  .nav-ind { position: absolute; left: 0; top: 0; border-radius: var(--radius); background: var(--nav-active); box-shadow: var(--nav-shadow); pointer-events: none; transition: transform var(--t-glide) var(--ease-glide); }
  .nav button svg { position: relative; z-index: 1; }
  .seg-plate { transition: transform var(--t-glide) var(--ease-glide); }
  /* a list that arrives after waiting (a tab, a brand, a filter, a search): the rows fade in, no movement */
  .soft-in { animation: rf-fade var(--t-2) var(--ease) both; }
  /* the dark selection bar (Select mode) and the floating action bars rise when they appear */
  .sel-bar.anim, .rk-bbar.anim, .fee-send.anim, .mp-bar.anim { animation: rf-up var(--t-3) var(--ease-out) both; }
  /* a fold opened by the user: the chevron turns, the content fades down 6px */
  .pay-where summary .fold { transition: transform var(--t-2) var(--ease); }
  .pay-where[open] > :not(summary) { animation: rf-down var(--t-2) var(--ease-out); }
  /* the scan progress fills from the left */
  .rk-prog i { transition: transform var(--t-4) var(--ease); }

  /* a tap answers at once: buttons press in, rows dim, colours change smoothly */
  .btn-primary, .btn-light, .btn, .chip, .seg button, .act, .fbtn, .rk-qm button, .rk-qf button, .sheet-x, .icotog button, .ad-seg button {
    transition: transform var(--t-1) var(--ease), background-color var(--t-2) var(--ease), color var(--t-2) var(--ease), box-shadow var(--t-2) var(--ease);
  }
  .btn-primary:active:not(:disabled), .btn-light:active:not(:disabled), .btn:active:not(:disabled), .chip:active, .seg button:active,
  .act:active, .fbtn:active, .rk-qm button:active, .rk-qf button:active, .icotog button:active, .ad-seg button:active, .sheet-x:active { transform: scale(.96); }
  .lrow, .mi-row, .rows .r, .list .row, .tile, .tab, .nav button, .nav svg { transition: background-color var(--t-2) var(--ease), color var(--t-2) var(--ease), border-color var(--t-2) var(--ease), opacity var(--t-1) var(--ease); }
  .lrow:active, .mi-row:active, .rows .r:active, .list .row:active { opacity: .72; }
  .nav button:active svg { transform: scale(.92); transition: transform var(--t-1) var(--ease); }
  /* waiting blocks shimmer instead of standing still */
  .skeleton { background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%); background-size: 200% 100%; animation: rf-shimmer 1.3s linear infinite; }
}
@keyframes rf-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rf-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes rf-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes rf-fade { from { opacity: 0; } to { opacity: 1; } }

@keyframes rf-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Notifications › a watched program's "Affiliates of" line (openTeam) */
.sheet-list button.sig-team { min-height: 44px; padding: 10px 16px 10px 32px; justify-content: flex-start; gap: 8px; background: var(--accent-soft); border-top: 1px solid var(--note-line); font-weight: 500; }
.sheet-list button.sig-team .mi { font-size: 18px; color: var(--accent); }
.sheet-list button.sig-team .mi:last-child { color: var(--muted); margin-left: auto; }
.sheet-list button.sig-team .lbl { color: var(--muted); font-weight: 400; flex: none; }
.sheet-list button.sig-team .item { color: var(--accent); }
.sheet-list button.sig-team.gone .mi:first-child { color: var(--warn); }
.sheet-list button.sig-team.gone .item { color: var(--wait-text); }

/* Help us test (feedback.js, mockup-feedback.html, 2026-10-13) */
.grow { flex: 1; min-width: 0; }
.fb-row { display: flex; align-items: center; gap: 12px; }
.fb-row small, .fb-task small, .fb-part small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; line-height: 18px; }
.fb-row small b { color: var(--text); font-weight: 500; }
.fb-tabs { margin: -4px -16px 0; }
.fb-card { padding: 14px 16px; text-align: left; width: 100%; color: var(--text); font: inherit; }
.fb-card b { font-weight: 600; }
.fb-ic, .fb-ok { color: var(--accent); }
.fb-pts { font-weight: 600; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fb-go { display: inline-flex; align-items: center; }
.fb-hero { padding: 14px 16px; }
.fb-hero b { font-weight: 600; }
.fb-lvl { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.fb-lvl .mi { font-size: 26px; }
.fb-stats { display: flex; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--divider); }
.fb-stats div { flex: 1; text-align: center; }
.fb-stats b { display: flex; justify-content: center; align-items: center; gap: 2px; font-size: 18px; line-height: 24px; font-variant-numeric: tabular-nums; }
.fb-stats .mi { font-size: 18px; color: var(--accent); }
.fb-stats small { color: var(--muted); font-weight: 400; font-size: 13px; }
.fb-sec { display: flex; align-items: center; justify-content: space-between; margin-bottom: -8px; font: 500 12px/16px Oswald, var(--font); text-transform: uppercase; letter-spacing: .02em; color: var(--text-2); }
.fb-sec .linkbtn { font-family: var(--font); text-transform: none; letter-spacing: 0; font-size: 14px; display: inline-flex; align-items: center; gap: 2px; }
.fb-sec .linkbtn .mi { font-size: 18px; }
.ad-seg.fb-per { margin: 0; }
.fb-list { overflow: hidden; }
.fb-task { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); background: none; width: 100%; text-align: left; font: inherit; color: var(--text); }
.fb-task:first-child { border-top: 0; }
.fb-task .t { display: block; font-weight: 500; }
.fb-task small .mi { font-size: 14px; vertical-align: -2px; }
.fb-task.done .t { color: var(--muted); text-decoration: line-through; }
.fb-task.done .fb-pts, .fb-task.failed .fb-pts { color: var(--muted); }
.fb-ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--disabled); flex: none; display: grid; place-items: center; margin-top: 1px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.fb-ck .mi { font-size: 16px; }
.fb-task.done .fb-ck { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.fb-task.failed .fb-ck { border-color: var(--faint); color: var(--muted); }
.fb-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-badge { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: var(--radius); border: 1px dashed var(--disabled); color: var(--muted); font-size: 13px; }
.fb-badge .mi { font-size: 16px; }
.fb-badge.on { border: 0; background: var(--accent-soft); color: var(--accent); }
.fb-sheet { display: flex; flex-direction: column; gap: 14px; padding: 4px 16px 16px; }
.fb-sheet > b { font-weight: 600; margin-bottom: -6px; }
.fb-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fb-meta .chip { height: 32px; padding: 6px 10px; font-size: 13px; }
.fb-note { display: flex; gap: 8px; padding: 10px 12px; border-radius: var(--radius); background: var(--accent-soft); color: var(--text-2); font-weight: 400; font-size: 13px; line-height: 18px; }
.fb-note .mi { font-size: 18px; color: var(--accent); }
.fb-note b { color: var(--text); font-weight: 500; }
.fb-btns { display: flex; gap: 8px; }
.fb-btns button { flex: 1; min-height: 44px; }
.fb-chips, .fb-why .chips, .fb-q .chips { gap: 6px; }
.fb-chips .chip, .fb-why .chip, .fb-q .chip { border: 1px solid var(--line); background: var(--card); }
.fb-chips .chip.on, .fb-why .chip.on, .fb-q .chip.on { border-color: transparent; background: var(--accent-soft); }
.fb-big { text-align: center; padding: 6px 0; }
.fb-big .mi { font-size: 40px; color: var(--accent); }
.fb-big b { display: block; font-size: 28px; line-height: 36px; font-weight: 600; color: var(--accent); }
.fb-big small { color: var(--muted); font-weight: 400; }
.fb-rate { display: flex; gap: 6px; }
.fb-rate button { flex: 1; min-width: 0; height: 44px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--text-2); font: inherit; font-weight: 500; }
.fb-rate button.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.fb-rate .fb-nu { flex: 2.4; font-size: 13px; }
.fb-rl { display: flex; justify-content: space-between; margin-top: -8px; }
.fb-rl small { color: var(--muted); font-weight: 400; font-size: 13px; }
.fb-sheet .btn-light { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; }
.fb-opts { display: flex; flex-direction: column; gap: 6px; }
.fb-opt { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; text-align: left; }
.fb-opt .mi { font-size: 16px; color: var(--accent); }
.fb-opt.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.fb-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--disabled); flex: none; }
.fb-opt.on .fb-radio { border: 5px solid var(--accent); }
.fb-prog small { color: var(--muted); font-weight: 400; font-size: 13px; }
.fb-prog .ad-track { margin-top: 6px; }
.fb-why { display: flex; flex-direction: column; gap: 6px; }
.fb-why small { color: var(--muted); font-weight: 400; font-size: 13px; }
.fb-qs { padding: 4px 16px; }
.fb-q, .fb-qres { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--divider); }
.fb-q:first-child, .fb-qres:first-child { border-top: 0; }
.fb-q b, .fb-qres b { font-weight: 600; }
.fb-q b small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
.fb-nav { padding-bottom: 8px; }
.fb-tablewrap { overflow-x: auto; padding: 4px 8px; }
.fb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fb-table th { font: 500 12px/16px Oswald, var(--font); text-transform: uppercase; color: var(--text-2); text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--divider); }
.fb-table td { padding: 8px 6px; border-bottom: 1px solid var(--divider); font-weight: 400; vertical-align: top; }
.fb-table tr:last-child td { border-bottom: 0; }
.fb-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.fb-table td.n { font-weight: 600; }
.fb-table small { color: var(--muted); }
.fb-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 400; }
.fb-bar .ad-track.sm { width: 90px; margin-top: 0; flex: none; }
.fb-bar b { width: 24px; text-align: right; font-variant-numeric: tabular-nums; }
.ad-tiles.fb-tiles { border-radius: var(--radius); box-shadow: var(--shadow); border-top: 0; }

/* ---------- Admin > AI > Map (the AI requests map, 2026-10-14, mockup-ai-map.html) ---------- */
.am-seg { display: flex; }
.am-seg button { flex: 1; }
.am-sum { grid-template-columns: repeat(4, 1fr); padding-top: 12px; }
.am-note { font-size: 13px; color: var(--muted); padding: 0 2px 8px; }
.am-buckets { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.am-stack { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--c-grid); }
.am-stack i { display: block; height: 100%; }
.am-bl { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.am-bl span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; background: var(--c); }
.am-head { display: flex; justify-content: space-between; padding: 12px 16px 4px; font: 500 12px/16px Oswald, sans-serif;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.am-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; width: 100%;
  padding: 9px 16px; border: 0; border-top: 1px solid var(--divider); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.am-row:first-of-type { border-top: 0; }
.am-head + .am-row { border-top: 0; }
.am-nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.am-nm span:not(.am-new) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-nm .mi { font-size: 16px; color: var(--muted); }
.am-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.am-v { text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.am-v b { color: var(--text); font-weight: 600; }
.am-t { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--c-grid); overflow: hidden; }
.am-t i { display: block; height: 100%; }
.am-new { background: var(--count); color: var(--on-count); font-size: 11px; font-weight: 600; border-radius: 9px; padding: 0 6px; line-height: 16px; flex: none; }
.am-sheet { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
/* Admin › AI › Costs (2026-10-19, mockup-ai-costs.html variant A) */
.am-sub { grid-column: 1 / -1; margin-top: -2px; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
div.am-row { cursor: default; }
.ac-by { margin: 0; }
.ac-by button { font-size: 13px; }
.ac-note { display: flex; gap: 6px; align-items: flex-start; padding-bottom: 0; }
.ac-note .mi { font-size: 16px; }
.ac-days { display: flex; align-items: flex-end; gap: 2px; height: 56px; padding: 4px 16px 12px; }
.ac-days i { flex: 1; min-width: 0; background: var(--accent); border-radius: 2px 2px 0 0; }
.ac-days i.z { background: var(--c-grid); }
.ac-open { border-top: 0; }
.ac-lines { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; margin-top: 12px; font-size: 13px; }
.ac-lines span:nth-child(odd) { color: var(--muted); }
.ac-lines span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.ac-lines small { color: var(--muted); font-size: 13px; }
.ac-credit { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 13px; }
.ac-credit .mi { font-size: 16px; }
.ac-margin { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--divider); padding-top: 10px; }
.ac-margin b.good { color: var(--up); }
#ais-body { display: flex; flex-direction: column; gap: 16px; }
.ais-row { display: flex; gap: 8px; align-items: flex-end; padding: 0 16px 12px; }
.ais-row .btn-primary { flex: none; }
.ais-num { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.ais-num .ad-text { width: 100%; }
.ais-note { padding: 0 16px 14px; }
.am-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.am-stats div { background: var(--bg); border-radius: var(--radius); padding: 8px; font-size: 12px; color: var(--muted); min-width: 0; }
.am-stats b { display: block; color: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.am-who { display: inline-block; border: 1px solid currentColor; border-radius: 10px; font-size: 11px; padding: 0 7px; line-height: 17px; color: var(--accent); align-self: flex-start; }

/* Help us test v2 (2026-10-15): parts, groups by area */
.fb-of { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.ad-seg.fb-per button { height: auto; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px 0; }
.ad-seg.fb-per button small { font-size: 12px; color: var(--muted); font-weight: 400; line-height: 16px; }
.ad-seg.fb-per button.on small { color: var(--accent); }
.ad-seg.fb-per button.locked { color: var(--faint); }
.fb-pn { display: inline-flex; align-items: center; }
.fb-pn .mi { font-size: 14px; margin-right: 2px; }
.fb-phead { display: flex; flex-direction: column; gap: 6px; }
.fb-phead b { font-weight: 600; font-size: 16px; }
.fb-phead small { color: var(--muted); font-weight: 400; font-size: 13px; }
.fb-group { overflow: hidden; }
.fb-group.locked { opacity: .6; }
.fb-ghead { display: flex; align-items: center; gap: 8px; padding: 12px 16px 4px; }
.fb-ghead .mi { color: var(--accent); }
.fb-ghead b { font-weight: 600; }
.fb-ghead small { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.fb-group .fb-task:first-of-type { border-top: 0; }
.fb-task[disabled] { color: var(--text-2); }
.fb-chg { color: var(--wait-text); }
.fb-how { display: flex; flex-direction: column; gap: 4px; }
.fb-how b { font-weight: 600; }
.fb-how span { color: var(--text-2); font-weight: 400; }
.fb-note.warn .mi { color: var(--count); }
.fb-meta .chip .mi { font-size: 16px; }
.fb-said { font-weight: 400; color: var(--text); }
.fb-said small { display: block; color: var(--muted); font-size: 13px; }
.fb-other { margin-top: 2px; }
.fb-banner { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 12px; cursor: pointer; background: var(--accent-soft); border: 1px solid var(--note-line); box-shadow: none; }
.fb-banner .fb-bic { width: 40px; height: 40px; border-radius: 50%; background: var(--card); color: var(--accent); display: grid; place-items: center; flex: none; }
.fb-banner .fb-bic .mi { font-size: 22px; margin: 0; width: auto; }
.fb-banner b { font-weight: 600; display: block; color: var(--accent); }
.fb-banner small { color: var(--text-2); font-weight: 400; font-size: 13px; }
.fb-bpill { flex: none; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--card); border-radius: 999px; padding: 2px 8px; }
.fb-bx { border: 0; background: none; color: var(--muted); width: 40px; height: 40px; display: grid; place-items: center; }
.fb-bx .mi { margin: 0; }
.fb-csv { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; }
.fb-ans { color: var(--accent); font-weight: 500; }
.fb-task small.fb-said { color: var(--text-2); }
/* Finance > Accruals and Payments (payouts.js, redone 2026-10-24, mockup-payouts-v2.html): every manager */
.po-list { padding: 0; }
.lhead .lamt { flex: none; font-size: 15px; line-height: 20px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.row-go.mi { font-size: 20px; margin: 0; }
.pay-flist { box-shadow: none; }
.sheet-list.pay-pick { flex: none; overflow: visible; }  /* one scroller per sheet (§21.3): the sheet body */
.sec-head .pay-st, .sec-head .pay-showall { margin-left: auto; }
.pc-busy { flex-direction: row; align-items: center; }
.pc-amount { text-align: left; }
.pc-over { color: var(--down); }
.po-lock { font-size: 14px; margin: 0 0 0 2px; vertical-align: -2px; }
.po-big { font-size: 28px; display: block; width: auto; margin: 0 0 4px; text-align: center; color: var(--icon-2); }
.po-retry { margin-top: 8px; }
.po-eq { padding: 0; }
.po-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--divider); font-size: 14px; color: var(--text-table); }
.po-eq > .po-line:first-child { border-top: 0; }
.po-line span:last-child { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.po-line.sub2 { padding-left: 32px; font-size: 13px; color: var(--text-2); }
.po-skel { padding: 12px 16px; border-top: 1px solid var(--divider); }
.po-skel:first-child { border-top: 0; }
.po-skel .skeleton { height: 14px; width: 60%; }
.po-skel .skeleton + .skeleton { height: 12px; width: 35%; margin-top: 8px; }
.po-err { color: var(--down); }
.po-act { padding: 4px 16px 16px; }
.po-act .btn-light { width: 100%; justify-content: center; }
.po-line.total { font-weight: 500; color: var(--text); }
.po-line.total span:last-child { font-weight: 600; }
.po-why { padding: 10px 16px 14px; font-size: 13px; line-height: 18px; color: var(--text-2); border-top: 1px solid var(--divider); }
.po-whytext { display: block; margin-top: 6px; }
/* ReferOn CRM (crm.js, 2026-10-16, mockup-crm-settings.html variant A) */
/* the AI Desk page header (mockup-desk-header-v2.html variant 6, 2026-10-19): plaque + status + plain buttons, then the program */
.cx-ph { display: flex; flex-direction: column; gap: 8px; }
.cx-phrow { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cx-phrow .grow { flex: 1; min-width: 0; }
.cx-st { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ok-text); margin-left: -4px; }
.cx-st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cx-st.wait { color: var(--wait-text); }
.cx-st.no { color: var(--muted); }
.picon.cx-pico { width: 40px; height: 40px; border-radius: 10px; font-size: 17px; }
.picon.cx-lico { width: 36px; height: 36px; border-radius: 8px; font-size: 15px; }
.picon.cx-chico, .picon.cx-chico.pic { border-radius: 50%; }
.picon.cx-chico img { object-fit: cover; }
.cx-pname { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cx-grp { font-size: 13px; line-height: 18px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-bigico { font-size: 28px; display: block; color: var(--icon-2); margin-bottom: 4px; }
.cx-alert { background: var(--warn-soft); padding: 0; }
.cx-hrow { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); width: 100%; background: none; font: inherit; font-size: 14px; text-align: left; color: var(--text); }
.cx-hrow:first-child, .list-title + .cx-hrow { border-top: 0; }
.cx-hrow .mi { font-size: 20px; flex: none; }
.cx-hrow .grow { flex: 1; min-width: 0; }
.cx-hrow small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.cx-hrow .cx-steps { margin: 6px 0; padding-left: 18px; font-size: 13px; line-height: 19px; color: var(--text-2); }
.cx-hrow .go { color: var(--icon-2); }
.mi.cx-warn { color: var(--warn); }
.mi.cx-ok { color: var(--up); }
.mi.cx-bad { color: var(--down); }
.cx-health { padding: 0; }
.cx-health .list-title { padding-top: 12px; }
.list .row .status { flex: none; }
.cx-addrow > div:not(.ico) { color: var(--accent); }
.cx-tools { padding: 4px 16px 8px; }
.cx-n { margin-left: 4px; font-weight: 600; }
.cx-wait { display: flex; align-items: center; gap: 2px; font-size: 12px; line-height: 18px; font-weight: 600; color: var(--on-count); background: var(--count); border-radius: var(--radius); padding: 0 6px; flex: none; }
.cx-wait .mi { font-size: 16px; vertical-align: 0; }
.cx-sec { display: flex; align-items: center; gap: 8px; padding: 12px 16px 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.cx-sec .mi { font-size: 20px; }
.cx-sec .n { margin-left: auto; font-size: 12px; color: var(--muted); }
.cx-sec.red .mi { color: var(--down); }
.cx-sec.draft .mi { color: var(--accent); }
.cx-sec.ans .mi { color: var(--icon-2); }
.cx-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); width: 100%; background: none; font: inherit; text-align: left; color: var(--text); min-height: 48px; }
.cx-item .grow { flex: 1; min-width: 0; }
.cx-item b { font-size: 14px; font-weight: 500; }
.cx-item .q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 18px; color: var(--text-2); margin-top: 2px; }
.cx-item .why { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 3px; }
.cx-item .why.r { font-weight: 500; }
.cx-item .age { font-size: 13px; color: var(--muted); white-space: nowrap; flex: none; padding-top: 2px; }
.cx-item .go { color: var(--icon-2); flex: none; font-size: 16px; padding-top: 2px; }
.cx-red { color: var(--down); font-weight: 500; }
.cx-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 16px; font-size: 13px; color: var(--text-2); }
.cx-foot .mi { font-size: 16px; }
.cx-read { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; }
.cx-read .why { font-size: 13px; color: var(--down); font-weight: 500; }
.cx-read .req small { display: block; font-size: 13px; color: var(--muted); }
.cx-read .draft { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.kv .list-title.cx-sub { padding: 10px 16px 0; border-top: 1px solid var(--divider); }
.kv .row .v small { display: block; font-size: 13px; color: var(--muted); }
.kv button.row { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; text-align: left; align-items: center; }
.kv .row .go { color: var(--icon-2); }
.kv .v.cx-link { color: var(--accent); font-weight: 500; }
.cx-accs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px 12px; }
.cx-accchip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-danger .row > div:not(.ico) { color: var(--down); }
.cx-danger .ico { background: var(--down-soft); color: var(--down); }
.cx-locked .sw, .mc-switch:disabled .sw { opacity: .5; }
#cx-chats { scroll-margin-top: calc(var(--top-inset) + 12px); }
.cx-list .row > div:not(.ico) { overflow-wrap: anywhere; }
.cx-step { display: flex; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--divider); font-size: 14px; line-height: 20px; }
.cx-step:first-child { border-top: 0; }
.cx-step .num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.cx-step small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; margin-top: 2px; }

/* the affiliate card (2026-10-17 v3) */
.cx-prow .cx-pnum { width: 22px; flex: none; color: var(--muted); font-size: 13px; padding-top: 1px; }
.cx-prow .mi.cx-pnum { font-size: 18px; padding-top: 0; }
.cx-prow.done b { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.cx-prow b { display: block; overflow-wrap: anywhere; }
.cx-test { font-size: 11px; line-height: 14px; padding: 1px 6px; border-radius: 4px; background: var(--gray-100); color: var(--text-2); font-weight: 500; margin-right: 4px; text-decoration: none; display: inline-block; }
.counters b.cx-red { color: var(--down); }
.cx-tline { position: relative; padding: 0 16px 8px 40px; }
.cx-tline::before { content: ""; position: absolute; left: 24px; top: 14px; bottom: 18px; width: 2px; background: var(--divider); }
.cx-tline .ev { position: relative; padding: 8px 0; font-size: 13px; line-height: 18px; color: var(--text); }
.cx-tline .ev::before { content: ""; position: absolute; left: -19px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cx-tline .ev.ok::before { background: var(--up); }
.cx-tline .ev small { display: block; font-size: 13px; color: var(--muted); }
.cx-tline .q { display: block; margin-top: 4px; padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 4px; color: var(--text-2); overflow-wrap: anywhere; white-space: pre-line; }
.cx-tline .ev.ask::before { background: var(--muted); }
.cx-tline .ev.ask .q { border-left-color: var(--divider); background: var(--bg); }
.cx-tline .linkbtn { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 4px 0; min-height: 40px; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.cx-tline .linkbtn .mi { font-size: 16px; }

/* ---------- Admin › AI › What the bot knows (mockup-bot-memory.html variant A) ---------- */
.mem-when { font-size: 13px; color: var(--muted); white-space: nowrap; flex: none; font-weight: 400; }
.list .row.mem-more { justify-content: center; color: var(--accent); }
.mem-sub { font-size: 13px; line-height: 18px; color: var(--muted); padding: 10px 16px 0; }
.mem-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 16px 4px; }
.mem-tag { font-size: 12px; line-height: 16px; font-weight: 500; padding: 4px 8px; border-radius: var(--radius); color: var(--text-2); background: var(--gray-100); border: 0; font-family: inherit; }
.mem-checks { list-style: none; margin: 0; padding: 8px 16px 0; }
.mem-checks li { display: flex; gap: 8px; font-size: 13px; line-height: 18px; color: var(--text-2); padding: 3px 0; }
.mem-checks .mi { font-size: 16px; color: var(--accent); flex: none; margin-top: 1px; }
.mem-who { display: flex; align-items: center; gap: 8px; padding: 10px 16px 2px; font-size: 13px; color: var(--text-2); }
.mem-av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; flex: none; }
.mem-rule { display: flex; align-items: center; gap: 8px; padding: 6px 4px 6px 16px; border-top: 1px solid var(--divider); font-size: 13px; line-height: 18px; color: var(--text); }
.mem-who + .mem-rule { border-top: 0; }
.mem-rule > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mem-rule small { display: block; font-size: 13px; color: var(--muted); }
.mem-del { width: 40px; height: 40px; border: 0; background: none; color: var(--icon-2); display: grid; place-items: center; flex: none; border-radius: var(--radius); }
.mem-del .mi { font-size: 18px; }
.mem-allrules { display: block; width: 100%; padding: 10px; border: 0; border-top: 1px solid var(--divider); background: none; color: var(--accent); font: 500 14px var(--font); }
.mem-quote { margin: 6px 16px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg); font-size: 13px; line-height: 18px; color: var(--text-2); border-left: 3px solid var(--divider); white-space: pre-wrap; overflow-wrap: anywhere; }
/* Admin › AI › Refie: the chosen hello */
.rf-ck { color: var(--accent); font-size: 20px; margin-left: auto; min-width: 20px; }
/* Playfulness samples (2026-10-22): the same answer at each level; dimmed while Refie is off, still pickable */
.rf-ex { display: block; margin-top: 6px; padding: 6px 8px; border-radius: var(--radius); background: var(--gray-50); color: var(--text-2); font-size: 13px; line-height: 18px; font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
.rf-dim .rf-pick > div { opacity: .6; }
.rf-pick:disabled { cursor: default; opacity: 1; } /* read-only for members: readable, not the global .4 */
.mem-qhead { display: flex; align-items: center; gap: 6px; padding: 10px 16px 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.mem-qhead .mi { font-size: 16px; }
.mem-btns { display: flex; gap: 8px; padding: 0 16px 16px; }
.mem-btns button { flex: 1; min-height: 44px; }
.mem-err { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-size: 13px; color: var(--text-2); }
.mem-err .mi { color: var(--down); }
.mem-err button { margin-left: auto; border: 0; background: none; color: var(--accent); font: 500 14px var(--font); min-height: 40px; padding: 0 8px; margin-right: -8px; }
.mem-empty-ico { display: block; font-size: 28px; color: var(--icon-2); margin: 0 auto 8px; }
.kv .row.mem-crm { width: 100%; border-left: 0; border-right: 0; border-bottom: 0; background: none; font: inherit; text-align: left; }
.cx-tline .ev, .cx-read { overflow-wrap: anywhere; }
.sheet-foot.cx-pbtns { display: flex; gap: 8px; }
.sheet-foot.cx-pbtns > button { flex: 1 1 0; }
/* ReferOn CRM step 2 (2026-10-17): an Inbox item sheet, a promise's actions */
.cx-istate { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.cx-istate .mi { font-size: 18px; color: var(--icon-2); }
.cx-istate.red, .cx-istate.red .mi { color: var(--down); }
.cx-istate.ok .mi { color: var(--up); }
.cx-reqs { display: flex; flex-direction: column; gap: 6px; }
.cx-read .note { font-size: 13px; line-height: 18px; color: var(--muted); }
.cx-dhead { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--accent); margin-top: 4px; }
.cx-dhead .mi { font-size: 18px; }
.cx-ibtns { display: grid; gap: 8px; }
.cx-ibtns > button { min-height: 44px; padding: 8px 10px; }
.cx-change { display: flex; flex-direction: column; gap: 8px; }
.cx-change textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; background: var(--card); color: var(--text); font: inherit; font-size: 16px; resize: vertical; }
.cx-loading { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--text-2); }
/* an invoice card's own sheet part (2026-11-01 step 2, mockup-invoice-desk.html frames 2, 4, 8) */
.cx-inv { display: flex; flex-direction: column; gap: 8px; }
.cx-inv .skeleton { height: 44px; }
.cx-inv .list-title { padding: 4px 0 0; }
.cx-chk { display: flex; flex-direction: column; gap: 6px; }
.cx-chk div { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--text-2); }
.cx-chk .mi { font-size: 18px; flex: none; margin-top: 1px; color: var(--icon-2); }
.cx-chk .ok .mi { color: var(--up); }
.cx-chk .bad { color: var(--text); }
.cx-chk .bad .mi { color: var(--warn); }
.cx-chk .pay { color: var(--text); font-weight: 500; }
.cx-chk div > span:last-child { min-width: 0; overflow-wrap: anywhere; }
/* the invoice sheet in a chat with several companies (2026-11-07, mockup-invoice-companies.html): the company pick
   (.sheet-list .on / .check, two lines: name 15/22, closed balance 14/20, #id 13 muted) and «Tell the affiliate» */
.cx-copick { flex: none; overflow: visible; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.cx-copick button { align-items: flex-start; gap: 12px; }
.cx-copick .g { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-copick .g .item { font-size: 15px; line-height: 22px; white-space: normal; overflow-wrap: anywhere; }
.cx-copick .g .amt { font-size: 14px; line-height: 20px; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.cx-copick .g small { font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.cx-copick .check { margin-top: 1px; }
.cx-inv[aria-busy] .cx-chk, .cx-inv[aria-busy] .cx-tell { opacity: .5; }
.cx-tell { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; line-height: 20px; color: var(--text); }
.cx-tell small { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.cx-opens { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cx-opens > button { min-height: 44px; }
.cx-pacts > button { display: flex; align-items: flex-start; gap: 10px; text-align: left; }
.cx-pacts .mi { color: var(--accent); font-size: 20px; flex: none; }
.cx-pacts .item small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 400; }
.cx-remind { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--divider); font-size: 14px; }
.cx-remind .mi { color: var(--accent); font-size: 20px; }
.cx-remind .k { flex: 1 0 auto; }
.sheet-foot.cx-pbtns { flex-wrap: wrap; }
.sheet-foot.cx-pbtns > .btn-primary { flex-basis: 100%; }
.cx-change[hidden] { display: none; }
.sheet-foot.cx-pbtns > .btn-light { flex: 1 1 40%; }
.cx-opens > button, .cx-pbtns > button, .cx-ibtns > button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.cx-opens .mi, .cx-pbtns .mi, .cx-ibtns .mi { font-size: 18px; }
.rk-spin.sm { width: 16px; height: 16px; border-width: 2px; }
.cx-ibtns { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.cx-ibtns > button { min-width: 0; white-space: nowrap; overflow: hidden; }
.cx-ibtns .t { overflow: hidden; text-overflow: ellipsis; }
.cx-pacts .item { white-space: normal; overflow: visible; }
.sheet-list .cx-remind button { width: auto; min-height: 40px; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); color: var(--accent); display: inline-flex; justify-content: center; font-size: 13px; font-weight: 500; }
/* ReferOn CRM step B (2026-10-17): change program / accounts / lead, the health check */
.kv .row .cx-chg { flex: none; min-height: 40px; padding: 6px 12px; margin-left: 8px; }
.list .row > .cx-chg { flex: none; margin-left: 8px; align-self: center; }  /* Resume in AI Desk › Refie › Paused chats */
.cx-x { border: 0; background: none; color: var(--icon-2); width: 40px; height: 40px; display: inline-grid; place-items: center; margin: -10px -12px -10px -6px; flex: none; }
.cx-x .mi { font-size: 16px; }
.cx-pick { padding: 4px 16px 8px; }
.cx-fix { flex: none; min-height: 40px; padding: 6px 12px; }
.cx-hgroup { padding: 10px 16px 2px; font-size: 13px; font-weight: 600; color: var(--text-2); border-top: 1px solid var(--divider); }
.sheet .cx-tools { padding: 0 16px 8px; }
.cx-pick .cx-accchip { display: inline-flex; align-items: center; gap: 2px; overflow: visible; max-width: 100%; }
.cx-pick .cx-accchip .clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv .row .cx-chg { align-self: center; }
.cx-hgroup { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font-family: inherit; text-align: left; min-height: 40px; }
.cx-hgroup .mi { font-size: 18px; color: var(--icon-2); }
.cx-accchip.cx-co { display: inline-flex; align-items: center; gap: 4px; }
.cx-accchip.cx-co .mi { font-size: 16px; }
#cx-follow .mc-switch { border-top: 0; }
.sheet-body > .mc-switch { padding: 12px 16px; }  /* in line with the .srow rows of the same sheet */
/* a CRM's Inbox | Settings pane: the same 16 px between cards as every screen (.content gap; 2026-10-17 the owner) */
#cx-pane { display: flex; flex-direction: column; gap: 16px; }
/* one screen per affiliate chat (2026-10-18, mockup-crm-chat-screen.html): two corner buttons, the ReferOn card, Accounts */
.title-row > .cx-corner { flex: none; display: flex; gap: 8px; }
.cx-acc2 { padding: 10px 16px; border-top: 1px solid var(--divider); font-size: 14px; color: var(--text-table); overflow-wrap: anywhere; }
.cx-acc2 .h { display: flex; justify-content: space-between; gap: 8px; font-weight: 500; color: var(--text); }
.cx-acc2 .h span { font-weight: 400; font-size: 13px; color: var(--muted); flex: none; }
.cx-acc2 small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.cx-nums { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; font-variant-numeric: tabular-nums; }
.cx-nums i { font-style: normal; color: var(--muted); margin-right: 4px; }
.cx-coh { display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px 8px; font-size: 13px; line-height: 18px; color: var(--muted); }
.cx-coh .mi { color: var(--icon-2); flex: none; font-size: 20px; }
.cx-coh b { color: var(--text); font-weight: 600; }
.cx-acccard #cx-acclist > .cx-acc2:first-child { border-top: 0; }
.cx-accsum .row:first-child { border-top: 1px solid var(--divider); }
.cx-acccard .cx-coh + #cx-acclist > .cx-acc2:first-child, .cx-acccard .cx-tools + #cx-acclist > .cx-acc2:first-child { border-top: 1px solid var(--divider); }

/* ---------- One app, one look (design-review-2026-10-18, style guide §19) ---------- */
.rk-beta { white-space: nowrap; display: inline-block; }
.cx-sec, .cx-today .hd { font-weight: 500; }  /* accent weight is 500, never 600 */
.am-seg { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px; }  /* the same plate as every segment */
.cx-item .why.r { color: var(--wait-text); }  /* red only for numbers */
.cx-warntext { color: var(--wait-text); }
button.mc-switch:disabled, button.row-sw:disabled { opacity: 1; }  /* a locked row keeps readable text; only its switch fades */
.row-sw .sw { margin-top: 0; }  /* the .row centres its content */
.row-sw:disabled .sw { opacity: .5; }  /* locked or saving: only the switch fades */
.mc-switch .sw, .row-sw .sw { width: 34px; }
.btn-light.sm { min-height: 40px; }
.ad-acts button { padding-top: 10px; padding-bottom: 10px; margin-top: -10px; margin-bottom: -10px; }
.ad-acts { padding-top: 12px; }
.cx-item:active, .list .row:active, .cx-hrow:active, .mc-switch:active, .sheet-list button:active, .ad-row:active, .ad-entry:active { background: var(--gray-50); }
.cx-item:disabled:active, .mc-switch:disabled:active, .row-sw:disabled:active { background: none; }
.chips:not(.wrap):not(.item .chips) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); }
.ad-entry.admin-zone { box-shadow: var(--shadow); }
.ad-entry.admin-zone b { color: var(--text); }
.ad-entry.admin-zone .ico { background: var(--nav-active); color: var(--accent); }
.fee-tools .chips { padding-right: 20px; }
#owner-limit { grid-template-columns: 1fr 1fr; }
#adm-topup { grid-template-columns: repeat(4, 1fr); }
button.cx-tap { display: block; width: 100%; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; text-align: left; }
button.cx-coh.cx-tap { display: flex; border-top: 0; font-size: 13px; line-height: 18px; color: var(--muted); }
button.cx-coh.cx-tap > div { flex: 1; }
.cx-acc2 .h .go { margin-left: 6px; vertical-align: -3px; }
button.cx-tap:active { background: var(--gray-50); }
.ad-other { display: flex; gap: 8px; padding: 0 16px 16px; }
.ad-other input { flex: 1; min-width: 0; font-size: 16px; }
/* icons that replaced the text glyphs (copy, chevron, add, close on a chip) */
.mi.cpi { font-size: 15px; margin: 0 0 0 4px; vertical-align: -3px; }
.cp .mi.cpi { margin: 0; }
.go.tail { color: inherit; vertical-align: -3px; margin-left: 2px; }
.mi.lead { margin-right: 6px; }
.mi.tailx { font-size: 16px; margin: 0 -2px 0 4px; vertical-align: -3px; }
.cx-chatlink { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 500; text-align: left; }
.cx-chatlink .mi { margin: 0; color: var(--accent); }
/* why the bot did not answer (2026-10-26, mockup-auto-why.html frames 1-2) + the lit row of «How auto-replies work» */
.cx-whyb { border-radius: var(--radius); background: var(--note-bg); border: 1px solid var(--note-line); }
.cx-whyb .wt { display: flex; gap: 8px; padding: 10px 12px; font-size: 14px; line-height: 20px; color: var(--note-text); overflow-wrap: anywhere; }
.cx-whyb .wt > .mi { margin: 1px 0 0; font-size: 18px; color: var(--note-icon); flex: none; }
.cx-whyb .wt b { display: block; font-weight: 500; }
.cx-whyb .wt small { display: block; margin-top: 4px; font-size: 13px; line-height: 18px; }
.cx-whyb .cx-chatlink { width: 100%; min-height: 44px; padding: 0 12px; border-top: 1px solid var(--note-line); }
.cx-whyb .cx-chatlink .go { margin-left: auto; }
.list .row.cx-here { background: var(--accent-soft); }
.list .row.cx-here .ico .mi { color: var(--accent); }
.cx-heretag { display: inline-block; margin-top: 6px; }
/* ReferOn CRM structure + Knowledge (2026-10-18, mockup-crm-structure.html B, mockup-crm-knowledge.html) */
.cx-nums { margin-top: 2px; }
.cx-hot { color: var(--wait-text); font-weight: 500; }
.cx-tabs button { flex: 1; min-width: 0; min-height: 40px; padding-left: 6px; padding-right: 6px; overflow: hidden; text-overflow: ellipsis; }
.cx-tabs .status { margin-left: 4px; vertical-align: 1px; }
.kn-prev { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; font-weight: 400; font-size: 13px; line-height: 18px; color: var(--text-2); margin-top: 2px; }
.kn-prev.full { display: block; -webkit-line-clamp: unset; }
.kn-btns { display: flex; gap: 8px; margin-top: 8px; }
.kn-btns > button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.kn-btns .mi { margin: 0; }
.kn-sheet { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 16px; }
.kn-sheet .sub { margin: 0; }
.kn-sheet .kn-btns { margin-top: 0; }
.kn-cnt { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-top: -4px; }
.kn-cnt .linkbtn { display: inline-flex; align-items: center; gap: 4px; }
.kn-cnt .linkbtn .mi { font-size: 16px; margin: 0; }
.kn-clear { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 0; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; font-weight: 500; text-align: left; color: var(--down); }  /* the red remove row of an editor sheet, above its footer */
.kn-clear small { display: block; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--muted); }
.kn-clear .ico .mi { margin: 0; }
.kn-clear .ico { color: var(--down); }
.kn-hist { padding: 10px 0; border-top: 1px solid var(--divider); display: flex; flex-direction: column; gap: 4px; }
.kn-hist:first-child { border-top: 0; }
.kn-hist .h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text); }
.kn-hist .h span { font-weight: 400; color: var(--muted); font-size: 13px; flex: none; }
.kn-hist .linkbtn { align-self: flex-start; }
.kn-rule { display: flex; gap: 8px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--divider); font-size: 14px; line-height: 20px; color: var(--text); }
.kn-rule:first-child { border-top: 0; }
.kn-rule .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kn-rule small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.kn-rule.arch { color: var(--muted); }
.kn-rule.arch .grow > span { text-decoration: line-through; }
.kn-ract { width: 40px; height: 40px; margin: -10px -10px -10px 0; display: grid; place-items: center; color: var(--icon-2); border: 0; background: none; border-radius: var(--radius); flex: none; }
.kn-ract .mi { margin: 0; font-size: 20px; }
.kn-ract:active { background: var(--gray-50); }
.kn-pb { display: block; width: 100%; text-align: left; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; color: var(--text); }
.kn-pb:first-child { border-top: 0; }
.kn-pb:active { background: var(--gray-50); }
.kn-pb .h { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 500; }
.kn-pb .h .n { color: var(--text-2); flex: none; }
.kn-pb p { margin: 6px 0 0; font-size: 13px; line-height: 18px; color: var(--text-2); }
.kn-cmd { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; text-align: left; color: var(--text); }
.kn-cmd:active { background: var(--gray-50); }
.kn-cmd code { font: 500 13px/18px ui-monospace, Menlo, monospace; background: var(--gray-100); color: var(--text); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; max-width: 55%; }
.kn-cmd .g { flex: 1; min-width: 0; font-size: 13px; line-height: 18px; color: var(--text-2); }
.kn-cmd .mi { color: var(--accent); flex: none; margin: 0; }
.kn-open { padding: 0 16px 12px 68px; font-size: 13px; line-height: 19px; color: var(--text-2); }
.kn-open ol { margin: 0; padding-left: 18px; }
/* Add a CRM: steps tick by themselves (2026-10-18) */
.cx-step.ok .num { background: var(--up-soft); color: var(--ok-text); }
.cx-step.ok .num .mi { margin: 0; font-size: 18px; }
.cx-step.now .num { background: var(--accent); color: var(--on-accent); }
.cx-step:not(.ok):not(.now) { color: var(--muted); }
.cxc-sub { display: block; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 400; margin-top: 2px; }
/* Add an AI Desk (2026-10-29, mockup-desk-one-click-v2.html): the steps as a list, a picture left, tap = full size */
.cx-lead { padding: 12px 16px 4px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.cx-hl { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 8px 60px; }
.cx-sub .cx-hl { padding-left: 60px; }
.cx-hr { display: flex; gap: 12px; align-items: flex-start; }
.cx-pic { position: relative; flex: none; width: 96px; height: 120px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); cursor: zoom-in; }
.cx-pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cx-pic .cx-zm { position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; margin: 0; border-radius: 50%; background: var(--card); color: var(--accent); box-shadow: var(--shadow); font-size: 14px; line-height: 22px; text-align: center; }
.cx-hx { font-size: 13px; line-height: 18px; color: var(--text-2); padding-top: 2px; }
.cx-hx b { display: block; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text); }
.cx-zoom { padding: 0 16px 8px 60px; font-size: 13px; line-height: 18px; color: var(--muted); }
.cx-sub .cx-step { border-top: 0; padding-left: 60px; }
.cx-sub .cx-step .num { width: 22px; height: 22px; font-size: 12px; }
.cx-picview { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: calc(var(--top-inset, 0px) + 16px) 16px 16px; border: 0; background: var(--backdrop); cursor: zoom-out; }
.cx-picview img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: var(--shadow-lg); background: var(--card); }
/* the Link sheet (2026-10-19 live): the search icon never under the text in a sheet, Change, the Save hint */
.sheet .searchwrap .search { padding-left: 38px; }
.cx-chgtxt { color: var(--accent); font-size: 14px; font-weight: 500; flex: none; }
#cx-pgchg .cxc-sub { margin: 0 0 2px; }
.sheet-foot.cx-bindfoot { flex-direction: column; }
.cx-savehint { font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; }
.cx-findhint { padding-top: 0; font-size: 13px; line-height: 18px; color: var(--muted); }
/* Link search (mockup-link-search.html, 2026-10-19): searching line + skeleton rows, companies vs affiliates, picked blocks */
.cx-sbar { height: 2px; margin: 0 16px 8px; border-radius: 1px; background: var(--accent-soft); overflow: hidden; position: relative; }
.cx-sbar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: var(--accent); border-radius: 1px; animation: cx-slide 1.1s ease-in-out infinite; }
@keyframes cx-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .cx-sbar::after { animation: none; width: 100%; opacity: .4; } }
.cx-skrow { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--divider); }
.cx-skrow .grow { flex: 1; min-width: 0; }
.cx-ska { width: 36px; height: 36px; border-radius: 50%; flex: none; } .cx-ska.sq { border-radius: 8px; }
.cx-sk1 { height: 12px; } .cx-sk2 { height: 10px; width: 35%; margin-top: 6px; }
.sheet-list .cx-res, .cx-res { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 10px 16px; min-height: 56px; }
.cx-res .grow { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-res small, .cx-pkh small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 400; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-id { color: var(--muted); font-weight: 400; font-size: 13px; }
.cx-res.in { padding-left: 40px; background: var(--gray-50); }
.cx-res.in .cx-afav { width: 28px; height: 28px; font-size: 12px; }
.cx-coav { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.cx-coav .mi { font-size: 20px; margin: 0; font-variation-settings: "FILL" 1; }
.cx-afav { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 15px; flex: none; }
.cx-cotag { display: inline-block; font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 500; margin-right: 6px; }
.cx-res .cx-plus { color: var(--accent); margin: 0; } .cx-res .cx-added { color: var(--ok-text); margin: 0; }
.cx-pk { margin: 4px 16px 8px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cx-pkh { display: flex; align-items: center; gap: 12px; padding: 10px 4px 10px 12px; font-weight: 500; color: var(--text); }
.cx-pkh .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-x2 { border: 0; background: none; color: var(--icon-2); width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.cx-x2 .mi { font-size: 20px; margin: 0; }
.cx-pkaccs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px 60px; }
.cx-pkaccs span { font-size: 13px; line-height: 22px; padding: 0 8px; border-radius: 11px; background: var(--gray-100); color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-switch.cx-pkf { margin: 0 16px 8px; width: calc(100% - 32px); }
.cx-accchip > .mi:first-child { font-size: 16px; margin: 0 4px 0 0; }
.cx-empty2 { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; font-size: 14px; color: var(--text); }
.cx-empty2 > div { flex: 1; min-width: 0; } .cx-empty2 .mi { color: var(--icon-2); margin: 0; }
.cx-empty2 small { display: block; color: var(--muted); font-size: 13px; line-height: 18px; margin-top: 2px; }
.cx-empty2.err .mi { color: var(--down); }
.sheet-list .cx-empty2 > button { width: auto; flex: none; align-self: center; border-top: 0; min-height: 36px; padding: 6px 12px; }
.cx-retry { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 500; padding: 0 0 0 8px; flex: none; }
/* Refie on a chat row = auto-replies (mockup-auto-quick.html, 2026-10-19): the number = topics that answer */
/* Refie on a chat row = auto-replies on: a 22px pill, the tap area 44px (2026-10-23, mockup-desk-chats.html) */
.cx-rf { position: relative; display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 6px 0 2px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; flex: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cx-rf::before { content: ""; position: absolute; inset: -11px -4px; }
.cx-rf img { width: 20px; height: 20px; object-fit: contain; display: block; }
.cx-rf .mi { font-size: 14px; margin: 0; }
.cx-rf.paused { background: var(--warn-soft); color: var(--wait-text); }
.cx-rf.paused img { filter: grayscale(1); opacity: .6; }
.cx-aqh { display: flex; align-items: center; gap: 12px; padding: 4px 16px 12px; font-weight: 500; color: var(--text); }
.cx-aqh img { width: 48px; height: auto; flex: none; }
.cx-aqh .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cx-aqh small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 400; margin-top: 2px; }
/* the Inbox (2026-10-18, mockup-ai-inbox.html) */
.cx-itools { display: flex; gap: 8px; }
.cx-itools .searchwrap { flex: 1; min-width: 0; }
.cx-itools .fbtn .n { margin-left: 4px; }
.cx-ichips { margin: 0 -16px; padding: 0 16px; }
.cx-ihead { display: flex; flex-direction: column; gap: 8px; }  /* the chips + «Sorted by» (desk_sort), like .fee-tools */
.cx-irow .h, .cx-drow .h { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.cx-irow .h b, .cx-drow .h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cx-irow .h .id, .cx-drow .h .id { font-size: 13px; color: var(--muted); flex: none; }
.cx-irow .h .age, .cx-drow .h .age { margin-left: auto; font-size: 13px; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.cx-irow .h .age.late { color: var(--wait-text); font-weight: 500; }
.cx-irow .m { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 3px; }
.cx-irow .m .why { color: var(--wait-text); font-weight: 500; }
/* one card per chat (2026-10-20, mockup-inbox-group.html B): the chat's questions as short lines, «×2» = asked again */
.cx-irow .cx-qs { display: flex; flex-direction: column; margin-top: 6px; border-left: 2px solid var(--divider); }
.cx-irow .cx-qs .ql { display: flex; gap: 8px; align-items: baseline; padding: 3px 0 3px 10px; font-size: 13px; line-height: 18px; color: var(--text-2); min-width: 0; }
.cx-irow .cx-qs .ql .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-irow .cx-qs .ql .a { font-size: 13px; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.cx-irow .cx-qs .ql .a.late { color: var(--wait-text); font-weight: 500; }
.cx-irow .cx-qs .ql.more { color: var(--muted); font-size: 13px; }
.cx-rep { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--wait-text); flex: none; white-space: nowrap; }
.cx-rep .mi { font-size: 14px; margin: 0; }
.cx-irow .cx-qs .ql .cx-rep { margin-left: 0; }
.cx-read .req, .cx-read .note { overflow-wrap: anywhere; }
.cx-read .req .cx-kind { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 2px; }
.cx-read .req .cx-change { margin-top: 8px; }
.cx-irow .dr { display: block; font-size: 13px; line-height: 18px; color: var(--accent); font-weight: 500; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-irow .dr .mi, .cx-drow .how .mi { font-size: 15px; margin: 0 4px 0 0; vertical-align: -3px; }
.cx-drow .how { display: block; font-size: 13px; line-height: 18px; color: var(--text-2); margin-top: 3px; }
.cx-drow .how .mi { color: var(--icon-2); }
.cx-drow .how.draft_sent .mi, .cx-drow .how.auto .mi { color: var(--ok-text); }
.cx-dsum { display: grid; grid-template-columns: repeat(3, 1fr); }
.cx-dsum div { padding: 10px 6px; text-align: center; border-left: 1px solid var(--divider); }
.cx-dsum div:first-child { border-left: 0; }
.cx-dsum b { display: block; font-size: 18px; line-height: 24px; font-weight: 500; color: var(--text); }
.cx-dsum small { font-size: 13px; color: var(--muted); }
.cx-quote { border-left: 3px solid var(--divider); padding: 2px 0 2px 10px; font-size: 14px; line-height: 20px; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.cx-answer { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; line-height: 20px; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
#cx-reasons .list-title { padding-left: 16px; }
/* the Playbook of a CRM (2026-10-18): the bar = this CRM, the line = ReferOn's analysis */
.kn-bar2 { position: relative; height: 6px; border-radius: 3px; background: var(--gray-100); margin-top: 8px; }
.kn-bar2 i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); }
.kn-bar2 b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-2); }
.kn-own { color: var(--accent); font-weight: 500; }
.kn-help { padding: 10px 16px; border-top: 1px solid var(--divider); }
.list-title + .kn-help { border-top: 0; }
.kn-help .h { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.kn-help .h .n { color: var(--text-2); }
.kn-help small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
/* ReferOn AI Suite = the paid brand, on the AI balance (2026-10-18) */
.suite-tag { margin-left: auto; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: var(--radius); white-space: nowrap; }
/* tabs swipe + Topics check (2026-10-18) */
#cx-pane { touch-action: pan-y; }
.cx-checking { padding: 8px 16px 0 64px; font-size: 13px; color: var(--muted); }

/* Profile > My AI rules (2026-10-19) */
.mr-list { margin: 0 16px 16px; }
.mr-intro { margin: 0; padding: 12px 16px 8px; }
.mr-list + .mr-intro { padding-top: 0; margin-top: -8px; }
.mr-pad { padding: 16px; }
.mr-count, .kr-count { text-align: right; }
/* 2026-10-19 live: in the promise sheet the actions list shrank to one row (its own tiny scroll): the parts of a long
   sheet keep their height and the whole body scrolls */
.sheet-body > .cx-read, .sheet-body > .cx-tline, .sheet-body > .cx-pacts, .sheet-body > .note-line { flex-shrink: 0; }
.cx-pacts.sheet-list { overflow: visible; }
/* promises v4 (2026-10-19, mockup-promises-v4.html variant A) */
.cx-ptag { display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border-radius: 6px; background: var(--chip-bg); color: var(--text-2); font-size: 11px; line-height: 18px; }
.cx-ptag .mi { font-size: 13px; margin: 0; }
.cx-pq { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 3px; padding-left: 8px; border-left: 2px solid var(--divider); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-strike { text-decoration: line-through; color: var(--muted); }
.cx-pdoneico { font-size: 14px; vertical-align: -2px; margin-right: 2px; color: var(--up); }
.cx-pundo { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 10px; color: var(--accent); font-size: 13px; font-weight: 500; }
.cx-pundo .mi { font-size: 16px; margin: 0; }
.cx-wline { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--divider); font-size: 14px; color: var(--text); }
.cx-wline .mi { color: var(--wait-text); font-size: 20px; }

/* ---------- a program's Knowledge (2026-10-19, mockup-program-knowledge.html) ---------- */
.cx-pghead { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.cx-pghead .t { font-size: 16px; line-height: 22px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-pghead small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.cx-ktag { color: var(--accent); font-weight: 500; }
.cx-klink { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); padding: 12px 12px 12px 16px; font: inherit; font-size: 15px; color: var(--text); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cx-klink > .mi { color: var(--accent); font-size: 20px; margin: 0; flex: none; }
.cx-klink .grow { flex: 1; min-width: 0; }
.cx-klink small { display: block; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }  /* wraps, never cut (2026-11-07) */
.cx-klink .go { color: var(--icon-2); margin: 0; }
.cx-klink:active { opacity: .7; }
.kh-row { display: block; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; text-align: left; color: var(--text); }
.list-title + .kh-row { border-top: 0; }
button.kh-row { cursor: pointer; -webkit-tap-highlight-color: transparent; position: relative; padding-right: 40px; }
button.kh-row > .go { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--icon-2); margin: 0; font-size: 20px; }
button.kh-row:active { background: var(--gray-50); }
.kh-row .h { display: flex; gap: 8px; font-size: 14px; font-weight: 500; }
.kh-row .h span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kh-row .h .t { flex: none; font-size: 13px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.kh-row p { margin: 4px 0 0; font-size: 13px; line-height: 18px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.kh-row small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
/* ---------- the chat screen v2 (2026-10-19, mockup-chat-screen-v2.html variant A): tokens only ---------- */
.cx-who .cx-wr { display: flex; gap: 12px; align-items: flex-start; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); width: 100%; background: none; font: inherit; text-align: left; font-size: 14px; line-height: 20px; color: var(--text); }
.cx-who .cx-wr:first-child { border-top: 0; }
.cx-who .cx-wr .k { width: 100px; flex: none; color: var(--muted); font-size: 13px; }
.cx-who .cx-wr .v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cx-who .cx-wr .v small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.cx-who .cx-wr .go { color: var(--icon-2); margin: 0; align-self: center; }
/* a request's What the bot did (2026-10-28, mockup-desk-requests-activity.html): Reason · Action · Result, a shorter key */
.df-what .cx-wr .k { width: 64px; }
.cx-who button.cx-wr:active { background: var(--gray-50); }
.cx-accl { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-atag { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: var(--radius); background: var(--chip-bg); color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cx-atag i { font-style: normal; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.cx-atag.plus { background: var(--accent-soft); color: var(--accent); }
.cx-waitc .cx-wline { border-bottom: 0; }
.cx-wline.ok .mi { color: var(--up); }
.cx-allok2 { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 14px; color: var(--ok-text); }
.cx-allok2 .mi { margin: 0; color: var(--up); }
.cx-more { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: 500 14px var(--font); color: var(--accent); text-align: left; }
.cx-more span:first-child { flex: 1; }
.cx-more small { color: var(--muted); font-weight: 400; font-size: 13px; }
.cx-more .mi { margin: 0; color: var(--icon-2); }
.cx-more:active { background: var(--gray-50); }
.cx-deal .sec-head > .mi, .cx-links .sec-head > .mi { margin: 0; color: var(--icon-2); font-size: 20px; }
.cx-deal .sec-head .n, .cx-links .sec-head .n, .cx-tlist .sec-head .n { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); }
.cx-dchips { margin: 0; padding: 0 16px 8px; }
.cx-dlv { padding: 10px 16px; border-top: 1px solid var(--divider); }
.cx-deal .sec-head + .cx-dlv, .cx-dchips + .cx-dlv { border-top: 0; }
.cx-dlv .h { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--text); }
.cx-dlv .h b { font-weight: 500; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cx-dlv .pn { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.cx-dtype { display: inline-block; font-size: 11px; line-height: 16px; font-weight: 500; padding: 0 6px; border-radius: 4px; flex: none; }
.cx-dtype.cus { background: var(--accent-soft); color: var(--accent); }
.cx-dtype.inh { background: var(--gray-100); color: var(--text-2); }
.cx-drule { display: flex; gap: 12px; margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--text-table); }
.cx-drule .geo { width: 96px; flex: none; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.cx-drule .terms { flex: 1; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.cx-drule small, .cx-dch small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.cx-deal .list-title { border-top: 1px solid var(--divider); }
.cx-dch { display: flex; gap: 12px; padding: 6px 16px 10px; font-size: 13px; line-height: 18px; color: var(--text); }
.cx-dch .d { width: 44px; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.cx-dch .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cx-sk { display: flex; flex-direction: column; gap: 8px; padding: 4px 16px 16px; }
.cx-sk i { display: block; height: 12px; }
.cx-stt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; text-align: center; font-size: 14px; line-height: 20px; color: var(--text-2); }
.cx-stt .mi { font-size: 28px; color: var(--icon-2); margin: 0; }
.cx-stt b { color: var(--text); font-weight: 500; }
.cx-stt .btn-light { display: inline-flex; align-items: center; gap: 6px; }
.cx-stt .btn-light .mi { font-size: 18px; color: var(--accent); }
.cx-lk { display: flex; gap: 10px; align-items: center; padding: 10px 8px 10px 16px; border-top: 1px solid var(--divider); }
.cx-links .sec-head + .cx-lk { border-top: 0; }
.cx-lk .grow { flex: 1; min-width: 0; }
.cx-lk b { display: block; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-lk .m { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.cx-lk .dl { font-size: 13px; line-height: 18px; color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }
.cx-mid { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 40px; max-width: 132px; padding: 0 10px; border: 0; border-radius: var(--radius); color: var(--accent); font: 500 13px var(--font); font-variant-numeric: tabular-nums; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cx-mid .mi { margin: 0; font-size: 16px; flex: none; }
.cx-mid:active { background: var(--accent-soft); }
.cx-tlist .list-title { padding-left: 16px; }
.cx-tday { position: relative; padding: 8px 8px 12px 44px; }
.cx-tday::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: var(--divider); }
.cx-tday:last-child::before { bottom: auto; height: 20px; }
.cx-tday::after { content: ""; position: absolute; left: 17px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--icon-2); box-shadow: 0 0 0 3px var(--card); }
.cx-tday.op::after { background: var(--warn); }
.cx-tday.ok::after { background: var(--up); }
.cx-tday.pinned::after { background: var(--accent); }
.cx-tday .dh { display: flex; align-items: center; gap: 8px; min-height: 40px; margin-top: -4px; }
.cx-tday .dh .grow { flex: 1; min-width: 0; }
.cx-tday .dh b { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text); }
.cx-tday .dh small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.cx-pt { display: grid; grid-template-columns: 68px 1fr; gap: 8px; margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--text); }
.cx-pt .k { font-size: 12px; line-height: 18px; color: var(--muted); font-weight: 500; }
.cx-pt .v { min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 20px; }
.cx-pt .v div + div { margin-top: 2px; }
.cx-pt.open { background: var(--warn-soft); border-radius: var(--radius); padding: 6px 8px; margin: 6px 8px 2px 0; grid-template-columns: 40px 1fr; }
.cx-pt.open .k { color: var(--wait-text); }
.cx-allok { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ok-text); }
.cx-allok .mi { margin: 0; font-size: 16px; color: var(--up); }
.cx-kept { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 6px; }
.cx-ro { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; font-size: 14px; line-height: 20px; color: var(--text); background: var(--note-bg); border-radius: var(--radius); box-shadow: var(--shadow); }
.cx-ro .mi { color: var(--note-icon); margin: 0; }
.cx-ro small { display: block; font-size: 13px; line-height: 18px; color: var(--note-text); }
.cx-foot .row > .mi:first-child { color: var(--accent); margin: 0; }
.cx-foot .row > div { flex: 1; min-width: 0; }
.cx-foot .row small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.cx-foot .row .go { color: var(--icon-2); margin: 0 0 0 auto; }
.cx-foot .row:first-child { border-top: 0; }

/* Knowledge v2 (2026-10-19, docs/plan-knowledge-v2.md, mockup-knowledge-v3.html): the program's hero, block tiles, a
   block's lines, the geo map (Apple Maps feel: pill markers, glass controls), paste and the sort check. Tokens --kn-* in :root */
.kn2-hbtn { width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center; flex: none; padding: 0; }
.kn2-hbtn .mi { font-size: 20px; margin: 0; }
.kn2-hacts { display: flex; gap: 8px; margin-top: 12px; }
.kn2-hbtn.wide { flex: 1; width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 500; }
.kn2-hero .top { flex-wrap: nowrap; }
.kn2-hero .top .grow { min-width: 0; }
.note-line.bare { border: 0; padding: 0 4px; }
.kn2-hero { border-radius: 8px; padding: 16px; background: var(--kn-hero); color: var(--kn-on-hero); box-shadow: var(--shadow); }
.kn2-hero .top { display: flex; gap: 12px; align-items: center; }
.kn2-hero .kn2-logo { width: 40px; height: 40px; border-radius: 6px; font-size: 18px; box-shadow: 0 0 0 1px var(--kn-hero-line); flex: none; }
.kn2-hero h1 { margin: 0; font-size: 24px; line-height: 30px; font-weight: 500; color: var(--kn-on-hero); overflow-wrap: anywhere; }
.kn2-hero .kn2-cap { font-size: 13px; color: var(--kn-on-hero-2); margin-top: 1px; }
.kn2-hero p { margin: 12px 0 0; font-size: 13.5px; line-height: 19px; color: var(--kn-on-hero-2); }
.kn2-ring { position: relative; width: 52px; height: 52px; flex: none; }
.kn2-ring svg { transform: rotate(-90deg); display: block; }
.kn2-ring circle { fill: none; stroke-width: 5; }
.kn2-ring .bg { stroke: var(--kn-hero-line); }
.kn2-ring .fg { stroke: var(--kn-on-hero); stroke-linecap: round; }
.kn2-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.kn2-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.kn2-stats > div { background: var(--kn-hero-box); border: 1px solid var(--kn-hero-line); border-radius: 6px; padding: 8px 10px; min-width: 0; }
.kn2-stats b { display: block; font-size: 18px; line-height: 24px; font-weight: 600; }
.kn2-stats small { font-size: 13px; color: var(--kn-on-hero-2); }
.kn2-banner { display: flex; gap: 12px; padding: 14px 16px; align-items: flex-start; }
.kn2-banner > .mi { color: var(--accent); font-size: 22px; flex: none; }
.kn2-banner b { font-size: 15px; font-weight: 500; color: var(--text); }
.kn2-banner p { margin: 2px 0 10px; font-size: 13px; line-height: 18px; color: var(--text-2); }
.kn2-banner .btn-primary.sm, .kn2-legacy .btn-primary.sm { min-height: 40px; padding: 8px 14px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.kn2-sect { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px -8px; }
.kn2-sect h2 { margin: 0; font: 500 12px/16px var(--font-head); letter-spacing: .6px; text-transform: uppercase; color: var(--text-table); }
.kn2-sect span { font-size: 13px; color: var(--muted); }
.kn2-ic { width: 40px; height: 40px; border-radius: 6px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.kn2-ic .mi { font-size: 22px; margin: 0; }
.kn2-ic.sm { width: 32px; height: 32px; } .kn2-ic.sm .mi { font-size: 18px; }
.kn2-ic.grey { background: var(--gray-100); color: var(--icon-2); }
.kn2-way { display: flex; gap: 12px; align-items: center; width: 100%; background: var(--card); border: 0; border-radius: 8px; padding: 14px; box-shadow: var(--shadow); position: relative; text-align: left; color: var(--text); font: inherit; }
.kn2-way b { display: block; font-size: 15px; font-weight: 500; }
.kn2-way small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 18px; }
.kn2-way .go { color: var(--icon-2); }
.kn2-best { position: absolute; top: -9px; right: 12px; font-size: 11px; font-weight: 700; color: var(--on-accent); background: var(--accent); border-radius: 6px; padding: 2px 6px; }
.kn2-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kn2-tile { background: var(--card); border: 0; border-radius: 8px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; min-height: 118px; position: relative; text-align: left; color: var(--text); font: inherit; min-width: 0; }
.kn2-tile:active { background: var(--gray-50); }
.kn2-tile .kn2-ic { width: 32px; height: 32px; } .kn2-tile .kn2-ic .mi { font-size: 18px; }
.kn2-tile .v { font-size: 24px; line-height: 32px; font-weight: 600; }
.kn2-tile .v small { font-size: 13px; font-weight: 500; color: var(--muted); }
.kn2-tile .t { font-size: 13px; font-weight: 500; }
.kn2-tile .s, .kn2-tile .ex { font-size: 13px; color: var(--muted); margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.kn2-tile.ghost { background: transparent; box-shadow: none; border: 1px dashed var(--disabled); }
.kn2-tile.ghost .kn2-ic { background: var(--gray-100); color: var(--icon-2); }
.kn2-old { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 500; color: var(--wait-text); border: 1px solid var(--wait-line); border-radius: 6px; padding: 0 5px; }
.kn2-danger > div:not(.ico) { color: var(--down); }
.kn2-danger .ico { background: var(--down-soft); color: var(--down); }
/* a block's lines */
.kn2-f .kn2-k { display: block; margin: 0 0 2px; color: var(--muted); }
.kn2-for { color: var(--accent); }
.kn2-f .grow { overflow-wrap: anywhere; font-weight: 400; }
.kn2-f .go { color: var(--icon-2); font-size: 18px; }
.kn2-code { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); }
.kn2-gc { display: inline-flex; align-items: center; height: 24px; padding: 0 7px; border-radius: 6px; background: var(--chip-bg); color: var(--neutral-text); font-size: 13px; font-weight: 500; flex: none; }
.kn2-adds { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 12px; border-top: 1px solid var(--divider); }
.card > .kn2-adds:first-child, .card > .empty + .kn2-adds { border-top: 0; }
.kn2-add { height: 40px; padding: 0 10px; border-radius: 6px; border: 1px dashed var(--disabled); background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.kn2-add .mi { font-size: 16px; margin: 0; }
.kn2-add.own { border-style: solid; border-color: var(--sel-line); }
.kn2-legacy { padding: 0; }
.kn2-lh { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px 0; }
.kn2-lh .mi { color: var(--icon-2); font-size: 20px; }
.kn2-lh b { font-size: 14px; font-weight: 500; display: block; }
.kn2-lh small { font-size: 13px; color: var(--muted); }
.kn2-ltext { margin: 8px 16px 0; padding: 8px 10px; border-left: 2px solid var(--divider); font-size: 13px; line-height: 18px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }  /* no inner scroller (§21.3) */
.kn2-acts { padding: 10px 16px 12px; display: flex; gap: 8px; }
.kn2-lab { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--text); }
.kn2-lab span { font-weight: 400; color: var(--muted); font-size: 13px; }
.kn2-in { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.kn2-meta { font-size: 13px; color: var(--muted); }
/* geos */
.kn2-mapcard { overflow: hidden; padding: 0; }
.kn2-geolists { padding: 4px 0; }
.kn2-grp { padding: 8px 16px 10px; }
.kn2-grp .h { font: 500 12px/16px var(--font-head); letter-spacing: .6px; text-transform: uppercase; color: var(--text-table); margin-bottom: 8px; display: flex; }
.kn2-grp .h span { margin-left: auto; font: 400 12px var(--font); letter-spacing: 0; text-transform: none; color: var(--muted); }
.kn2-gcs { display: flex; flex-wrap: wrap; gap: 4px; }
.kn2-geo { height: 40px; min-width: 44px; padding: 0 9px; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 500; border: 1px solid var(--divider); background: var(--card); color: var(--text); }
.kn2-geo.o { color: var(--ok-text); border-color: var(--ok-line); }
.kn2-geo.p { color: var(--wait-text); border-color: var(--wait-line); }
.kn2-geo.c { color: var(--down); border-color: var(--bad-line); }
.kn2-geo.sel { background: var(--accent-soft); color: var(--accent); border-color: var(--sel-line); }
.kn2-geo.mini { height: 20px; min-width: 0; padding: 0 6px; font-size: 12px; display: inline-flex; align-items: center; }
.kn2-map { position: relative; height: 240px; background: var(--kn-sea); overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; border-bottom: 1px solid var(--divider); }
.kn2-map.drag { cursor: grabbing; }
.kn2-map svg { width: 100%; height: 100%; display: block; }
.kn2-maploading { position: absolute; inset: 0; display: grid; place-items: center; }
.kn2-land { fill: var(--kn-land); stroke: var(--kn-land-line); stroke-width: .6; vector-effect: non-scaling-stroke; }
.kn2-land.o { fill: var(--up-soft); stroke: var(--ok-line); }
.kn2-land.p { fill: var(--warn-soft); stroke: var(--wait-line); }
.kn2-land.c { fill: var(--down-soft); stroke: var(--bad-line); }
.kn2-land.dim { opacity: .35; }
.kn2-land.sel { stroke: var(--accent); stroke-width: 2; }
.kn2-mk { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px 0 5px; border-radius: 11px; background: var(--card); box-shadow: var(--kn-glass-shadow); font-size: 11px; font-weight: 600; line-height: 1; color: var(--text); white-space: nowrap; cursor: pointer; }
.kn2-mk i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.kn2-mk.o i { background: var(--up); } .kn2-mk.p i { background: var(--warn); } .kn2-mk.c i { background: var(--down); }
.kn2-mk.dot { padding: 0; width: 12px; height: 12px; justify-content: center; }
.kn2-mk.dot span { display: none; }
.kn2-mk.dim { opacity: .3; }
.kn2-mk.sel { background: var(--accent); color: var(--on-accent); z-index: 3; }
.kn2-glass { background: var(--kn-glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--kn-glass-line); box-shadow: var(--kn-glass-shadow); }
@media (prefers-reduced-transparency: reduce) { .kn2-glass { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.kn2-mseg { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; gap: 2px; padding: 3px; border-radius: 10px; z-index: 4; }
.kn2-mseg button { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.kn2-mseg button.on { background: var(--card); color: var(--accent); box-shadow: var(--shadow-sm); }
.kn2-mseg button b { font-weight: 600; margin-left: 3px; color: var(--muted); }
.kn2-mseg button.on b { color: var(--accent); }
.kn2-mbtns { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; z-index: 4; }
.kn2-mbtns button { width: 40px; height: 40px; border: 0; background: transparent; color: var(--accent); display: grid; place-items: center; }
.kn2-mbtns button + button { border-top: 1px solid var(--kn-land-line); }
.kn2-mbtns .mi { font-size: 20px; margin: 0; }
.kn2-callout { position: absolute; left: 10px; right: 60px; bottom: 10px; border-radius: 12px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; z-index: 4; transform: translateY(12px); opacity: 0; pointer-events: none; }
.kn2-callout.on { transform: none; opacity: 1; pointer-events: auto; }
.kn2-callout .flag { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.kn2-callout .flag.o { background: var(--up-soft); color: var(--ok-text); } .kn2-callout .flag.p { background: var(--warn-soft); color: var(--wait-text); } .kn2-callout .flag.c { background: var(--down-soft); color: var(--down); }
.kn2-callout b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.kn2-callout small { font-size: 13px; color: var(--text-2); }
.kn2-callout .x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--gray-100); color: var(--icon-2); display: grid; place-items: center; flex: none; }
.kn2-callout .x .mi { font-size: 16px; margin: 0; }
/* paste and the sort check */
.kn2-pastecard { padding: 12px 16px; }
.kn2-paste { width: 100%; min-height: 220px; }
.kn2-wide { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.kn2-loadline { height: 3px; border-radius: 2px; background: var(--accent-soft); overflow: hidden; position: relative; }
.kn2-loadline::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--accent); opacity: .5; }
@keyframes kn2-ll { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: no-preference) {
  .kn2-loadline::after { width: 40%; opacity: 1; animation: kn2-ll 1.2s var(--ease) infinite; }
  .kn2-land { transition: opacity var(--t-2) var(--ease); }
  .kn2-mk { transition: opacity var(--t-1) var(--ease); }
  .kn2-callout { transition: transform var(--t-2) var(--ease-out), opacity var(--t-1) var(--ease); }
}
.kn2-skrow { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--divider); }
.kn2-skrow:first-child { border-top: 0; }
.kn2-bh { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.kn2-bh b { font-size: 15px; font-weight: 500; }
.kn2-bh .n { margin-left: auto; font-size: 12px; color: var(--muted); }
.kn2-fact { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; border-top: 1px solid var(--divider); font-size: 14px; line-height: 20px; color: var(--text); }
.kn2-fact .grow { overflow-wrap: anywhere; cursor: pointer; }
.kn2-fact small { display: block; font-size: 13px; color: var(--muted); }
.kn2-cb { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--disabled); background: var(--card); color: transparent; display: grid; place-items: center; flex: none; margin-top: 1px; padding: 0; }
.kn2-cb.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.kn2-cb .mi { font-size: 16px; margin: 0; }
.kn2-ed { width: 40px; height: 40px; margin: -9px -10px -9px 0; border: 0; background: none; color: var(--icon-2); display: grid; place-items: center; flex: none; }
.kn2-ed .mi { font-size: 18px; margin: 0; }
.kn2-pick { display: block; margin-top: 8px; height: 40px; max-width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: var(--card); color: var(--text); font: inherit; font-size: 16px; }
.kn2-foot { position: sticky; bottom: calc(var(--nav-h, 0px) + 8px); display: flex; gap: 8px; padding: 12px; background: var(--card); border-radius: 8px; box-shadow: var(--float-shadow); z-index: 5; }
.kn2-foot .btn-primary { flex: 1; }
body:has(.kn2-foot) .toast { bottom: calc(var(--nav-h, 0px) + 92px + env(safe-area-inset-bottom)); }
/* Admin › AI › Affiliates ask (2026-10-21, chats_stats.py, mockup-chats-analytics.html) */
.am-seg button { padding-left: 4px; padding-right: 4px; font-size: 13px; }
.af-pick { display: flex; align-items: center; gap: 8px; width: 100%; height: 44px; padding: 0 12px; border: 0; background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); color: var(--text); font: inherit; font-size: 15px; font-weight: 500; text-align: left; }
.af-pick .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-pick .mi { margin: 0; color: var(--icon-2); }
.af-upd { padding: 0 2px; }
.af-tiles { grid-template-columns: repeat(2, 1fr); row-gap: 12px; }
.af-tiles b { font-size: 20px; line-height: 26px; }
.af-d { display: block; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.af-d.up { color: var(--up); } .af-d.down { color: var(--down); }
.af-gs { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.af-gs .af-d { display: inline; }
.af-spark { width: 48px; height: 16px; flex: none; }
.af-spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.af-bl b { color: var(--text); font-weight: 600; }
.af-nd { padding: 0; }
.af-body { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.af-main { display: flex; flex-direction: column; gap: 16px; }
.af-cols { padding-top: 0; }
.sec-head + .am-row, .af-cols + .am-row, .af-segw + .am-row, .af-in + .am-row, .af-hint + .am-row { border-top: 0; }
.sec-head + .af-q { border-top: 0; }
.sec-head .sub { font-size: 13px; color: var(--muted); }
.af-more { display: flex; align-items: center; justify-content: center; gap: 4px; }
.af-more .mi { font-size: 18px; margin: 0; }
.af-dr { padding-top: 12px; }
.af-in { padding: 0 16px 8px; }
.af-hint { display: flex; gap: 8px; align-items: flex-start; width: calc(100% - 32px); text-align: left; font-family: inherit; margin: 0 16px 8px; padding: 10px 12px; background: var(--note-bg); border: 1px solid var(--note-line); border-radius: var(--radius); font-size: 13px; line-height: 18px; color: var(--note-text); }
.af-hint .mi { font-size: 18px; color: var(--note-icon); margin: 0; flex: none; }
.af-hint .t { flex: 1; min-width: 0; }
.af-hint b { color: var(--accent); font-weight: 500; }
.af-hint .go { color: var(--accent); align-self: center; }
.af-segw { padding: 0 16px 8px; }
.af-on { color: var(--accent); font-size: 18px; flex: none; }
.af-sheet { gap: 16px; }
.af-q { padding: 10px 16px; border-top: 1px solid var(--divider); font-size: 13px; line-height: 18px; color: var(--text-2); overflow-wrap: anywhere; }
.am-head + .af-q { border-top: 0; }
.af-q b { font-weight: 500; color: var(--text); }
.af-qw { font-size: 13px; color: var(--muted); margin-top: 2px; }
.af-pb { padding: 0 16px 12px; font-size: 13px; line-height: 19px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* What the bot decided v2 (2026-10-21, mockup-decision-feed-v2.html): one row per affiliate request, Open, chats */
#df-body, #df-list { display: flex; flex-direction: column; gap: 16px; }
#df-body .chips:empty, #df-facts:empty, #df-search[hidden] { display: none; }
#df-sub { font-size: 13px; line-height: 18px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
#df-sub b { color: var(--text); font-weight: 500; }
.df-sticky { position: sticky; top: var(--top-inset, 0px); z-index: 30; margin: 0 -16px; padding: 8px 16px; background: var(--bg); }
.df-segn .cnt { margin-left: 4px; background: var(--count); color: var(--on-count); border-radius: var(--radius); font-size: 11px; padding: 0 5px; line-height: 16px; display: inline-block; font-weight: 600; }
.df-day { padding: 12px 16px 4px; font: 500 12px/16px var(--font-head); letter-spacing: .6px; text-transform: uppercase; color: var(--text-table); }
.df-rq { display: flex; gap: 8px; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; text-align: left; color: var(--text); }
.df-rq:first-child, .df-day + .df-rq { border-top: 0; }
.df-rq .g { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.df-rq > .go, .df-crow > .go { color: var(--icon-2); align-self: center; font-size: 20px; margin: 0; }
.df-rq .l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.df-rq .grp { flex: 1; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.df-rq .tm { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.df-rq .q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.df-rq .q .who, .df-rq .q .df-n { color: var(--muted); }
.df-rq .q .df-n { font-size: 13px; }
.df-rq .out { display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); }
.df-rq .out .mi { font-size: 16px; color: var(--icon-2); flex: none; margin: 1px 0 0; }
.df-rq .out.wait .mi { color: var(--wait-text); }
.df-rq .out.yes .mi { color: var(--accent); }
.df-rq .meta { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.df-rq .meta .mp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.picon.df-mini { display: inline-grid; width: 14px; height: 14px; font-size: 9px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.df-small { display: flex; gap: 8px; align-items: center; width: 100%; min-height: 44px; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; font-size: 13px; color: var(--muted); text-align: left; }
.df-small .mi { font-size: 16px; color: var(--icon-2); margin: 0; }
.df-small .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-small .go { color: var(--accent); font-weight: 500; }
.df-end { padding: 12px 16px; font-size: 13px; color: var(--muted); text-align: center; border-top: 1px solid var(--divider); }
.df-pchip { display: inline-flex; align-items: center; gap: 6px; }
.df-crow { display: flex; gap: 12px; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; text-align: left; color: var(--text); }
.df-crow:first-child { border-top: 0; }
.df-crow .g { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.df-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; padding: 16px; font-size: 13px; line-height: 18px; }
.df-facts dt { color: var(--muted); }
.df-facts dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.df-msg { display: flex; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--divider); }
.df-day + .df-msg { border-top: 0; }
.df-msg .tm { width: 38px; flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.df-msg .g { flex: 1; min-width: 0; }
.df-msg .who { font-size: 13px; color: var(--muted); }
.df-msg .who b { color: var(--text); font-weight: 500; font-size: 13px; }
.df-msg .txt { font-size: 14px; line-height: 20px; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.df-earlier { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--divider); background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--accent); }
.df-earlier .mi { font-size: 18px; margin: 0; }
.df-start { padding: 12px 16px; font-size: 13px; color: var(--muted); text-align: center; border-bottom: 1px solid var(--divider); }
.df-earlier + .df-day, .df-start + .df-day { border-top: 0; }
/* 2026-11-04 the owner (phone): a tag in two lines rode onto the message above — the old -8px top margin assumed one
   centred line. Now: 6px clear of the text whatever the lines, the icon on the first line, the tap height kept */
.df-tag { display: inline-flex; gap: 6px; align-items: flex-start; max-width: 100%; min-height: 36px; margin: -2px 0 -8px; padding: 8px 0; border: 0; background: none; font: inherit; font-size: 12px; line-height: 16px; color: var(--accent); font-weight: 500; text-align: left; }
.df-tag .mi { flex: none; font-size: 14px; line-height: inherit; margin: 0; }
.df-tl { padding: 4px 16px 12px; }
.df-ti { display: flex; gap: 10px; position: relative; padding: 8px 0; }
.df-ti::before { content: ""; position: absolute; left: 13px; top: 36px; bottom: -8px; width: 2px; background: var(--divider); }
.df-ti:last-child::before { display: none; }
.df-ti .dot { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gray-100); color: var(--icon-2); }
.df-ti .dot .mi { font-size: 16px; margin: 0; }
.df-ti .dot.acc { background: var(--accent-soft); color: var(--accent); }
.df-ti .dot.wait { background: var(--warn-soft); color: var(--wait-text); }
.df-ti .g { flex: 1; min-width: 0; }
.df-ti .h { font-size: 13px; line-height: 18px; color: var(--muted); }
.df-ti .h b { color: var(--text); font-weight: 500; font-size: 13px; }
.df-ti .bubble { margin-top: 4px; padding: 8px 10px; border-radius: var(--radius); background: var(--gray-50); font-size: 14px; line-height: 20px; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.df-ti .d { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--text-2); }
.df-blk { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; text-align: left; color: var(--accent); }
.df-blk .mi { font-size: 18px; margin: 0 0 0 auto; }
.df-links { display: flex; gap: 8px; }
.df-links button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.df-links .mi { font-size: 18px; margin: 0; }
.df-fsheet { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 16px; }
.df-fl { display: flex; flex-direction: column; gap: 8px; }
.df-fl .list-title { padding: 0; }
.df-fsheet .mc-switch { border-top: 0; }

/* What the bot decided › Chats, 2026-10-21 (mockup-df-chats.html variant A): who the chat is linked to first, the chat
   title in full (2 lines), the program once; Program / Lead dropdowns in Filters */
.df-pick { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font: inherit; font-size: 14px; color: var(--text); text-align: left; }
.df-pick .v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-pick small, .df-opt small { color: var(--muted); font-size: 13px; }
.df-pick > .mi { color: var(--icon-2); margin: 0; }
.df-av { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.df-av .mi { font-size: 18px; margin: 0; }
.df-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; font-size: 14px; color: var(--text); text-align: left; }
.df-opt:first-child { border-top: 0; }
.df-opt .g { flex: 1; min-width: 0; }
.df-opt small { display: block; margin-top: 1px; overflow-wrap: anywhere; }
.df-opt .ck { color: var(--accent); margin: 0; }
.df-back { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 4px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--accent); }
.df-back .mi { margin: 0; }
/* Sheets scroll as one (review 2026-10-22): the footer of a long sheet stays in reach, the page behind never scrolls
   when a sheet reaches its end, and a sheet with several lists has one scroller, not a small box per list */
.sheet-body, .sheet-list { overscroll-behavior: contain; }
.sheet-body > .sheet-foot { position: sticky; bottom: 0; z-index: 2; background: var(--card); }
.sheet-body:has(> .sheet-list ~ .sheet-list) > .sheet-list { overflow: visible; }
.sheet-body:has(> .sheet-list ~ .sheet-list) > * { flex-shrink: 0; }
/* Refie's AI Desk card (crm.js cxRefieCard): Refie + a speech bubble; tokens only, light + dark. Moved here from
   refie-switches.js when the switches were removed (2026-10-22) */
.rf-card { display: flex; gap: 10px; align-items: flex-end; padding: 14px 14px 16px; }
.rf-card-refie { width: 116px; height: 100px; flex: none; }
.rf-bubble { position: relative; flex: 1; min-width: 0; background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 20px; color: var(--text); margin-bottom: 14px; }
.rf-bubble::after { content: ""; position: absolute; left: -6px; bottom: 14px; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.rf-bubble b { font-weight: 600; }
.rf-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rf-acts button { border: 0; background: var(--card); color: var(--accent); font: inherit; font-size: 13px; font-weight: 500; padding: 6px 10px; border-radius: var(--radius); box-shadow: var(--shadow-sm); cursor: pointer; }
/* the Refie line inside one AI Desk and «Waits for the team» said by Refie (docs/plan-refie-desk.md, approved
   mockup-refie-desk-v2.html v3; only with «Refie in the app»). Refie's own motion and colours stay inside the canvas (§20) */
.rf-lrow { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.rf-line-refie { width: 84px; height: 72px; flex: none; }  /* the same size as in Waits for the team (the owner 2026-11-04) */
.rf-say { position: relative; flex: 1; min-width: 0; background: var(--bg); border-radius: 12px; padding: 8px 12px; font-size: 15px; line-height: 21px; color: var(--text); overflow-wrap: anywhere; }
.rf-say::after { content: ""; position: absolute; left: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.rf-say b { font-weight: 500; }
.rf-warn { color: var(--wait-text); font-weight: 500; }
.rf-warn .mi { font-size: 18px; line-height: 21px; vertical-align: -4px; margin: 0 2px 0 0; }
.rf-joke { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--muted); }
.rf-lact { margin-top: 8px; }
.rf-rest { border-top: 1px solid var(--divider); background: var(--warn-soft); border-radius: 0 0 var(--radius) var(--radius); }
.rf-waits { padding-bottom: 12px; }
.rf-wtop { display: flex; align-items: center; gap: 10px; padding: 12px 16px 4px; }
.rf-waits-refie { width: 84px; height: 72px; flex: none; }
.rf-wt { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 22px; font-weight: 500; color: var(--text); }
.rf-wt .n { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); }
.rf-wsay { margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.rf-wbub { position: relative; margin: 6px 12px 0; background: var(--bg); border-radius: 12px; }
.rf-wbub::before { content: ""; position: absolute; left: 44px; top: -5px; width: 10px; height: 10px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.rf-wbub > .wv-line:first-child { border-top: 0; }
/* One UI system §21.1 (2026-10-22): 4 button kinds. Width by a class, not inline; a button after content in a card
   sits 12px below it; a row of buttons shares the width; one icon button 40×40 everywhere. Older one-off kinds
   (.cbtn, .sug, .cx-qlink, .hist-btn, .linkish) are gone: their markup uses the standard ones (2026-10-24) */
.btn-block { display: block; width: 100%; }
.btn-after { margin-top: 12px; }
.btn-row { display: flex; gap: 8px; }
.btn-row > button { flex: 1; min-width: 0; }
.linkbtn.flush { padding-left: 0; font-size: 14px; }  /* a link with no gap before it (was .linkish / inline padding:0) */
.push-end, .ad-acts [data-toggle] { margin-left: auto; }
.linkbtn.quiet { color: var(--muted); }
.contacts .btn-light { display: inline-flex; align-items: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-xbox .btn-light { align-self: flex-start; }
.frow-main { display: flex; gap: 10px; width: 100%; padding: 0; border: 0; background: none; font: inherit; text-align: left; }
.frow .chip { flex: none; }
.btn.ico { border: 0; background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); width: 40px; height: 40px; padding: 0; display: grid; place-items: center; color: var(--accent); flex: none; }
.btn.ico .mi { margin: 0; font-size: 22px; }
/* Inbox list blocks 16px apart like every screen (§19.1): the Today card no longer sits on «Longest waiting first»;
   the sort line is the list's label, 8px above it (the owner 2026-10-22, screenshot) */
#cx-ibox { display: flex; flex-direction: column; gap: 16px; }
/* One UI system §21.5, type (2026-10-22). Group labels: Inter 13/18 500 in sentence case (Oswald uppercase stays only
   in table column headers, as in the ReferOn admin). What a person reads in a row (the affiliate's question, what the
   bot did) is 15px --text; captions are 13px at least (11-12px only for badges and counters) */
.list-title, .df-day, .kv-list .group, .kn2-sect h2, .kn2-grp .h, .am-head, .fb-sec {
  font: 500 13px/18px var(--font); letter-spacing: 0; text-transform: none; color: var(--text-2);
}
.cx-item .q, .cx-irow .cx-qs .ql { font-size: 15px; line-height: 21px; color: var(--text); }
.df-rq .q { font-size: 15px; line-height: 21px; }
.df-rq .out { font-size: 14px; line-height: 20px; }
.cx-item .why, .cx-item .age, .cx-irow .h .id, .cx-drow .h .id, .cx-irow .h .age, .cx-drow .h .age, .cx-irow .m,
.cx-irow .cx-qs .ql .a, .cx-irow .cx-qs .ql.more, .cx-irow .dr, .df-rq .tm, .df-rq .meta, .df-rq .q .df-n,
.cx-pacts .item small, .rk-shares .h, .rk-idea .sign { font-size: 13px; line-height: 18px; }
.rk-shares .h, .rk-idea .sign { text-transform: none; letter-spacing: 0; }
.cx-pname { font-size: 30px; line-height: 38px; font-weight: 500; }  /* one title size and weight (§19.4) */
/* a manager's broadcast to their affiliate chats (2026-10-22, broadcast.js, mockup-broadcast.html approved by ui-gate) */
.bc-step { display: block; padding: 8px 16px 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.bc-pad { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.bc-pad .chips { margin: 0 -16px; }
.bc-sel { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.bc-grp { font-size: 13px; color: var(--muted); padding: 8px 16px 0; }
.bc-grp + .lrow-w { border-top: 0; }
.lrow-w .bc-lng { flex: none; margin-right: 16px; min-width: 44px; }
.bc-main { flex: 1; min-width: 0; }
.bc-main b { display: block; font-size: 15px; line-height: 20px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-main small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.bc-badge { font-size: 12px; line-height: 16px; font-weight: 500; padding: 2px 6px; border-radius: var(--radius); background: var(--chip-bg); color: var(--text-2); margin-left: 6px; }
.bc-pad .bc-fresh { margin: 0 -16px; width: calc(100% + 32px); border-bottom: 1px solid var(--divider); }
.bc-sent { display: block; color: var(--ok-text); }
.bc-sent .mi { font-size: 14px; vertical-align: -2px; margin-right: 2px; }
.bc-fmt { display: flex; gap: 8px; align-items: center; }
.bc-fmt .bc-count { margin: 0 0 0 auto; }
.bc-fmt button { min-width: 44px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.bc-fmt .mi { font-size: 20px; margin: 0; }
.bc-body b, .bc-body strong { font-weight: 600; }
.bc-body a { color: var(--accent); }
.bc-text { width: 100%; box-sizing: border-box; min-height: 120px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); font: 400 16px/22px Inter, sans-serif; padding: 10px 12px; resize: vertical; }
.bc-text:focus { border-color: var(--accent); outline: 0; }
.bc-count { font-size: 13px; color: var(--muted); text-align: right; margin-top: -4px; }
.bc-head { font-size: 13px; line-height: 18px; color: var(--muted); background: var(--gray-50); border-radius: var(--radius); padding: 8px 12px; }
.bc-note, .bc-warn { display: flex; gap: 8px; align-items: flex-start; border-radius: var(--radius); padding: 10px 12px; font-size: 13px; line-height: 18px; }
.bc-note { background: var(--note-bg); border: 1px solid var(--note-line); color: var(--note-text); }
.bc-note .mi { color: var(--note-icon); font-size: 18px; margin: 0; }
.bc-warn { background: var(--warn-soft); color: var(--text); }
.bc-warn .mi { color: var(--warn); font-size: 18px; margin: 0; }
.bc-ai { display: inline-flex; align-items: center; gap: 6px; width: fit-content; }
.bc-ai .mi { font-size: 18px; margin: 0; }
.bc-nl { border: 0; padding: 0; font-size: 13px; line-height: 18px; }
.bc-again { align-self: flex-start; padding-left: 0; font-size: 13px; }
.bc-sample { background: var(--gray-50); border-radius: var(--radius); padding: 10px 12px; font-size: 15px; line-height: 22px; color: var(--text); overflow-wrap: anywhere; }
.bc-sample .hd { font-weight: 500; }
.bc-sample .bc-body { white-space: pre-wrap; }
.bc-sample small { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.bc-sample details { margin-top: 8px; border-top: 1px solid var(--divider); padding-top: 4px; font-size: 14px; line-height: 20px; color: var(--text-2); white-space: pre-wrap; }
.bc-sample summary { color: var(--accent); font-weight: 500; font-size: 13px; cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.bc-sum { font-size: 15px; color: var(--text); }
.bc-sum b { font-weight: 500; }
.bc-rep { display: flex; gap: 12px; }
.bc-rep > div { flex: 1; background: var(--gray-50); border-radius: var(--radius); padding: 10px 12px; }
.bc-rep b { display: block; font-size: 22px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.bc-rep .ok b { color: var(--up); }
.bc-rep .bad b { color: var(--down); }
.bc-rep .skip b { color: var(--text-2); }
.bc-rep small { font-size: 13px; color: var(--muted); }
.bc-fail { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--text-2); }
.bc-fail .mi { color: var(--down); font-size: 18px; margin: 0; }
.bc-fail b { font-weight: 500; }
.bc-hist .bc-meta { display: flex; gap: 8px; font-size: 13px; line-height: 18px; color: var(--muted); }
.bc-hist .bc-meta span { margin-left: auto; font-variant-numeric: tabular-nums; }
.bc-hist .bc-q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 20px; color: var(--text); }
.bc-hist > div { flex: 1; min-width: 0; }
.bc-skel { height: 16px; }
.bc-err { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bc-wait .ico .mi { color: var(--disabled); }
/* §21.5 captions at 13px (visual-qa 2026-10-22: sub-lines, decision feed meta, Knowledge stats were 11.5-12px) */
.sub, .mem-sub, .cx-dlv .pn, .kn2-stats small, .kn2-hero .kn2-cap { font-size: 13px; line-height: 18px; }
.mc-ai-row .btn-primary { min-height: 40px; height: auto; }
/* auto-replies easy + Change several chats (2026-10-22, docs/plan-auto-easy.md, mockup-auto-easy.html) */
.list .row.cx-static { cursor: default; }
.list .row small.cx-wrap { white-space: normal; }
.mp-row[aria-disabled="true"] { cursor: default; }
.mp-row[aria-disabled="true"] .ck, .mp-row[aria-disabled="true"] .n { opacity: .5; }
.cx-pick .ad-who .m { white-space: normal; }
.info-alert.cx-auwarn { margin: 12px 16px; }
.fb-opts.cx-bopts { padding: 12px 16px 0; }
.list-title.cx-blab { padding: 12px 16px 6px; }
/* AI Desk settings › Sounds in the team chat (2026-11-05, mockup-desk-sounds.html): the plain lists under the switches */
.cx-always { padding: 4px 16px 12px; margin: 0; list-style: none; font-size: 13px; line-height: 19px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }
/* Bot activity rows (2026-10-22, mockup-bot-activity.html v2): one-line identity lines that never wrap (company,
   Telegram chat, AI Desk topic + the manager quiet), the question up to 2 lines, the status line */
.df-rq .g, .df-crow .g { gap: 4px; }
.df-crow { align-items: center; }
.df-l1, .df-l2, .df-l3, .df-l4 { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.picon.df-logo { display: inline-grid; width: 20px; height: 20px; font-size: 11px; border-radius: 5px; flex: none; margin: 0; }
.df-co { font-size: 15px; line-height: 21px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--text); }
.df-more { flex: none; font-size: 13px; color: var(--muted); }
.df-l1 .tm { margin-left: auto; flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.df-wait { margin-left: auto; flex: none; font-size: 13px; line-height: 20px; font-weight: 500; padding: 0 8px; border-radius: 10px; background: var(--count); color: var(--on-count); font-variant-numeric: tabular-nums; }
.df-wait + .tm { margin-left: 8px; }
.df-l2 .mi, .df-l3 .mi { font-size: 16px; margin: 0; color: var(--icon-2); flex: none; }
.df-l2 .tx { font-size: 14px; line-height: 20px; color: var(--text); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.df-l3 { font-size: 13px; line-height: 18px; color: var(--muted); }
.df-l3 .tx { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.df-l3 .dot { flex: none; }
.df-l4 { font-size: 14px; line-height: 20px; color: var(--text-2); }
.df-l4 .status { flex: none; }
.df-l4 .k, .df-l4 .sep { flex: none; color: var(--muted); }
/* 2026-11-04 the owner: «почему висит единичка» — the row says what exactly waits (crm_app.waits_line) */
.df-l5 { display: flex; align-items: flex-start; gap: 6px; min-width: 0; font-size: 13px; line-height: 18px; color: var(--wait-text); }
.df-l5 .mi { flex: none; font-size: 16px; line-height: 18px; margin: 0; }
.df-l5 .k { flex: none; font-weight: 500; }
.df-l5 .tx { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.df-l5 .wmore { flex: none; white-space: nowrap; color: var(--muted); font-weight: 400; }
/* the chat screen: everything that waits, in full, under the chat (2026-11-04 the owner) */
.cx-waitsc { padding-bottom: 6px; }
.cx-waitsc .df-l5 { padding: 0 16px 10px; font-size: 14px; line-height: 20px; }
.cx-waitsc .df-l5 .mi { line-height: 20px; }
.cx-waitsc .df-l5 .tx { display: block; overflow: visible; -webkit-line-clamp: unset; }
.cx-waitsc .sec-head .n { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); }
/* a waiting thing = a row that opens its own card; one primary per screen = the bar (ui-gate on the mockup) */
.wv-line { display: flex; flex-direction: column; border-top: 1px solid var(--divider); }
.cx-waitsc .sec-head + .wv-line { border-top: 0; }
.wv-row { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 10px 16px; border: 0; background: none; text-align: left; font: inherit; color: var(--text); min-height: 48px; }
.wv-row > .mi { flex: none; font-size: 18px; line-height: 22px; margin: 0; color: var(--wait-text); }
.wv-row .g { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wv-row .t { font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.wv-row .w { font-size: 13px; line-height: 18px; color: var(--muted); overflow-wrap: anywhere; }
.wv-row .x { flex: none; font-size: 13px; line-height: 22px; color: var(--muted); }
.wv-row .go { flex: none; font-size: 20px; line-height: 22px; color: var(--icon-2); margin: 0; }
.wv-asks { padding: 0 16px 10px 44px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 18px; color: var(--text-2); overflow-wrap: anywhere; }
.wv-asks .tm { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 6px; }
.wv-fix { padding: 0 16px 12px 44px; }
.df-l4 .tx { overflow: hidden; text-overflow: ellipsis; min-width: 72px; flex: 0 1 auto; color: var(--text); }
.df-l4 .stt { flex: none; color: var(--text-2); }
.df-l4 .stt.o { color: var(--wait-text); font-weight: 500; }
.df-td { margin-left: auto; padding-left: 8px; font-size: 13px; color: var(--muted); }
.df-td { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }  /* long counters shrink, never past the row */
.df-prog { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }  /* the chat page: the program with its logo */
/* §21 tails (2026-10-23): Knowledge hero buttons and the chat page's copy buttons look like .btn-light; the profile's
   number chips are 40px to tap; the last 12px captions are 13px */
.kn2-hbtn { border: 0; background: var(--card); color: var(--accent); box-shadow: var(--shadow); }
#dz-ai-box { margin-top: 8px; }
.cx-mid { background: var(--card); box-shadow: var(--shadow); font-size: 14px; }
.sip { min-height: 40px; }
.rk-ctx .sub, .ad-selhead .sub, .ad-tell .sub { font-size: 13px; line-height: 18px; }
/* a sheet of choices with an icon and a sub-line (Why close it?; was Wrong?, gone 2026-11-03) */
.df-wrong button { justify-content: flex-start; align-items: flex-start; }
.df-wrong button .mi { color: var(--accent); font-size: 20px; margin: 0; flex: none; }
.df-wrong .item { white-space: normal; }
.df-wrong .item small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
/* AI Desk header in one row (2026-10-23, mockup-ui-a-inbox.html V1): the program name sits next to its icon, the
   status and the group under it, the buttons on the right; the name never pushes the buttons off */
.cx-ph .cx-phrow { align-items: flex-start; }
.cx-ph .cx-pname { font-size: 24px; line-height: 30px; -webkit-line-clamp: 2; }
.cx-ph .cx-grp .cx-st { margin-left: 0; font-size: 13px; }
.cx-klink { padding-top: 8px; padding-bottom: 8px; }
/* Today as one line that opens (2026-10-23) */
/* the question sheet: the chat's recent messages (2026-10-23, mockup B V1) */
.cx-recent { border: 1px solid var(--divider); border-radius: var(--radius); }
.cx-recent summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; cursor: pointer; font-weight: 500; color: var(--accent); }
.cx-recent summary::-webkit-details-marker { display: none; }
.cx-recent summary .mi { margin: 0; font-size: 18px; }
.cx-recent summary .fold { margin-left: auto; color: var(--icon-2); }
.cx-recent[open] summary .fold { transform: rotate(180deg); }
.cx-rm { padding: 8px 12px; border-top: 1px solid var(--divider); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.cx-rm b { font-weight: 500; }
.cx-rm .t { margin-left: 6px; font-size: 13px; color: var(--muted); }
.cx-rm.team { background: var(--accent-soft); }
/* Admin (2026-10-23, mockup D V1): text tabs as one chip row; the AI entries are 56px rows of one list card */
.ad-tabchips { margin-top: -4px; }
.ad-elist { padding: 0; overflow: hidden; }
.ad-erow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 8px 8px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; text-align: left; color: var(--text); }
.ad-erow:first-child { border-top: 0; }
.ad-erow > .mi.ico { font-size: 22px; margin: 0; color: var(--accent); flex: none; }
.ad-erow > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ad-erow b { font-size: 15px; line-height: 20px; font-weight: 500; }
.ad-erow small { font-size: 13px; line-height: 18px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-erow .go { flex: none; }
.ad-erow:active { background: var(--gray-50); }
/* Inbox in sections (2026-10-23, the owner: the chips were steps of one thing): a section label sits 8px above its card */
#cx-ibox > .cx-sect { margin: 0 0 -8px; padding: 0 4px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-2); }
.cx-back-open { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; }
.cx-back-open .mi { margin: 0; font-size: 18px; }
#cx-dbox { display: flex; flex-direction: column; gap: 16px; }
.cx-klink small { font-size: 13px; line-height: 18px; }  /* §21.5 captions 13px (the Knowledge and Done rows) */

/* AI Desk › Summary and a chat's Summary (2026-10-23, mockup-desk-summary.html) */
.cx-kp { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--divider); }
.cx-kp > div { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border-left: 1px solid var(--divider); }
.cx-kp > div:first-child { border-left: 0; }
.cx-kp span { font-size: 13px; line-height: 18px; color: var(--muted); }
.cx-kp b { font-size: 20px; line-height: 28px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.cx-kp b small { font-size: 14px; font-weight: 400; color: var(--muted); }
.cx-kp b.wait { color: var(--wait-text); }
.list .row .cx-sline { display: block; margin-top: 2px; font-size: 15px; line-height: 22px; font-weight: 400; color: var(--text); overflow-wrap: anywhere; }
.cx-srow, .cx-plan { align-items: flex-start; }
.cx-srow .go, .cx-plan .go { align-self: center; }
.cx-stags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cx-stag { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: var(--radius); background: var(--gray-100); color: var(--text-2); font-size: 12px; line-height: 20px; font-weight: 500; }
.cx-stag .mi { margin: 0; font-size: 14px; }
.cx-stag.open { background: var(--warn-soft); color: var(--wait-text); }
.cx-stag.ok { background: var(--up-soft); color: var(--up); }
.cx-when { flex: none; font-size: 13px; line-height: 22px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.cx-when.late { color: var(--wait-text); font-weight: 500; }
.cx-okic { color: var(--up); }
.cx-tday .dh .linkbtn { flex: none; font-size: 14px; }
.cx-snm { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cx-snm .t1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-snm .m { margin-left: auto; flex: none; font-size: 13px; font-weight: 400; color: var(--muted); }
.cx-stt .sub { font-size: 13px; line-height: 18px; color: var(--muted); }
/* the person's language for the owner's messages (2026-10-23, mockup-message-language.html): tag, tabs, Translate */
.ml-tag { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-left: 6px; border-radius: var(--radius); font-size: 11px; line-height: 16px; font-weight: 500; color: var(--text-2); background: var(--chip-bg); vertical-align: 1px; }
.card > .tabs.ml-tabs { margin-bottom: 12px; }
.ml-tr { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ml-c { text-align: center; } .ad-new + .ml-c { margin-top: 8px; } .ml-mt { margin-top: 4px; }
.ad-row .mi.go { font-size: 18px; color: var(--icon-2); align-self: center; }
/* the program brain (2026-10-27, mockup-program-brain.html, brain.py): To check cards, a bot line's sheet */
.br-cnt { margin-left: 6px; background: var(--count); color: var(--on-count); border-radius: var(--radius); font-size: 11px; padding: 0 5px; line-height: 16px; display: inline-block; font-weight: 600; vertical-align: 1px; font-variant-numeric: tabular-nums; }
.br-qh { padding: 12px 16px 0; display: flex; gap: 8px; align-items: center; }
.br-qh .area { font-size: 13px; line-height: 18px; color: var(--muted); flex: 1; min-width: 0; }
.br-qv { padding: 4px 16px 0; font-size: 16px; line-height: 22px; font-weight: 500; overflow-wrap: anywhere; }
.br-src { padding: 6px 16px 0; font-size: 13px; line-height: 18px; color: var(--text-2); display: flex; gap: 6px; overflow-wrap: anywhere; }
.br-src .mi { font-size: 16px; color: var(--icon-2); vertical-align: 0; flex: none; margin-top: 1px; }
.br-src q { color: var(--muted); }
.br-acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px 14px; }
.br-acts .btn-light.sm { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-help { padding: 0 16px 12px; margin-top: -6px; font-size: 13px; line-height: 18px; color: var(--muted); }
/* To check, two answers (2026-11-06, mockup-knowledge-two-answers.html): a question, the full texts as choice rows
   (.cl-radio), one Confirm only under the card with a pick, Said twice = both texts + Merge, a result in place */
.br-ask { padding: 6px 16px 10px; font-size: 16px; line-height: 22px; font-weight: 500; }
.br-pick { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--divider); border-radius: 0; background: none; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.br-pick .cl-radio { margin-top: 1px; }
.br-pick[aria-checked="true"] { background: var(--accent-soft); }
.br-pick:disabled { cursor: default; opacity: 1; color: var(--muted); }  /* the reason under it stays readable */
.br-pick:disabled .cl-radio { opacity: .4; }
.br-pick .t, .br-said .t { flex: 1; min-width: 0; font-size: 15px; line-height: 21px; overflow-wrap: anywhere; white-space: pre-line; }
.br-pick .w, .br-said .w { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--muted); white-space: normal; }
.br-said { padding: 10px 16px; border-top: 1px solid var(--divider); }
.br-keep { padding: 10px 16px 0; border-top: 1px solid var(--divider); font-size: 13px; line-height: 18px; color: var(--text-2); overflow-wrap: anywhere; }
.br-foot { padding: 12px 16px 16px; border-top: 1px solid var(--divider); }
.br-foot .btn-primary { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.br-res { display: flex; gap: 12px; padding: 12px 16px 0; font-size: 14px; line-height: 20px; }
.br-res .mi { color: var(--accent); font-size: 22px; flex: none; }
.br-res .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.br-res small { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--muted); }
.br-big { padding: 14px 16px 2px; font-size: 24px; line-height: 32px; font-weight: 500; overflow-wrap: anywhere; }
.br-state { padding: 0 16px 12px; font-size: 13px; line-height: 18px; color: var(--text-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.br-flat { box-shadow: none; border-radius: 0; border-top: 1px solid var(--divider); }
.br-arch { padding: 4px 16px 12px; }
.br-arch .btn-light { width: 100%; }
/* AI Desk chats v2 (2026-10-27, docs/plan-desk-chats-v2.md, mockup-desk-chats-v2.html) */
.df-l3 .cx-rf { margin-left: auto; }
.picon.df-logo.cx-chico { border-radius: 50%; }  /* the chat's own photo on a chat row: round, the Bot activity size */
.cx-who .cx-wr { min-height: 44px; }
.cx-who .cx-wr .v.lnk { color: var(--accent); }
.cx-who .cx-wr > .mi { font-size: 20px; margin: 0; align-self: center; flex: none; }
.cx-who .cx-wr > .mi.ext { color: var(--accent); }
button.cx-atag { border: 0; font-family: inherit; cursor: pointer; }
button.cx-atag:active { opacity: .72; }
.df-rq .df-l4 { align-items: flex-start; }
.df-rq .df-l4 .tx { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.title-row .tr-main .sub .df-wait { display: inline-block; margin: 4px 0 0; }
.cx-sklist .df-rq .skeleton { display: block; height: 12px; border-radius: 4px; }
.cx-sklist .df-day .skeleton { display: block; height: 12px; border-radius: 4px; }
/* one auto-replies block (the chat's robot sheet, the AI Desk's Refie screen): the main switch, its topics as ticks */
.mc-switch .txt img.cx-rfface { width: 24px; height: 24px; object-fit: contain; vertical-align: -6px; margin-right: 6px; }
.cx-rfl { margin: 16px 16px 0; }
.cx-rftop { margin: 0 16px 12px 28px; border-left: 2px solid var(--accent-soft); }
.cx-rfcap { padding: 0 0 4px 14px; font-size: 13px; line-height: 18px; color: var(--muted); }
.cx-rfck { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 4px 0 4px 14px; border: 0; background: none; font: inherit; font-size: 14px; line-height: 20px; color: var(--text); text-align: left; cursor: pointer; }
.cx-rfck .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cx-rfck small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.cx-rfck.on .ck { background: var(--accent); border-color: var(--accent); }
.cx-rfck.on .ck .mi { color: var(--on-accent); }
.cx-rfck:disabled { cursor: default; }
.cx-rfck:disabled .ck { opacity: .5; }
.cx-rfck.dis { color: var(--muted); cursor: default; }
.cx-rfck > .mi { font-size: 18px; color: var(--icon-2); margin: 0; flex: none; }
.cx-rfck .btn-light.sm { margin-top: 6px; }
.cx-rfoff { margin: 0 16px 12px; font-size: 13px; line-height: 18px; color: var(--muted); }
.cx-rfafter { border-top: 1px solid var(--divider); }
/* the AI Desk home: a program folds (2+ programs) */
button.cx-pghead { width: 100%; min-height: 64px; border: 0; background: none; font: inherit; text-align: left; color: var(--text); cursor: pointer; }
button.cx-pghead:active { opacity: .72; }
.cx-pghead .grow { flex: 1; min-width: 0; }
.cx-pghead > .mi { font-size: 22px; color: var(--icon-2); margin: 0; flex: none; }
.cx-pghead .df-wait { margin-left: 0; }
.cx-pgbody { border-top: 1px solid var(--divider); }
.cx-pgbody > .row:first-child { border-top: 0; }
/* Bot activity: the AI Desk topic opens the chat's card in the app */
.df-facts .df-tlink { display: inline-flex; min-height: 32px; gap: 2px; font-size: inherit; font-weight: 500; }
.df-facts .df-tlink .mi { font-size: 18px; }
@media (max-width: 340px) { .df-crow .df-td { display: none; } }  /* a narrow phone: the company and the status first */
/* ===== Admin › Clients (admin.js, mockup-clients.html 2026-10-30): a company pays for its managers' AI ===== */
.cl-wrap { display: flex; flex-direction: column; gap: 16px; }
.cl-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 4px 12px 16px; border: 0; border-top: 1px solid var(--divider); background: none; font: inherit; text-align: left; color: var(--text-table); }
.cl-row:first-child { border-top: 0; }
.cl-rbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-row .ltitle { -webkit-line-clamp: 1; font-size: 15px; }
.cl-row .go { color: var(--faint); padding-right: 12px; }
.cl-rm { border: 0; background: none; width: 44px; height: 44px; color: var(--icon-2); flex: none; display: grid; place-items: center; }
.cl-empty { padding: 32px 24px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; }
.cl-empty .mi { font-size: 40px; color: var(--icon-2); }
.cl-empty b { color: var(--text); font-weight: 500; font-size: 16px; }
.cl-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.cl-big { font-size: 28px; line-height: 36px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text); }
.cl-big small { font-size: 14px; color: var(--muted); font-weight: 400; }
.cl-bar { height: 8px; border-radius: 4px; background: var(--gray-50); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cl-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.cl-bar.low i { background: var(--warn); }
.cl-cap { font-size: 13px; line-height: 18px; color: var(--muted); }
.cl-link { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--line); background: var(--gray-50); border-radius: var(--radius); padding: 8px 12px; min-height: 44px; box-sizing: border-box; font: inherit; text-align: left; }
.cl-link code { font: 13px var(--mono); color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-link .mi { color: var(--accent); font-size: 18px; }
.cl-link.off code { color: var(--faint); text-decoration: line-through; }
.cl-body .btn-row .mi { font-size: 18px; margin-right: 4px; vertical-align: -4px; }
.cl-legend { display: flex; gap: 12px; flex-wrap: wrap; padding: 0 16px 8px; font-size: 13px; color: var(--muted); }
.cl-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.k-own { background: var(--c-cpa); }
.k-chats { background: var(--c-rs); }
.k-auto { background: var(--c-cpc); }
.cl-mgr { padding: 12px 16px; border-top: 1px solid var(--divider); }
.cl-mgr .h { display: flex; align-items: baseline; gap: 8px; }
.cl-mgr .h b { font-weight: 500; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-mgr .h .v { font-size: 16px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.cl-stack { height: 6px; display: flex; border-radius: 3px; overflow: hidden; margin-top: 6px; background: var(--gray-50); }
.cl-stack i { display: block; height: 100%; }
.cl-split { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 4px; }
.cl-split b { color: var(--text-2); font-weight: 500; }
.cl-warnline { display: flex; gap: 6px; align-items: center; font-size: 13px; line-height: 18px; color: var(--wait-text); margin-top: 4px; }
.cl-warnline .mi { font-size: 16px; color: var(--warn); }
.cl-mgr + .info-alert, .cl-none + .info-alert { margin-top: 4px; }
.info-alert.warn { background: var(--warn-soft); border-color: var(--wait-line); color: var(--wait-text); }
.info-alert.warn .mi { color: var(--warn); }
.info-alert .grow { flex: 1; min-width: 0; }
.info-alert .btn-light { flex: none; }
.cl-none { border-top: 0; }
.cl-hd { display: block; text-align: right; font-weight: 400; color: var(--muted); font-size: 13px; }
.cl-sec { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.cl-sec + .cl-sec { border-top: 1px solid var(--divider); }
.cl-sec.cl-sec-top { padding-bottom: 4px; }
.cl-lab { font-size: 13px; line-height: 18px; color: var(--muted); }
.cl-inp { width: 100%; box-sizing: border-box; flex: none; height: 40px; text-align: left; border-color: var(--line); }
.cl-amts { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.cl-amts .cl-other { width: 96px; height: 36px; }
.cl-radio { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--disabled); background: var(--card); box-sizing: border-box; flex: none; }
.cl-radio.on { border: 6px solid var(--accent); }
.sheet-list.cl-plist button { justify-content: flex-start; }
.cl-opt { flex: 1; min-width: 0; text-align: left; }
.cl-opt small { display: block; }
.mc-switch.cl-first { border-top: 0; }
.cl-foot { text-align: center; }
/* Caps (Beta, caps.js, mockup-caps.html): the clients' cl- pieces + the status badge and the full bar */
.cp-rtop { display: flex; align-items: baseline; gap: 8px; }
.cp-rtop .ltitle { flex: 1; min-width: 0; -webkit-line-clamp: 1; font-size: 15px; }
.cp-v { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.cp-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; line-height: 18px; color: var(--muted); min-width: 0; }
.cp-meta > span:last-child:not(.status) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-bar.cp-thin { height: 6px; border-radius: 3px; }
.cl-bar.cp-full i { background: var(--down); }
.cp-lt { padding: 12px 16px 0; }
.cp-checked { padding: 0 4px; font-size: 13px; line-height: 18px; color: var(--muted); }
.cp-ev { display: flex; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--divider); font-size: 14px; line-height: 20px; color: var(--text-2); }
.sec-head + .cp-ev { border-top: 0; }
.cp-ev time { color: var(--muted); font-size: 13px; white-space: nowrap; min-width: 64px; }
.cp-two { display: flex; gap: 8px; }
.cp-two > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cp-text { width: 100%; box-sizing: border-box; min-height: 120px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); font: 400 16px/22px Inter, sans-serif; padding: 10px 12px; resize: none; }
.info-alert.cp-alert { margin: 0; }
.info-alert.cp-alert[hidden] { display: none; }
.info-alert.cp-alert.cp-sheetnote { margin: 0 16px 12px; }
.cp-say { display: inline-block; padding: 0 6px; border-radius: var(--radius); background: var(--gray-50); color: var(--text); font-weight: 500; margin: 1px 0; }
.cl-row > .btn-light.sm { flex: none; margin-right: 12px; }
.cl-sec.cp-hd { flex-direction: row; justify-content: space-between; }
.cp-picks .mp-row:first-child { border-top: 0; }
.cl-body .btn-block .mi, .cl-empty .btn-primary .mi { font-size: 18px; margin: 0 6px 0 0; vertical-align: -4px; }
.rows .r .v.cp-wrapv { white-space: normal; text-align: right; overflow-wrap: anywhere; min-width: 0; }
/* Caps v3 (2026-11-09, mockup-caps-v3.html): rows like Media items + the FTD bar, the status switch, the cap's hero */
.cp-row .lmain { gap: 4px; }
.cp-row .lhead { align-items: flex-start; }
.cp-row .lhead .tgeo { margin-top: 2px; }
.cp-row .lhead .ltitle { -webkit-line-clamp: 2; }
.cp-row .lmeta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-barline { display: flex; align-items: center; gap: 8px; }
.cp-barline .cl-bar, .cp-barline .grow { flex: 1; min-width: 0; }
.cp-barline .cp-v { flex: none; font-size: 15px; }
.cp-st { font-weight: 500; }
.cp-st.bad { color: var(--down); }
.cp-st.wait { color: var(--wait-text); }
.cp-st.ok { color: var(--ok-text); }
.cp-st.no { color: var(--muted); }
.cp-seg { overflow-x: auto; scrollbar-width: none; min-width: 0; }
.cp-seg::-webkit-scrollbar { display: none; }
.cp-seg button .n { margin-left: 4px; color: var(--muted); font-weight: 400; }
.cp-seg button.on .n { color: var(--accent); }
.cp-seg button .n.cnt { background: var(--count); color: var(--on-count); border-radius: var(--radius); font-size: 11px; line-height: 16px; padding: 0 5px; font-weight: 500; }
.cp-hint { font-size: 13px; line-height: 18px; color: var(--muted); padding: 0 4px; }
.cp-hint:empty { display: none; }
.cp-frows .r .v { color: var(--muted); font-weight: 400; }
.cp-frows .r .v.cp-on { color: var(--accent); font-weight: 500; }
.cp-hero .pills { padding: 0 16px 12px; }
.rows .r .v.cp-to { color: var(--accent); font-weight: 500; white-space: normal; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.rows .r .v.cp-to.cp-plain { color: var(--text); font-weight: 400; }
.rows .r .v .q { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.rows .r .n .mi { font-size: 18px; color: var(--icon-2); margin-right: 8px; vertical-align: -4px; }
.lrow.cp-plain { cursor: default; }

/* ---------- one AI Desk management (2026-11-02, docs/plan-desk-unified.md, mockup-desk-unified.html) ---------- */
/* the Chats row: the question that waits longest, 2 lines */
.df-crow .df-q { font-size: 15px; line-height: 21px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; white-space: normal; }
.df-crow .df-q .who { color: var(--muted); }
/* the chat: the whole conversation (Bot activity's All messages); our side on the accent plate; a waiting question on the warn plate */
.cx-msgs .df-msg.team .txt, .cx-msgs .df-msg.bot .txt { background: var(--accent-soft); border-radius: var(--radius); padding: 6px 10px; }
.cx-msgs .df-msg.wait { background: var(--warn-soft); }
.cx-msgs .df-tag { font-size: 13px; line-height: 18px; white-space: normal; }  /* keeps .df-tag's 36px tap height */
.cx-msgs .df-tag.wait { color: var(--wait-text); }
.cx-msgs .df-tag.ok { color: var(--ok-text); }
/* the answer bar of a chat with a question waiting: sticky above the bottom bar, one primary */
.cx-abar { position: sticky; bottom: calc(var(--nav-h, 64px) + 8px); z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--float-shadow); }
.cx-abar .cx-ato { font-size: 13px; line-height: 18px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-abar .cx-ato b { color: var(--text-2); font-weight: 500; }
/* the chat's facts folded under one row (content first) */
.cx-cdet > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; cursor: pointer; font-size: 14px; line-height: 20px; color: var(--text-2); }
.cx-cdet > summary::-webkit-details-marker { display: none; }
.cx-cdet > summary .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-cdet > summary .mi { font-size: 18px; color: var(--icon-2); margin: 0; }
.cx-cdet[open] > summary .fold { transform: rotate(180deg); }
.cx-cdet .cx-cdin { display: flex; flex-direction: column; gap: 12px; padding: 0 0 12px; border-top: 1px solid var(--divider); }
.cx-cdet .cx-cdin > .card { box-shadow: none; }
/* 2026-11-11 the chat on a phone (mockup-desk-chat-mobile.html): one row over the chat = Details · Summary · Agreed
   (an empty slot drops out); the facts open under it; the answer bar is its two buttons (56 px) */
.cx-qchips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.cx-qchips > * { min-width: 0; }
#cm-strip { display: flex; } #cm-strip:empty { display: none; }
.cx-qchip { flex: 1 1 0; display: flex; align-items: center; min-width: 0; min-height: 48px; padding: 6px 10px; border: 0; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); text-align: left; color: var(--text); font: inherit; font-size: 14px; line-height: 18px; font-weight: 500; }
.cx-qchip .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-qchip small { display: block; font-size: 13px; line-height: 16px; color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.cx-qchip small.bg, .cx-qchip small .cm-warn { color: var(--wait-text); }
.cx-qchip.on { background: var(--accent-soft); }
.cx-cdet.tiled > summary { display: none; }
.cx-cdet.tiled:not([open]) { display: none; }
.cx-cdet.tiled .cx-cdin { border-top: 0; padding-top: 0; }
html.pwide .cx-qchip.dt { display: none; }
.cx-bgfold > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; cursor: pointer; font-size: 14px; line-height: 20px; color: var(--text); }
.cx-bgfold > summary::-webkit-details-marker { display: none; }
.cx-bgfold > summary .grow { flex: 1; min-width: 0; }
.cx-bgfold > summary .mi { margin: 0; font-size: 20px; }
.cx-bgfold > summary .fold { color: var(--icon-2); }
.cx-bgfold[open] > summary .fold { transform: rotate(180deg); }
.cx-bgfold > .cx-hrow { border-top: 0; padding-top: 0; padding-left: 44px; }
.cx-abar.slim { padding: 8px; }
/* 2026-11-11 the owner, a long chat (mockup-desk-chat-pinned.html): the row stays pinned under the top on the page's
   colour; pinned (a sentinel above it, crm.js cxPinRow) it is one line of 40 px chips, the same 48 px tall (no jump);
   an orange dot keeps «Basic group» / «to check» */
.cx-qpin-s { height: 1px; margin-bottom: -1px; }
.cx-qchips.pin { position: sticky; top: var(--top-inset, 0px); z-index: 30; margin: 0 -16px; padding: 0 16px; background: var(--bg); }
.cx-qchips.pin.stuck { padding: 4px 16px 3px; border-bottom: 1px solid var(--divider); }
.cx-qchips.stuck .cx-qchip { min-height: 40px; padding: 6px 10px; box-shadow: none; justify-content: center; text-align: center; }
.cx-qchips.stuck .cx-qchip .grow { flex: none; }
.cx-qchips.stuck .cx-qchip small { display: none; }
.cx-qchip .dot { display: none; width: 6px; height: 6px; margin: 0 0 2px 6px; border-radius: 50%; background: var(--wait-text); vertical-align: middle; }
.cx-qchips.stuck .cx-qchip .dot { display: inline-block; }
#cx-earlier { scroll-margin-top: calc(var(--top-inset, 0px) + 56px); }
/* the answer bar = a strip right on the bottom bar: no gap where the chat shows through, no floating card */
.cx-abar.dock { bottom: var(--nav-h, 64px); margin: 0 -16px; padding: 8px 16px; border-radius: 0; box-shadow: none; background: var(--bg); border-top: 1px solid var(--divider); }
html.inpane .cx-abar.dock { bottom: 0; }
/* the AI Desk circle stands 16px over the bottom bar (--nav-h counts it): the strip lies on the bar's edge and keeps the circle in its own bottom padding, the buttons above it */
body:has(#dnav:not([hidden])) .cx-abar.dock { bottom: calc(var(--nav-h) - 16px); padding-bottom: 24px; }
/* no bottom bar (the wide window's rail, the pane): the strip at the very bottom (after the rule above: the same weight) */
body.wide:has(#dnav) .cx-abar.dock, html.inpane body:has(#dnav) .cx-abar.dock { bottom: 0; padding-bottom: 8px; }
.cx-abar.slim .btn-light { flex: none; padding: 8px 12px; }
.cx-abar.slim .btn-primary { flex: 1; min-width: 0; padding: 8px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the bar of 2026-11-03 (the owner: «AI Desk в центре, выделить», as in banking apps): AI Desk sits in the middle as a filled
   accent circle raised over the bar's edge (variant B, mockup-desk-bar-v2.html), on or not; no plate under it */
#dnav .dn-main svg, #dnav .dn-main.on svg { width: 26px; height: 26px; padding: 13px; border-radius: 50%; margin-top: -16px; background: var(--accent); color: var(--on-accent); box-shadow: var(--fab-shadow), 0 0 0 4px var(--card); }
#dnav .dn-main, #dnav .dn-main.on { color: var(--accent); font-weight: 600; }
#dnav .dn-main .nbadge { top: -12px; left: calc(50% + 14px); }
/* the circle stands 16px over the bar: every sticky bar and the page's end move up with it */
body:has(#dnav:not([hidden])) { --nav-h: calc(76px + env(safe-area-inset-bottom)); }
:root { --fab-shadow: 0 4px 12px rgba(35, 94, 165, .35); }
:root[data-theme="dark"] { --fab-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
@media (prefers-reduced-motion: no-preference) {
  #dnav .dn-main:active svg { transform: scale(.94); }
  .cx-dfold > summary .mi { transition: transform 150ms ease; }
}
/* the Chats list (2026-11-03): the no-links note is a button (a filter), the row says the auto-replies in words */
.cx-basic { display: block; width: 100%; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.cx-basic .go { color: var(--icon-2); align-self: center; }
.df-crow .cx-rfw { margin-left: auto; flex: none; font-size: 13px; line-height: 18px; color: var(--text-2); }
.cx-basic.on { box-shadow: inset 0 0 0 2px var(--wait-text); }  /* the filter is on: only these chats below */
/* Summary v2 (2026-11-03, mockup-summary-v2.html) */
.list .row.cx-static small { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.cx-kp i { font-style: normal; font-size: 13px; line-height: 18px; color: var(--text-2); display: inline-flex; align-items: center; gap: 2px; }
.cx-kp i .mi { font-size: 14px; margin: 0; }
.cx-sdisc { font-size: 15px; line-height: 21px; color: var(--text); margin-top: 2px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-sdisc .k { color: var(--muted); }
.cx-sday { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; line-height: 18px; color: var(--text-2); margin-top: 4px; }
.cx-sday .o { color: var(--wait-text); font-weight: 500; }
.cx-sday .ok { color: var(--ok-text); }
.cx-top { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 14px; }
.cx-top .l { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; line-height: 20px; color: var(--text); }
.cx-top .l small { color: var(--text-2); font-size: 13px; }
.cx-top .bar { height: 6px; border-radius: 3px; background: var(--chip-bg); overflow: hidden; margin-top: 4px; }
.cx-top .bar > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.cx-dfold > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding-right: 8px; cursor: pointer; border-top: 1px solid var(--divider); margin-top: 6px; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--text); }
.cx-dfold > summary::-webkit-details-marker { display: none; }
.cx-dfold > summary .k { flex: 1; }
.cx-dfold > summary .n { color: var(--text-2); font-weight: 400; }
.cx-dfold > summary .mi { color: var(--icon-2); font-size: 20px; margin: 0; }
.cx-dfold[open] > summary .mi { transform: rotate(180deg); }
.cx-dots { list-style: none; margin: 0 0 8px; padding: 0 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.cx-dots li { position: relative; padding-left: 14px; font-size: 14px; line-height: 20px; color: var(--text); overflow-wrap: anywhere; }
.cx-dots li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--icon-2); }
/* the plate under the whole tab (icon + label, as Telegram's bar); the labels and the circle stay above it */
#dnav button { z-index: 1; }
#dnav .nav-ind { z-index: 0; border-radius: 12px; }
@media (prefers-reduced-motion: no-preference) { #dnav button.on svg { background: none; box-shadow: none; } }
/* review 2026-11-04 (AI Desk one look): a named screen's title (a chat, an AI Desk, Knowledge) is one line at 24px */
.title-row.tr-one h1 { font-size: 24px; line-height: 32px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-row.tr-one { align-items: center; }
/* the chat row: the today counter and the topic never lose to their neighbours */
.df-td { flex: none; }
/* no room: the counters go under «Last:», on the right, never past the row (2026-11-04 All chats «2 today · 1 not sorted») */
.df-crow .df-l4 { flex-wrap: wrap; row-gap: 2px; }
.df-l3 .tx { flex: 1 1 auto; min-width: 40%; }
.df-crow .cx-rfw { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* AI Desk settings: No launch after with its days under the words */
.list .row.cx-capdays .chips.mini { padding: 8px 0 0; flex-wrap: nowrap; }
/* a chip row that scrolls fades at its right edge */
.chips.cx-ichips { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); padding-right: 24px; }
/* scrolled: the left edge fades too («eeds you 3» was cut hard, 2026-11-04); app.js sets .scl */
.chips.scl:not(.wrap):not(.item .chips) { -webkit-mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
/* Refie's card buttons: a full tap target */
.rf-acts button { min-height: 40px; }
/* the deal buttons of a question are light buttons now */
.cx-read .req .btn-light.cx-only { margin-top: 6px; }
/* Knowledge: the program's name in the hero card (the screen's title is the title row) */
.kn2-name { display: block; font-size: 18px; line-height: 24px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.cx-danger > div:not(.ico) { color: var(--down); }
.row.cx-danger .ico { background: var(--down-soft); color: var(--down); }
/* Summary: the second numbers row with one or two cells; Show all under a list */
.cx-kp.two { grid-template-columns: repeat(2, 1fr); }
.cx-kp.one { grid-template-columns: 1fr; }
.cx-sall { display: block; margin: 4px 16px 12px; }

/* the chat's memory «Agreed» (2026-11-04, mockup-chat-memory.html variant B): a row in the folded chat
   details under Summary (not pinned since 2026-11-04); the list sheet = .cx-klink rows that drop their own card look, split by the divider */
#cm-strip:empty { display: none; }
.cm-strip { min-height: 44px; }
.cm-strip > .mi:first-child { color: var(--accent); }
.cm-strip .grow { min-width: 0; }
.cm-strip .grow small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.cm-warn { color: var(--wait-text); }
.sh-cards { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 16px; }
.sh-list .cm-list { margin: 0 -16px; }
.cm-list > .cx-klink, .cm-list .cm-od > .cx-klink { box-shadow: none; border-radius: 0; background: none; border-top: 1px solid var(--divider); min-height: 52px; }
.cm-list > .cx-klink:first-child, .cm-list > .list-title + .cx-klink, .cm-list > .list-title + .cm-od, .cm-list > .cm-od:first-child { border-top: 0; }
.cm-list > .cx-klink:active { opacity: 1; background: var(--gray-50); }
.cm-list .cx-klink .t { overflow-wrap: anywhere; }
.cm-list .cx-klink small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.cm-list .cx-klink small .status { vertical-align: 0; }
.cm-list > .list-title { padding-top: 14px; }
.cm-acc { height: 22px; padding: 0 6px; font-size: 13px; margin-right: 6px; vertical-align: 1px; display: inline-flex; }
.cm-od { border-top: 1px solid var(--divider); background: var(--warn-soft); }
.cm-od > .cx-klink { border-top: 0 !important; }
.cm-od .btn-row { padding: 0 16px 12px; }
.cm-od .cm-why { padding: 0 16px 8px; font-size: 13px; line-height: 18px; color: var(--text-2); overflow-wrap: anywhere; }
.cm-plain { padding: 10px 16px; border-top: 1px solid var(--divider); font-size: 15px; line-height: 21px; color: var(--text); overflow-wrap: anywhere; }
.list-title + .cm-plain { border-top: 0; }
.cm-val { font-size: 16px; line-height: 24px; color: var(--text); overflow-wrap: anywhere; }
.cm-quote { font-size: 14px; line-height: 20px; color: var(--text); background: var(--gray-50); border-radius: var(--radius); padding: 8px 10px; margin-top: 6px; overflow-wrap: anywhere; white-space: pre-line; }
.cm-note { font-size: 13px; line-height: 18px; color: var(--muted); padding: 0 4px; }
.cm-field { display: flex; flex-direction: column; gap: 6px; }
.cm-field .list-title { padding: 0; }
.cm-field textarea { width: 100%; box-sizing: border-box; min-height: 72px; padding: 8px 12px; border: 1px solid var(--accent); border-radius: var(--radius); font: 400 16px/22px Inter, sans-serif; background: var(--card); color: var(--text); resize: none; }
.cm-field textarea:placeholder-shown { border-color: var(--line); }
.cm-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cm-field .chips.wrap .chip { min-height: 36px; }
.cm-field .v { font-size: 15px; line-height: 21px; color: var(--text); }
.cm-err { display: flex; gap: 8px; font-size: 14px; line-height: 20px; color: var(--text); }
.cm-err:empty { display: none; }
.cm-err .mi { color: var(--down); margin: 0; font-size: 18px; }

/* ===== the wide window (2026-11-04, miniapp/mockup-desktop.html variant B; app.js wideSync): >= 1024px only, phones and
   narrow windows unchanged. The admin's left menu, lists and tables wide, sheets from the right, the AI Desk's chat in
   the pane beside its Chats list (an iframe of this app in pane mode, html.inpane) ===== */
.dside, .dpane { display: none; }
@media (min-width: 1024px) {
  body.wide { --side-w: 232px; --nav-h: 0px; padding-left: var(--side-w); padding-bottom: 32px; }
  body.wide .nav { display: none; }
  body.wide .btn.ico.fs-hdr { display: none; }  /* the wide window: full screen lives at the menu's foot (#dside-fs) */
  body.wide .dside { display: flex; flex-direction: column; gap: 2px; position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); z-index: 1150;
    padding: calc(12px + var(--top-inset)) 12px 12px; background: var(--card); border-right: 1px solid var(--divider); overflow-y: auto; overscroll-behavior: contain; }
  .dside-logo { display: flex; align-items: center; gap: 10px; padding: 6px 10px 14px; color: var(--logo); font-size: 18px; line-height: 24px; font-weight: 500; }
  .dside-logo svg { width: 28px; height: 22px; flex: none; }
  .dside-it { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--radius); background: none;
    color: var(--text-2); font: inherit; font-weight: 500; text-align: left; white-space: nowrap; position: relative; }
  .dside-it[hidden], .dside-grp[hidden] { display: none; }
  .dside-it > .mi { font-size: 20px; margin: 0; color: var(--icon-2); }
  .dside-it .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .dside-it.on { background: var(--nav-active); color: var(--accent); }
  .dside-it.on > .mi { color: var(--accent); }
  .dside-it .df-wait { margin-left: auto; }
  .dside-grp { padding: 14px 10px 4px; }
  .dside-me { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--divider); }
  .dside-me .dside-who { flex: 1; min-width: 0; min-height: 48px; }
  .dside-who .avatar { width: 32px; height: 32px; flex: none; }
  .dside-who .lbl b { display: block; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
  .dside-who .lbl small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 400; }
  .dside-who.on .lbl b { color: var(--accent); }
  body.wide .content { max-width: 760px; padding: calc(24px + var(--top-inset)) 32px 32px; }
  body.wide:is([data-tab="reports"], [data-tab="campaigns"], [data-tab="affiliates"], [data-tab="finance"], [data-tab="crm"], [data-tab="caps"], [data-tab="admin"]) .content { max-width: 1240px; }
  body.wide #hdr-avatar, body.wide .top > .logo { display: none; }  /* the menu has the logo and its own Profile row */
  body.wide .run-bar { left: var(--side-w); bottom: 0; }
  body.wide.has-run { padding-bottom: 96px; }
  body.wide .toast { left: calc(50% + var(--side-w) / 2); bottom: 32px; }
  /* sheets come from the right, full height; no drag (app.js), closed by ✕, a tap outside or Esc */
  body.wide .sheet { left: auto; right: 0; top: 0; bottom: 0; width: min(480px, calc(100vw - var(--side-w))); max-height: none;
    border-radius: var(--radius-sheet) 0 0 var(--radius-sheet); transform: translateX(105%); padding-top: var(--top-inset); padding-bottom: 0; }
  body.wide .sheet.open { transform: none; }
  body.wide .sheet-grab { display: none; }
  body.wide .sheet-head { touch-action: auto; }
  /* the AI Desk's Chats list + the chat beside it (two scrollers side by side: the owner's question, mockup B) */
  body.split { --list-w: 360px; }
  body.split .content { max-width: none; width: var(--list-w); margin: 0; padding: calc(16px + var(--top-inset)) 16px 24px; }
  body.split .dpane { display: block; position: fixed; top: 0; bottom: 0; right: 0; left: calc(var(--side-w) + var(--list-w)); z-index: 1000;
    border-left: 1px solid var(--divider); background: var(--bg); padding-top: var(--top-inset); }
  .dpane iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
  .dpane-load { position: absolute; inset: var(--top-inset) 0 0 0; padding: 16px 24px; background: var(--bg); }
  .dpane-empty { position: absolute; inset: var(--top-inset) 0 0 0; z-index: 2; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
  .dpane-empty > .mi { font-size: 40px; margin: 0; color: var(--icon-2); }
  .dpane-empty b { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--text); }
  .dpane-empty .btn-light { display: inline-flex; align-items: center; gap: 6px; }
  .dpane-empty .btn-light .mi { margin: 0; }
  body.split .df-crow.on { background: var(--accent-soft); }
  body.split .df-crow.on .df-co { color: var(--accent); }
  @media (hover: hover) and (pointer: fine) { body.wide .df-crow:hover:not(.on), body.wide .dside-it:hover:not(.on) { background: var(--gray-50); } }
}
/* 1024-1279: the menu is a rail of icons (titles on hover) */
@media (min-width: 1024px) and (max-width: 1279px) {
  body.wide { --side-w: 64px; }
  body.wide .dside { padding-left: 8px; padding-right: 8px; }
  body.wide .dside .lbl, body.wide .dside-grp { display: none; }
  body.wide .dside-logo { justify-content: center; padding: 6px 0 14px; }
  body.wide .dside-it { justify-content: center; padding: 0; }
  body.wide .dside-it .df-wait { position: absolute; top: 0; right: 0; margin: 0; padding: 0 5px; font-size: 11px; line-height: 16px; }
  body.wide .dside-me { flex-direction: column; }
  body.wide .dside-me .dside-who { flex: none; width: 100%; }
}
/* the pane: this app inside the wide window's chat column */
html.inpane body { --nav-h: 0px; padding-bottom: 24px; }
html.inpane .nav, html.inpane .dside, html.inpane .dpane, html.inpane #hdr-avatar { display: none !important; }
html.inpane .content { max-width: 1040px; padding: 16px 24px 24px; }
html.inpane .cx-abar { bottom: 8px; }
/* the pane at 820+: the chat's details beside the chat (crm.js paneCols) */
html.pwide #app:has(> .pn-side) { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.pn-main, .pn-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pn-side { position: sticky; top: 16px; }
.pn-side .cx-cdet > summary .fold { display: none; }
/* the AI Desk on a wide window (2026-11-06, mockup-desk-wide.html v3, style guide §21.7): the list column is one flat
   column — the desk switcher with search · Summary · gear (#cx-wsum marks it), the tabs, one problem line, 3-line rows;
   Summary and the settings open in the pane beside it */
@media (min-width: 1024px) {
  body.split:has(#cx-wsum) .content { padding: var(--top-inset) 0 24px; gap: 0; background: var(--card); min-height: 100vh; }
  /* 2026-11-07 the owner: the header stays while the list scrolls: title row, Chats · Caps, tabs, problem line, Sorted by */
  body.split .cx-wtop { position: sticky; top: var(--top-inset, 0px); z-index: 20; background: var(--card); border-bottom: 1px solid var(--divider); }
  body.split .cx-wtop > .title-row { padding: 10px 8px 6px 12px; gap: 2px; align-items: center; }
  .title-row:has(#cx-wsum) .cx-desksw { gap: 8px; min-height: 40px; padding: 4px 6px; margin-left: -6px; border-radius: var(--radius); }
  .title-row:has(#cx-wsum) .cx-desksw .picon.cx-pico { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; }
  .title-row:has(#cx-wsum) .cx-desksw b { font-size: 15px; line-height: 20px; }
  .title-row:has(#cx-wsum) .cx-desksw .sub { margin-top: 0; font-size: 13px; line-height: 17px; }
  .title-row:has(#cx-wsum) .cx-desksw > .mi { font-size: 18px; margin: 0; }
  body.split:has(#cx-wsum) #cx-pane { gap: 0; }
  body.split #cx-whead > .cx-itools { padding: 0 12px 8px; }
  body.split #cx-whead > .tabs { padding: 0 12px; flex-wrap: wrap; column-gap: 16px; overflow: visible; }
  body.split #cx-whead > .cx-alert { border-radius: 0; box-shadow: none; }
  body.split #cx-whead > .cx-alert .cx-hrow { align-items: center; }
  body.split #cx-whead > .sortline-btn { margin: 0; padding: 8px 12px; }
  body.split:has(#cx-wsum) #cx-pane > .cx-list { border-radius: 0; box-shadow: none; }
  body.split:has(#cx-wsum) .df-crow { padding: 10px 12px; gap: 10px; align-items: flex-start; }
  body.split:has(#cx-wsum) .df-crow > .picon.df-logo { width: 32px; height: 32px; font-size: 13px; }
  body.split:has(#cx-wsum) .df-crow .df-q { -webkit-line-clamp: 1; }
  body.split:has(#cx-wsum) .df-crow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  /* Chats · Caps over the list (2026-11-07, crm.js deskWideHtml): the phone's tabs, on the flat column; the caps flat
     like the chats, the open one marked like an open chat */
  body.split .cx-wtop > .segwrap { margin: 0 12px 8px; padding: 2px; box-shadow: none; border: 1px solid var(--divider); }
  body.split .cx-wtop > .segwrap .seg button { height: 32px; padding: 6px 12px; }
  body.split:has(#cx-wsum) #cx-pane .cl-wrap { gap: 0; }
  body.split:has(#cx-wsum) #cx-pane .cl-wrap > .card,
  body.split:has(#cx-wsum) #cx-pane > :is(.cl-wrap ~ .card, .card:has(.cl-empty, .cx-stt)) { border-radius: 0; box-shadow: none; border-top: 1px solid var(--divider); }
  body.split:has(#cx-wsum) #cx-pane > .cp-checked { padding: 8px 16px; }
  body.split:has(#cx-wsum) #cx-pane .cl-row.on { background: var(--accent-soft); }
  body.split:has(#cx-wsum) #cx-pane .cl-row.on .ltitle { color: var(--accent); }
  .tab .n { margin-left: 4px; font-variant-numeric: tabular-nums; }
  /* the AI Desk menu under the desk switcher: the AI Desk list's rows (crm.js cxDeskMenu) */
  .cx-dd { position: fixed; z-index: 1300; width: 320px; max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; padding: 6px 0;
    background: var(--elev); box-shadow: var(--shadow-lg); }
  .cx-dd .sheet-list { overflow: visible; }
  .cx-dd .sheet-list button { min-height: 36px; padding: 6px 14px; gap: 10px; justify-content: flex-start; font-size: 14px; }
  .cx-dd .sheet-list .mi { margin: 0; font-size: 18px; color: var(--icon-2); }
  .cx-dd .sheet-list .on .mi { color: var(--accent); }
  .cx-dd .df-wait, .cx-dd .status { margin-left: auto; }
  .cx-dd .list-title { padding: 10px 14px 4px; }
  .cx-dd .list-title + button { border-top: 0; }
  .cx-dd .sk-rows, .cx-dd .empty { padding: 8px 14px; }
}
/* the pane: Summary and the settings no wider than 760px, Summary's numbers in one row */
html.inpane .content:not(:has(.pn-side)) { max-width: 760px; }
html.inpane .cx-kp { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
html.inpane #cx-pane > .tabs { flex-wrap: wrap; column-gap: 16px; overflow: visible; padding: 0 4px; }
/* desktop density (style guide §21.7): only a wide window with a mouse; phones, tablets and touch screens never */
@media (hover: hover) and (pointer: fine) {
  body.wide .btn.ico, html.inpane .btn.ico { width: 32px; height: 32px; background: none; box-shadow: none; color: var(--icon-2); border-radius: 6px; }
  body.wide .btn.ico .mi, html.inpane .btn.ico .mi { font-size: 20px; }
  body.wide .btn.ico:hover:not(:disabled), html.inpane .btn.ico:hover:not(:disabled) { background: var(--gray-50); }
  body.wide .btn.ico.on, html.inpane .btn.ico.on { background: var(--accent-soft); color: var(--accent); }
  body.wide :is(.btn-light, .btn-primary), html.inpane :is(.btn-light, .btn-primary) { min-height: 32px; padding: 4px 12px; font-size: 14px; }
  body.wide .search, html.inpane .search { height: 32px; font-size: 14px; }
  body.wide .tab, html.inpane .tab { padding: 6px 0; font-size: 13px; }
  body.wide .df-crow .df-q, html.inpane .df-crow .df-q { font-size: 14px; line-height: 20px; }
  body.wide .df-l4, html.inpane .df-l4 { font-size: 13px; line-height: 18px; }
  body.wide .df-l1 .tm, html.inpane .df-l1 .tm { font-size: 12px; }
  body.wide .df-wait, html.inpane .df-wait { font-size: 12px; line-height: 18px; padding: 0 7px; }
  body.wide .cx-alert .cx-hrow { padding: 8px 12px; font-size: 13px; line-height: 18px; }
  body.wide .cx-alert .cx-hrow .mi { font-size: 18px; }
  html.inpane .title-row h1 { font-size: 16px; line-height: 22px; }
  html.inpane .sec-head { font-size: 15px; line-height: 22px; padding: 10px 16px; }
}
/* Dashboard (2026-11-04, mockup-dashboard.html, variant A + D): the main card's Reward · Traffic · Money switch, the
   small chart by day (plain SVG bars, the dates as 13px text under it), the Caps and Payments blocks */
.db-chart { margin: 4px 0 14px; cursor: pointer; }
.db-chart svg { display: block; width: 100%; height: 56px; }
.db-chart .skeleton { height: 56px; }
.db-chart .load-err { padding: 12px 0; }
.db-axis { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.db-main .seg { margin-bottom: 12px; }
.db-main .seg button { flex: 1; }
/* Traffic / Money: the Reward card's legend and lines; the number on the chart = accent text (selected = accent) */
.db-main [data-pick] { cursor: pointer; }
/* a legend number is a tap target: 28px high to the finger, the same look (6px of the row gap each side) */
.db-main .legend span[data-pick] { padding: 5px 0; margin: -5px 0; }
.db-skel { height: 56px; margin: 0 16px 16px; }
.db-main .legend span.on, .db-main .hero-line.on span { color: var(--accent); font-weight: 500; }
.db-main .legend span.on b, .db-main .hero-line.on b { color: var(--accent); }
.db-main .legend b.neg, .db-main .hero-line b.neg { color: var(--down); }
.db-money .hero-line + .mix { margin-top: 10px; }
.db-traffic > .legend:first-child, .db-money > .hero-line:first-child { margin-top: 0; }
.db-mrow { display: flex; align-items: center; font-size: 16px; line-height: 24px; cursor: pointer; }
.db-mrow .see { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--accent); }
.db-main .value.neg { color: var(--down); }
.blk-body > .cl-row:first-child, .blk-body > .tiles + .cl-row { border-top: 1px solid var(--divider); }
.db-prow .cp-v { font-size: 15px; }
.db-prow .cp-meta .status { flex: none; }
.db-note { padding: 0 16px 16px; font-size: 14px; line-height: 20px; color: var(--text-2); }
/* a narrow phone (320px): the Reward / Traffic / Money legend in one column, the numbers never run into each other */
@media (max-width: 359px) { .hero .legend { grid-template-columns: 1fr; } }
/* Fixed fee: Add several and the review sheet (finance.js openPaste / openSet, 2026-11-05): 16px so iOS never zooms */
.sheet-tools textarea.fp-text { font-size: 16px; line-height: 22px; min-height: 150px; }
.fs-head { padding: 8px 16px 4px; font-size: 13px; line-height: 18px; color: var(--muted); }
.fs-rows .lrow-w:first-child { border-top: 1px solid var(--divider); }
.fee-res .rk-spin { flex: none; }
.lhead .lamt.neg { color: var(--down); }
.sheet-tools.fs-budget { border-bottom: 0; }
/* Admin v3 (2026-11-06, mockup-admin-v3.html variant A): Home «Needs you», tappable tiles, People by client, journal lines */
.ad-tiles button { background: var(--card); padding: 12px; border: 0; text-align: left; font: inherit; color: inherit; min-height: 44px; }
.ad-tiles button:active { background: var(--gray-50); }
.ad-tiles button:focus-visible, .ad-cl:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ad-tiles span { font-size: 13px; }
.ad-cnt { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: var(--radius); background: var(--count); color: var(--on-count); font-size: 12px; line-height: 20px; font-weight: 600; text-align: center; }
.ad-need { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; border-top: 1px solid var(--divider); }
.ad-need > .mi { color: var(--muted); font-size: 20px; flex: none; }
.ad-need .body { flex: 1; min-width: 0; }
.ad-need .t { font-size: 15px; line-height: 20px; color: var(--text); }
.ad-need .m { font-size: 13px; line-height: 18px; color: var(--muted); }
.ad-need .btn-light { flex: none; }
.ad-groups { display: flex; flex-direction: column; gap: 16px; }
.ad-cl { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 10px 4px 10px 16px; border: 0; background: none; font: inherit; text-align: left; color: var(--text); box-sizing: border-box; }
button.ad-cl:active { background: var(--gray-50); }
.ad-cl .body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ad-cl .n { font-size: 16px; line-height: 22px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-cl .m { font-size: 13px; line-height: 18px; color: var(--muted); }
.ad-cl .go { color: var(--faint); padding-right: 12px; }
.ad-dom { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; border-top: 1px solid var(--divider); background: var(--gray-50); font-size: 13px; line-height: 18px; color: var(--text-2); }
.ad-dom .mi { font-size: 16px; color: var(--muted); }
.ad-dom .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-none { padding: 12px 16px; border-top: 1px solid var(--divider); font-size: 13px; color: var(--muted); }
.ad-who .m.ad-hint { color: var(--accent); }
.ad-ft.cl { color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.av.sm.sys { background: var(--gray-50); color: var(--muted); display: inline-grid; place-items: center; }
.av.sm.sys .mi { font-size: 16px; }
.lg-main .t { font-size: 15px; line-height: 20px; color: var(--text); }
.lg-q2 { font-size: 14px; line-height: 20px; color: var(--text-2); margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.lg-row.fail { box-shadow: inset 3px 0 0 var(--down); }
/* the team's rules in their Knowledge block (2026-11-06, docs/plan-rules-in-blocks.md, mockup-rules-in-blocks.html) */
.list .row.kn2-r { align-items: flex-start; }
.kn2-r .grow { font-weight: 400; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.list .row.kn2-r small { white-space: normal; }
.kn2-rn { color: var(--muted); }
.br-big.rule { font-size: 16px; line-height: 24px; font-weight: 400; }
.kn-rtap { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
/* Refie's character: the list with a drawn Refie per character + the card (mockup-refie-character-card.html v2, 2026-11-06) */
.ch-ava { position: relative; width: 56px; height: 48px; flex: none; margin-right: 12px; align-self: flex-start; }
.list .row > div.ch-ava { flex: none; }
.ch-ava canvas { width: 56px; height: 48px; display: block; }
.ch-badge { position: absolute; right: -4px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--elev); }
.ch-badge .mi { font-size: 14px; margin: 0; }
.ch-row .ch-who { display: block; font-size: 13px; line-height: 18px; color: var(--text-2); font-weight: 400; white-space: normal; }
.ch-row .ch-joke { display: block; margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 400; white-space: normal; }
.ch-row .ch-now { color: var(--accent); font-weight: 500; }
.ch-stage { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.ch-scene { display: flex; gap: 10px; align-items: flex-start; }
.ch-scene .ch-ava { width: 96px; height: 84px; margin: 4px 0 0; }
.ch-scene .ch-ava canvas { width: 96px; height: 84px; }
.ch-scene .ch-badge { width: 28px; height: 28px; right: 0; bottom: -2px; }
.ch-scene .ch-badge .mi { font-size: 17px; }
.ch-talk { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ch-q { font-size: 13px; line-height: 18px; color: var(--muted); }
.ch-q b { font-weight: 500; color: var(--text-2); }
.ch-talk .rf-say { font-size: 14px; line-height: 20px; }
.ch-talk .rf-say::after { top: 22px; }
.ch-sits { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-sits .pill { cursor: pointer; border: 0; font: inherit; font-size: 13px; min-height: 32px; }
.ch-note { font-size: 13px; line-height: 18px; color: var(--muted); }
.ch-sec { padding: 12px 16px; border-top: 1px solid var(--divider); display: flex; gap: 12px; align-items: flex-start; }
.ch-sec:first-child { border-top: 0; }
.ch-sec > .mi { color: var(--icon-2); font-size: 20px; margin-top: 1px; }
.ch-t { font-size: 13px; line-height: 18px; color: var(--muted); }
.ch-sec p { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--text); }
.ch-sec small { display: block; margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--text-2); }
.ch-sec ul { margin: 2px 0 0; padding-left: 18px; font-size: 14px; line-height: 20px; }
.ch-sec .pills { margin-top: 6px; }

/* Admin › People compact (mockup-admin-people-compact.html variant A, the owner 2026-11-06): a client = one row (the client
   head .ad-cl with a fold: the left part opens its people in place, the 44px arrow opens the client), dense person rows */
.ad-cl.fold { padding: 0; gap: 0; border-top: 1px solid var(--divider); }
.card > .ad-cl.fold:first-child { border-top: 0; }
.ad-cl.fold .tap { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; min-height: 56px; padding: 8px 4px 8px 16px; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.ad-cl.fold .tap:active { background: var(--gray-50); }
.ad-cl.fold .n { font-size: 15px; line-height: 20px; }
.ad-cl.fold .m { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-cl.fold .m .wait { color: var(--wait-text); font-weight: 500; }
.ad-cl.fold .cnt { font-size: 13px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; flex: none; }
.ad-cl.fold .fold-ic { color: var(--icon-2); flex: none; }
.ad-cl.fold.open { background: var(--gray-50); }
.ad-cl.fold.open .fold-ic { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) { .ad-cl.fold .fold-ic { transition: transform 160ms var(--ease-out); } }
.ad-cl.fold .open-cl { flex: none; width: 44px; align-self: stretch; border: 0; border-left: 1px solid var(--divider); background: none; color: var(--icon-2); display: grid; place-items: center; }
.ad-cl.fold .status { flex: none; }
.ad-cl.fold .ck { flex: none; }
.ad-stack { display: inline-flex; flex: none; }
.ad-stack .av { width: 24px; height: 24px; font-size: 11px; box-shadow: 0 0 0 2px var(--card); }
.ad-stack .av + .av { margin-left: -4px; }
.ad-row.dense { min-height: 48px; padding: 6px 16px; gap: 10px; align-items: center; }
.ad-row.dense .av { width: 32px; height: 32px; font-size: 11px; }
.ad-row.dense .ad-who .m { margin-top: 0; }
.ad-row.dense .ad-right { min-width: 56px; padding-top: 0; }
.ad-row.dense .ad-right .bal { display: block; font-size: 13px; color: var(--muted); }

/* Fixed fee: Add several and the review sheet (finance.js openPaste / openSet, 2026-11-05): 16px so iOS never zooms */
.sheet-tools textarea.fp-text { font-size: 16px; line-height: 22px; min-height: 150px; }
.fs-head { padding: 8px 16px 4px; font-size: 13px; line-height: 18px; color: var(--muted); }
.fs-rows .lrow-w:first-child { border-top: 1px solid var(--divider); }
.fee-res .rk-spin { flex: none; }
.lhead .lamt.neg { color: var(--down); }
.sheet-tools.fs-budget { border-bottom: 0; }
/* add accounts from a chat (2026-11-12, mockup-chat-accounts.html) */
.cx-who .cx-wr .cx-accadd { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; align-self: center; }
.cx-accrow { display: flex; align-items: center; width: 100%; border: 0; background: none; padding: 0 16px 0 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.cx-accrow .grow { display: block; min-width: 0; }
.cx-accrow .list-title.cx-sub { display: block; }
.cx-accrow .go { color: var(--icon-2); flex: none; }
