/* =============================================================================
   css/app.css — the Cflow design layer (v3, 2026-10).
   Loaded LAST on every page (after tokens.css, styles.css, cflow-ui.css), and
   injected by js/app.js on any page that forgets it. It owns:
     1. the typeface and the v3 tokens
     2. the app shell (sidebar, topbar, content)
     3. the shared pieces every page may use: page head, learn-more popover,
        cards, tiles, chips
     4. the dashboard: grid, stats, coach, quest, flow map
   The rules behind every value here are in .claude/skills/cflow-design.
   Change the look here, not in page <style> blocks.
   ============================================================================= */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-var.woff2') format('woff2');
}

:root {
  /* Type */
  --font-stack: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-sans: var(--font-stack);

  /* Surfaces — a soft grey canvas, white cards on it */
  --canvas: #edeff2;
  --card: #ffffff;
  --card-2: #f6f7f9;
  --glass: rgb(255 255 255 / .74);
  --bg: var(--canvas); --bg-page: var(--canvas);
  --surface: var(--card); --bg-card: var(--card);
  --surface-2: var(--card-2); --bg-card-2: var(--card-2);

  /* Ink — text, and the one dark colour for primary controls */
  --ink: #121418;
  --ink-soft: #1d2027;
  --ink-1: #121418; --ink-2: #3d434f; --ink-3: #6b7280; --ink-4: #9ca3af;
  --text: var(--ink-1); --text-muted: var(--ink-2); --text-dim: var(--ink-4);
  --line-1: #e6e8ec; --line-2: #f0f1f4;
  --border: var(--line-1); --border-strong: #d5d9e0;

  /* Lime — progress, wins and "do this next". Never a status colour. */
  --lime: #c8f26d;
  --lime-strong: #b2e04a;
  --lime-soft: #f1fadc;
  --lime-ink: #233600;

  /* Status — only ever for status. The base colour is for dots, bars and
     borders; text in a status colour uses its -ink (4.5:1 or better on white,
     the page and its own -soft chip: amber text in #b7770d was 3.3–3.7:1). */
  --success: #12804a; --success-soft: #e5f5ec; --success-ink: #0f7442;
  --warning: #b7770d; --warning-soft: #fbf1dc; --warning-ink: #8a5a07;
  --danger:  #c0342b; --danger-soft:  #fbe9e7; --danger-ink:  #c0342b;
  --info:    #2563c9; --info-soft:    #e7eefb; --info-ink:    #2563c9;

  /* Shape */
  --r-card: 22px;
  --r-tile: 16px;
  --r-ctl: 12px;
  --r-1: 8px; --r-2: 10px; --r-3: 14px; --r-4: 20px;
  --sh-card: 0 1px 2px rgb(18 20 24 / .04), 0 6px 20px rgb(18 20 24 / .04);
  --sh-lift: 0 2px 6px rgb(18 20 24 / .06), 0 14px 32px rgb(18 20 24 / .08);
  --shadow-card: var(--sh-card);
  --shadow-soft: var(--sh-lift);
  --shadow-pop: 0 18px 48px rgb(18 20 24 / .16), 0 4px 12px rgb(18 20 24 / .06);
  --ease: cubic-bezier(.22,.61,.36,1);
}

html, body { font-family: var(--font-stack); background: var(--canvas); color: var(--ink-1); }
/* Anything printed from an app page is paper: white, no canvas. */
@media print { html, body { background: #fff !important; } }
body { font-feature-settings: "tnum" 0; }
.num, .tnum, [data-num] { font-variant-numeric: tabular-nums; }

/* =============================================================================
   2. SHELL
   ============================================================================= */
.app-shell { display: flex; height: 100vh; background:
  radial-gradient(900px 500px at 0% 0%, #ffffff 0%, transparent 60%), var(--canvas); }

.sidebar {
  /* The night rail: the one dark surface in the app, so the map of the work
     sits apart from the work. Lime marks where you are. */
  --sb-bg: #121418; --sb-bg-2: #1b1e25; --sb-fg: rgb(255 255 255 / .70); --sb-fg-dim: rgb(255 255 255 / .54);
  --sb-hover: rgb(255 255 255 / .07); --sb-line: rgb(255 255 255 / .08);
  position: relative; width: 248px; flex: 0 0 248px;
  margin: 12px 0 12px 12px; height: calc(100vh - 24px);
  background: radial-gradient(240px 180px at 0% 0%, rgb(200 242 109 / .10), transparent 70%),
              linear-gradient(180deg, var(--sb-bg-2), var(--sb-bg) 46%);
  color: var(--sb-fg); border: 0; border-radius: var(--r-card);
  box-shadow: 0 10px 30px rgb(18 20 24 / .18);
  display: flex; flex-direction: column; overflow: hidden;
  transition: width .22s var(--ease), flex-basis .22s var(--ease);
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 16px 12px 8px 16px; }
.sidebar .brand-logo {
  width: 34px; height: 34px; border-radius: 11px; background: var(--lime);
  display: grid; place-items: center; flex: 0 0 auto; box-shadow: 0 0 0 4px rgb(200 242 109 / .12);
}
.sidebar .brand-logo img { width: 20px; height: 20px; filter: brightness(0); }
.sidebar .brand-words { flex: 1 1 auto; min-width: 0; }
.sidebar .brand-text { font: 800 17px/1 var(--font-stack); color: #fff; letter-spacing: -.02em; }
.sidebar .brand-sub { font: 600 10.5px/1.4 var(--font-stack); color: var(--sb-fg-dim); letter-spacing: .04em; }
.sb-rail-btn {
  width: 30px; height: 30px; border-radius: 9px; border: 0; background: transparent; color: var(--sb-fg-dim);
  display: grid; place-items: center; cursor: pointer; flex: 0 0 auto;
}
.sb-rail-btn svg { width: 17px; height: 17px; }
.sb-rail-btn:hover { background: var(--sb-hover); color: #fff; }

/* Shop picker on the dark rail; its menu opens as a light popover. */
#shop-picker-slot .cf-shop-pick { margin: 4px 12px 0; border-radius: 12px; background: var(--sb-hover); border: 1px solid var(--sb-line); }
#shop-picker-slot .cf-shop-pick:hover { background: rgb(255 255 255 / .11); }
#shop-picker-slot .cf-shop-pick__row { padding: 9px 10px; }
#shop-picker-slot .cf-shop-pick__name { font: 600 12.5px/1.2 var(--font-stack); color: #fff; }
#shop-picker-slot .cf-shop-pick__caret { width: 12px; height: 12px; color: var(--sb-fg-dim); flex-shrink: 0; }
#shop-picker-slot .cf-shop-pick .cf-chip__dot { box-shadow: 0 0 0 2px rgb(255 255 255 / .55); }
#shop-picker-slot .cf-shop-menu { background: var(--card); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 4px; }
#shop-picker-slot .cf-shop-menu__item { padding: 9px 10px; border-radius: 10px; font: 500 13px/1.2 var(--font-stack); color: var(--ink-1); }
#shop-picker-slot .cf-shop-menu__item:hover { background: var(--card-2); }
#shop-picker-slot .cf-shop-menu__item.is-active { background: var(--ink); color: #fff; }
#shop-picker-slot .cf-shop-menu__item__code { margin-left: auto; color: var(--ink-3); font-size: 11px; }
#shop-picker-slot .cf-shop-menu__item.is-active .cf-shop-menu__item__code { color: rgb(255 255 255 / .74); }
#shop-picker-slot .cf-shop-pick__txt { display: flex; flex-direction: column; min-width: 0; }
#shop-picker-slot .cf-shop-pick__txt > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#shop-picker-slot .cf-shop-pick__org { font: 600 10px/1.2 var(--font-stack); color: var(--sb-fg-dim); letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
#shop-picker-slot .cf-shop-menu__org { padding: 8px 10px 4px; font: 700 10px/1.2 var(--font-stack); color: var(--ink-3); letter-spacing: .07em; text-transform: uppercase; }
#shop-picker-slot .cf-shop-menu__org:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--line-1); padding-top: 10px; }
/* the scope chip beside the page title: whose data the screen shows (docs/SCOPE.md) */
.tb-scope { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 4px 10px 4px 8px; border-radius: 999px;
  font: 650 11.5px/1.2 var(--font-stack); white-space: nowrap; background: var(--card); color: var(--ink-2);
  box-shadow: 0 1px 2px rgb(18 20 24 / .06); cursor: default; flex-shrink: 0; }
.tb-scope[hidden] { display: none; }
.tb-scope svg { width: 13px; height: 13px; color: var(--ink-3); }
.tb-scope i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 2px rgb(255 255 255 / .6); }
.tb-scope.is-brand { background: var(--ink); color: #fff; }
@media (max-width: 900px) { .tb-scope { display: none !important; } }

.sb-team {
  margin: 8px 12px 2px; display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 999px; background: transparent;
  font: 600 11.5px/1.2 var(--font-stack); color: var(--sb-fg);
}
.sb-team__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgb(200 242 109 / .18); flex: 0 0 auto; }
.sb-team__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-team__sub { font-weight: 500; color: var(--sb-fg-dim); }

.sidebar .nav-scroll {
  flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; min-height: 0; padding: 2px 10px 14px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
}
.sidebar .nav-scroll::-webkit-scrollbar { display: none; }
.sidebar .nav-section { margin-top: 10px; }
.sidebar .nav-section-title {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px 5px;
  font: 700 10px/1 var(--font-stack); letter-spacing: .11em; text-transform: uppercase; color: var(--sb-fg-dim);
}
.sidebar .nav-section-title::after { content: ''; flex: 1; height: 1px; background: var(--sb-line); }
.sidebar .nav-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  margin: 1px 0; padding: 7px 8px; border-radius: 11px; min-height: 34px; box-sizing: border-box;
  font: 550 13px/1.2 var(--font-stack); color: var(--sb-fg); text-decoration: none;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.sidebar .nav-item:hover { background: var(--sb-hover); color: #fff; text-decoration: none; }
.sidebar .nav-item:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; }
.sidebar .nav-item.active { background: var(--lime); color: var(--ink); font-weight: 700; box-shadow: 0 6px 18px rgb(200 242 109 / .18); }
.sidebar .nav-item.active::before { display: none; }
.sidebar .nav-icon { width: 17px; height: 17px; opacity: .78; flex: 0 0 auto; }
.sidebar .nav-item.active .nav-icon { opacity: 1; color: var(--ink); }
.nav-item__t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge {
  flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 999px;
  display: inline-grid; place-items: center; font: 750 10.5px/1 var(--font-stack);
  background: rgb(255 255 255 / .12); color: #fff;
}
.nav-badge[hidden] { display: none; }
.nav-badge.is-danger { background: var(--danger); color: #fff; }
.nav-badge.is-warn { background: #e8a63a; color: var(--ink); }
.nav-item.active .nav-badge { background: var(--ink); color: var(--lime); }

.sidebar-footer { flex: 0 0 auto; padding: 10px; border-top: 1px solid var(--sb-line); background: transparent; }
.sb-me { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 14px; }
.sb-me__av {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--lime); color: var(--lime-ink);
  font: 800 13px/1 var(--font-stack);
}
.sb-me__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sb-me__name { display: block; font: 650 13px/1.2 var(--font-stack); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-me__role { display: block; font: 500 11.5px/1.3 var(--font-stack); color: var(--sb-fg-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-icon-btn {
  width: 32px; height: 32px; border-radius: 10px; border: 0; background: transparent; color: var(--sb-fg-dim);
  display: grid; place-items: center; cursor: pointer; text-decoration: none; flex: 0 0 auto;
}
.sb-icon-btn:hover { background: var(--sb-hover); color: #fff; }
.sb-icon-btn.active { background: var(--lime); color: var(--ink); }
.sb-icon-btn .nav-icon { width: 17px; height: 17px; opacity: 1; }

/* The icon rail. Labels hide; every row keeps its tooltip (title). */
@media (min-width: 901px) {
  body.sb-rail .sidebar { width: 76px; flex-basis: 76px; }
  body.sb-rail .sidebar .brand { flex-direction: column; gap: 8px; padding: 14px 0 6px; }
  body.sb-rail .sidebar .brand-words,
  body.sb-rail .sb-team__name, body.sb-rail .nav-item__t,
  body.sb-rail .sb-me__txt, body.sb-rail #shop-picker-slot .cf-shop-pick__name > :not(.cf-chip__dot),
  body.sb-rail #shop-picker-slot .cf-shop-pick__caret { display: none; }
  body.sb-rail #shop-picker-slot .cf-shop-pick { margin: 4px 14px 0; }
  body.sb-rail #shop-picker-slot .cf-shop-pick__row { justify-content: center; padding: 10px 0; }
  body.sb-rail #shop-picker-slot .cf-shop-menu { left: 0; right: auto; width: 220px; }
  /* The open menu is wider than the rail: let it out while it is open (the rail
     clipped it to its first letters, and clicks past them hit the page). */
  body.sb-rail .sidebar:has(.cf-shop-menu) { overflow: visible; }
  body.sb-rail .sb-team { justify-content: center; margin: 8px 0 2px; }
  body.sb-rail .sidebar .nav-scroll { padding: 2px 12px 14px; }
  body.sb-rail .sidebar .nav-section-title { padding: 6px 4px; }
  body.sb-rail .sidebar .nav-section-title span { display: none; }
  body.sb-rail .sidebar .nav-item { justify-content: center; padding: 8px 0; }
  body.sb-rail .nav-badge { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 9.5px; }
  body.sb-rail .sb-me { flex-direction: column; gap: 6px; padding: 4px 0; }
}

.main-wrap { flex: 1 1 auto; min-width: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 16px 24px 10px; background: transparent; border: 0;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.topbar-title { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.topbar-title__h { font: 750 21px/1.15 var(--font-stack); color: var(--ink); letter-spacing: -.02em; margin: 0; }
.topbar-title__p { font: 500 13px/1.3 var(--font-stack); color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.topbar-right { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; }
.tb-scan {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 14px;
  border: 0; border-radius: 999px; background: var(--ink); color: #fff; cursor: pointer;
  font: 600 13px/1 var(--font-stack);
}
.tb-scan .nav-icon { width: 16px; height: 16px; color: var(--lime); opacity: 1; }
.tb-scan kbd { font: 600 11px/1 var(--font-stack); background: rgb(255 255 255 / .14); color: rgb(255 255 255 / .8); border-radius: 999px; padding: 5px 8px; }
.tb-scan:hover { background: #24272e; }
.cf-bell { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--sh-card); }
/* The stock bell's room before js/notify.js mounts it: the topbar's right end grew by 40 px on every office page
   as it arrived (frontend audit of 15 Nov 2026). The station pages remove the slot. */
.cf-bell-slot:empty { width: 40px; height: 40px; flex: 0 0 40px; }
.hamburger {
  display: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card);
  box-shadow: var(--sh-card); color: var(--ink); font-size: 18px; cursor: pointer;
}
.live-indicator { display: none !important; }  /* nothing claims to be live unless it is (RULES R11) */

.main-wrap .content { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 6px 24px 28px; }
.cf-accent-stripe { height: 3px; }

.sb-backdrop { display: none; }
@media (max-width: 900px) {
  .sidebar {
    position: fixed; z-index: 300; left: 0; top: 0; margin: 0; height: 100vh;
    border-radius: 0 var(--r-card) var(--r-card) 0; transform: translateX(-104%);
    transition: transform .22s var(--ease); box-shadow: var(--shadow-pop);
  }
  .sidebar.open { transform: translateX(0); }
  .sb-backdrop { position: fixed; inset: 0; z-index: 299; background: rgb(18 20 24 / .35); }
  .sidebar.open ~ .sb-backdrop { display: block; }
  .hamburger { display: grid; place-items: center; }
  .topbar { padding: 12px 16px 8px; }
  .topbar-title__p { display: none; }
  .tb-scan span, .tb-scan kbd { display: none; }
  .tb-scan { padding: 0 12px; }
  .main-wrap .content { padding: 4px 16px 24px; }
}

/* =============================================================================
   3. SHARED PIECES
   ============================================================================= */

/* ---- Focus: one ring everywhere, in ink (lime on the dark rail and ink cards).
   cflow-ui.css drew it in the brand's accent, which a pale brand colour would
   make invisible; a field keeps its border-and-halo look instead of a ring. */
:where(a, button, summary, [tabindex], [role="button"], [role="tab"], [role="option"]):focus-visible {
  outline: 2px solid var(--ink); outline-offset: 2px;
}
:where(.sidebar, .dx-card--ink, .buddy__bubble--dark) :where(a, button, summary, [tabindex], [role="button"], [role="tab"], [role="option"]):focus-visible {
  outline-color: var(--lime);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--ink) !important; box-shadow: 0 0 0 3px rgb(18 20 24 / .12) !important;
}
:where(input, select, textarea):focus-visible { outline: none; }

/* ---- Words for screen readers only (an empty table header, a button's longer name). */
.vh, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
      clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Number columns line up on the right, header included: the :where() rule for
   th.is-num lost to styles.css's .tbl th { text-align: left }. */
.tbl th.is-num, .tbl td.is-num { text-align: right; }
/* A field marked wrong shows it on its border too (the reason is said next to it). */
:where(input, select, textarea)[aria-invalid="true"], :where(input, select, textarea)[aria-invalid="true"]:focus { border-color: var(--danger) !important; }

/* ---- Shell: hold the brand picker's place until it is drawn, so the menu
   under it does not jump on every page (it is mounted once the brands load). */
#shop-picker-slot:empty { min-height: 53px; }
/* The topbar is as tall on every page: on the packing station (no Scan pill or
   bell) the brand chip arriving used to grow it and move the page down. */
.tb-crumb { min-height: 40px; }
body.sb-rail #shop-picker-slot:empty, body.cf-floor #shop-picker-slot:empty { min-height: 0; }
#shop-picker-slot button.cf-shop-menu__item {
  width: 100%; border: 0; background: none; text-align: left;
  font: 500 13px/1.2 var(--font-stack); color: var(--ink-1);
}
#shop-picker-slot button.cf-shop-menu__item:not(.is-active):hover { background: var(--card-2); }
#shop-picker-slot .cf-shop-menu__item:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#shop-picker-slot .cf-shop-menu__item:not(.is-active):focus-visible { background: var(--card-2); }

/* ---- Room under Flo on a phone or tablet: the page is one scrolling column
   there, and its last row (often the button that finishes the job) can now
   scroll clear of the floating coach instead of sitting under it for good.
   Wider screens keep their padding: several lists are sized to the window.
   The room is a spacer after the last row, not padding on the scroller: a
   sticky bar with bottom: 0 stops at the scroller's padding, so 84px of padding
   held the Returns form's Save bar 84px up with fields showing and clickable
   under it (G6R-05, frontend audit of 15 Nov 2026). The spacer and the 24px
   padding under it make the same 84px. .content is a plain block on every page,
   so the spacer adds no grid row or flex gap. */
@media (max-width: 900px) { body:has(.buddy) .main-wrap .content::after { content: ''; display: block; height: 60px; visibility: hidden; } }

/* ---- Learn more: the ⓘ that holds the explanation a page would otherwise print */
.lm {
  display: inline-grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto;
  border-radius: 50%; border: 0; padding: 0; cursor: pointer; vertical-align: middle;
  background: var(--card-2); color: var(--ink-3); font: 700 11px/1 var(--font-stack);
}
.lm:hover, .lm[aria-expanded="true"] { background: var(--ink); color: var(--lime); }
.lm--on-dark { background: rgb(255 255 255 / .12); color: rgb(255 255 255 / .75); }
.lm-text {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: 600 12.5px/1.3 var(--font-stack); color: var(--ink-2); text-decoration: underline;
  text-decoration-color: var(--ink-4); text-underline-offset: 3px;
}
.lm-text:hover { color: var(--ink); text-decoration-color: var(--ink); }
.lm-pop {
  position: fixed; z-index: 2000; width: min(360px, calc(100vw - 24px));
  background: var(--card); color: var(--ink-1); border-radius: 18px; box-shadow: var(--shadow-pop);
  padding: 16px 18px 14px; opacity: 0; transform: translateY(4px) scale(.98);
  transition: opacity .14s var(--ease), transform .14s var(--ease);
}
.lm-pop.is-open { opacity: 1; transform: none; }
.lm-pop__title { font: 700 14.5px/1.3 var(--font-stack); margin: 0 26px 6px 0; color: var(--ink); }
.lm-pop__body { font: 450 13px/1.55 var(--font-stack); color: var(--ink-2); }
.lm-pop__body p { margin: 0 0 8px; }
.lm-pop__body ol, .lm-pop__body ul { margin: 0 0 8px; padding-left: 18px; }
.lm-pop__body li { margin: 3px 0; }
.lm-pop__body b, .lm-pop__body strong { color: var(--ink); }
.lm-pop__close {
  position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: var(--card-2); color: var(--ink-3); cursor: pointer; font: 600 14px/1 var(--font-stack);
}
.lm-pop__close:hover { background: var(--ink); color: #fff; }
@media (max-width: 560px) {
  .lm-pop { left: 12px !important; right: 12px; bottom: 12px; top: auto !important; width: auto; }
}

/* ---- Page head: title + one line of purpose + learn more. Nothing else. */
.pg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.pg-head__title { font: 750 22px/1.2 var(--font-stack); letter-spacing: -.02em; color: var(--ink); margin: 0; }
.pg-head__purpose { font: 500 13px/1.4 var(--font-stack); color: var(--ink-3); margin: 3px 0 0; display: flex; align-items: center; gap: 6px; }
.pg-head__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* A search box in a page head or a card head. */
.search3 { width: 250px; height: 38px; padding: 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-1);
  background: var(--card); font: 600 13px/1 var(--font-stack); color: var(--ink); }
.search3:focus { outline: none; border-color: var(--ink); }
.search3::placeholder { color: var(--ink-4); font-weight: 500; }
@media (max-width: 660px) { .pg-head__actions { width: 100%; } .pg-head__actions .search3 { flex: 1 1 100%; width: auto; } }
/* A form's text box, picker or note in the same look (a settings page's fields; the
   label above it is .stat-label). Fills its cell; the page's layout sets the cell. */
.ctl3 { display: block; width: 100%; box-sizing: border-box; min-height: 40px; padding: 9px 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-1); background: var(--card); font: 550 13.5px/1.35 var(--font-stack); color: var(--ink); }
textarea.ctl3 { min-height: 68px; resize: vertical; }
.ctl3::placeholder { color: var(--ink-4); font-weight: 500; }
.ctl3:disabled { background: var(--card-2); color: var(--ink-3); }

/* ---- One-line notice: what is wrong + the one thing to do + learn more. */
.notice {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--r-tile); background: var(--card); box-shadow: var(--sh-card);
  font: 500 13.5px/1.4 var(--font-stack); color: var(--ink-1);
}
.notice__dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: var(--ink-4); }
.notice.is-err  .notice__dot { background: var(--danger);  box-shadow: 0 0 0 4px var(--danger-soft); }
.notice.is-warn .notice__dot { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.notice.is-ok   .notice__dot { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.notice__msg { flex: 1 1 260px; min-width: 0; }
/* A link inside a notice reads as a link without colour (WCAG 1.4.1). */
.notice__msg a { color: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.notice__msg b { font-weight: 700; }
.notice__actions { display: flex; align-items: center; gap: 8px; }

/* ---- Buttons in the v3 vocabulary */
.btn3 {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent;
  font: 650 13px/1 var(--font-stack); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s var(--ease), border-color .12s var(--ease), transform .08s var(--ease);
}
.btn3:active { transform: translateY(1px); }
.btn3--ink { background: var(--ink); color: #fff; }
.btn3--ink:hover { background: #262a31; text-decoration: none; }
.btn3--lime { background: var(--lime); color: var(--lime-ink); }
.btn3--lime:hover { background: var(--lime-strong); text-decoration: none; }
.btn3--ghost { background: var(--card); color: var(--ink-1); border-color: var(--line-1); }
.btn3--ghost:hover { border-color: var(--ink-3); text-decoration: none; }
.btn3--sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn3:disabled { opacity: .5; cursor: not-allowed; }
.btn3[hidden], .chip3[hidden], .sw3[hidden] { display: none; }   /* their display would beat the hidden attribute */

/* ---- Segmented pills (tabs that read like the refs' top nav) */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--card); box-shadow: var(--sh-card); }
.seg button, .seg a {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font: 600 12.5px/1 var(--font-stack); color: var(--ink-3); text-decoration: none; white-space: nowrap;
}
.seg button:hover, .seg a:hover { color: var(--ink); text-decoration: none; }
.seg .is-on { background: var(--lime); color: var(--lime-ink); }

/* Legacy containers sit on the canvas as v3 cards. */
:where(.content) :where(.section, .st-card, .card, .panel-card, .viz-panel, .mk-panel, .ob-card) {
  border-radius: var(--r-tile);
}
/* Older pages' buttons in the v3 shape: ink for the main action, ghost for the
   rest. A page's own <style> still wins (it loads after this file). */
:where(.content, .mini-modal) :is(.btn-primary-inline, .btn-secondary, .btn-danger) {
  border-radius: 999px; font: 650 13px/1.2 var(--font-stack); padding: 9px 16px; box-shadow: none; filter: none;
}
:where(.content, .mini-modal) .btn-primary-inline { background: var(--ink); border: 1px solid var(--ink); color: #fff; }
:where(.content, .mini-modal) .btn-primary-inline:hover { background: #262a31; }
:where(.content, .mini-modal) .btn-secondary { background: var(--card); border: 1px solid var(--line-1); color: var(--ink-1); }
:where(.content, .mini-modal) .btn-secondary:hover { background: var(--card); border-color: var(--ink-3); }
:where(.content, .mini-modal) .btn-danger { background: var(--card); border: 1px solid var(--line-1); color: var(--danger); }
:where(.content, .mini-modal) :is(.btn-primary-inline, .btn-secondary, .btn-danger):disabled { opacity: .5; cursor: not-allowed; }
/* Older dialogs (styles.css .mini-modal) in the v3 card. */
.mini-modal { border-radius: var(--r-card); padding: 20px 22px 18px; box-shadow: var(--shadow-pop); }
.mini-modal h3 { font: 750 17px/1.25 var(--font-stack); letter-spacing: -.01em; color: var(--ink); }
/* Older page wrappers add a second gutter inside the shell's own. */
:where(.content) .cf-dashboard { padding: 0; background: transparent; min-height: 0; }   /* its flat fill showed as a box on the canvas */
:where(.content) .cf-page { padding-top: 0; }   /* titles line up with every other page */
.cf-dashboard .pg-head__title { margin: 0; }   /* its h1 rule adds a gap under the title */
/* Older pages' boxed sections (styles.css .section) read like v3 cards, their heads like card titles. */
:where(.content) .section { border: 0; border-radius: var(--r-card); box-shadow: var(--sh-card); background: var(--card); }
:where(.content) .section-head { border-bottom: 0; padding: 16px 18px 8px; }
:where(.content) .section-head h2 { font: 700 14.5px/1.2 var(--font-stack); text-transform: none; letter-spacing: -.01em; color: var(--ink); }
/* Older filter rows (styles.css .filter-row): the shared control height, radius and focus. */
:where(.content) .filter-row { gap: 8px; align-items: center; }
:where(.content) .filter-row :is(input[type="text"], input[type="search"], input[type="date"], select) {
  height: 38px; padding-top: 0; padding-bottom: 0; border-color: var(--line-1); border-radius: var(--r-ctl);
  font: 600 12.5px/1 var(--font-stack); color: var(--ink); background-color: var(--card);
}
:where(.content) .filter-row :is(input, select):focus { border-color: var(--ink); box-shadow: none; }
:where(.content) .filter-row .btn-secondary { height: 38px; padding: 0 16px; border-radius: 999px; border-color: var(--line-1); font: 650 13px/1 var(--font-stack); }
:where(.content) .filter-row .user-chip { font: 650 12px/1.2 var(--font-stack); color: var(--ink-3); }
/* Older stat boxes in side panels (styles.css .stat-grid): one soft card, sentence-case labels. */
.stat-grid { background: var(--card-2); border: 0; border-radius: var(--r-tile); gap: 0; }
.stat-grid .stat { background: transparent; padding: 12px 14px; }
.stat-grid .stat + .stat { box-shadow: inset 1px 0 0 var(--line-1); }
.stat-label { font: 600 12px/1.3 var(--font-stack); text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.stat-value { font: 750 20px/1.15 var(--font-stack); letter-spacing: -.02em; color: var(--ink); }
.stat.warn .stat-value { color: var(--warning-ink); }
.stat.err  .stat-value { color: var(--danger); }
/* Older side panels (styles.css .side-panel) in the shared drawer's look. */
.side-panel { border-left: 0; border-radius: 16px 0 0 16px; background: var(--card); box-shadow: var(--shadow-pop); }
.panel-overlay.open { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.panel-head { border-bottom: 1px solid var(--line-2); }
.panel-head h2 { font: 750 18px/1.25 var(--font-stack); letter-spacing: -.01em; color: var(--ink); }
.panel-foot { background: var(--card); border-top: 1px solid var(--line-2); }

/* =============================================================================
   4. DASHBOARD
   ============================================================================= */
body.is-dash .main-wrap .content { padding-top: 0; }
.dx { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; height: 100%; min-height: 0; }

/* Hero: greeting + the four numbers that matter for this team */
.dx-hero { display: grid; grid-template-columns: minmax(240px, 1.05fr) 3fr; gap: 14px; align-items: stretch; }
.dx-hello { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 2px 4px; min-width: 0; }
.dx-hello__h { font: 750 26px/1.12 var(--font-stack); letter-spacing: -.025em; color: var(--ink); margin: 0; }
.dx-hello__sub { font: 500 13px/1.4 var(--font-stack); color: var(--ink-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dx-lens { margin-top: 4px; align-self: flex-start; }
/* More lenses than fit a segmented control (an admin's seven): a pill-shaped picker. */
.dx-lens-sel { position: relative; display: inline-flex; }
.dx-lens-sel::after { content: "▾"; position: absolute; right: 13px; top: 50%; transform: translateY(-52%); font-size: 11px; color: var(--ink-3); pointer-events: none; }
.dx-lens-sel select { appearance: none; -webkit-appearance: none; height: 36px; padding: 0 32px 0 15px; border: 0; border-radius: 999px; background: var(--card); box-shadow: var(--sh-card); font: 650 12.5px/1 var(--font-stack); color: var(--ink); cursor: pointer; }
.dx-lens-sel select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 6px; }
.dx-stat {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto;
  column-gap: 8px; padding: 12px 14px; border-radius: 17px; text-decoration: none; color: inherit; min-width: 0;
}
.dx-stat + .dx-stat::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 1px; background: var(--line-2); }
a.dx-stat:hover { background: var(--card-2); text-decoration: none; }
a.dx-stat:hover::before, a.dx-stat:hover + .dx-stat::before { opacity: 0; }
.dx-stat__label { grid-column: 1 / -1; grid-row: 1; font: 600 12px/1.3 var(--font-stack); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-stat__value { grid-column: 1; grid-row: 2; font: 750 26px/1.15 var(--font-stack); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 4px; white-space: nowrap; }
.dx-stat__value small { font: 600 13px/1 var(--font-stack); color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.dx-stat__bars { grid-row: 2 / 4; grid-column: 2; align-self: end; display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.dx-stat__bars i { display: block; width: 3px; border-radius: 2px; background: var(--line-1); }
.dx-stat__bars i.is-hi { background: var(--bc, var(--ink)); }
.dx-stat__note { grid-column: 1; grid-row: 3; font: 550 11.5px/1.3 var(--font-stack); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dx-stat__note.is-up { color: var(--success-ink); }
.dx-stat__note.is-down { color: var(--danger); }
.dx-stat__note.is-warn { color: var(--warning-ink); }

/* Board: twelve columns, six rows, fills what is left of the screen */
.dx-board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 14px; min-height: 0; }
.dx-card {
  position: relative; min-width: 0; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 16px 18px;
}
.dx-card--ink { background: var(--ink); color: #fff; }
.dx-card--lime { background: var(--lime); color: var(--lime-ink); }
.dx-card--map { padding: 0; background: linear-gradient(180deg, #f9fafb 0%, #eef1f5 100%); }
.dx-card--map > .dx-card__head { position: absolute; z-index: 3; top: 14px; left: 18px; right: 14px; margin: 0; pointer-events: none; }
.dx-card--map > .dx-card__head > * { pointer-events: auto; }
.dx-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex: 0 0 auto; }
.dx-card__title { font: 700 14.5px/1.2 var(--font-stack); color: inherit; margin: 0; letter-spacing: -.01em; white-space: nowrap; flex: 0 0 auto; }
.dx-card__meta { font: 550 12px/1.2 var(--font-stack); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.dx-card--ink .dx-card__meta { color: rgb(255 255 255 / .55); }
.dx-card--lime .dx-card__meta { color: rgb(35 54 0 / .7); }
.dx-card__spacer { flex: 1 1 auto; }
.dx-go {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--card-2); color: var(--ink); text-decoration: none; font: 600 15px/1 var(--font-stack);
  transition: background .12s var(--ease), color .12s var(--ease), transform .12s var(--ease);
}
.dx-go:hover { background: var(--ink); color: var(--lime); text-decoration: none; transform: rotate(-12deg); }
.dx-card--ink .dx-go { background: rgb(255 255 255 / .1); color: #fff; }
.dx-card--lime .dx-go { background: rgb(35 54 0 / .1); color: var(--lime-ink); }
.dx-card__body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.dx-scroll { overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.dx-empty { margin: auto; text-align: center; font: 500 13px/1.5 var(--font-stack); color: var(--ink-3); padding: 12px; }
.dx-err { font: 500 12.5px/1.45 var(--font-stack); color: var(--danger); padding: 4px 0; }
.dx-skel { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.dx-skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--card-2), #fafbfc, var(--card-2)); background-size: 200% 100%; animation: dx-shim 1.3s infinite; }
.dx-card--ink .dx-skel i { background: linear-gradient(90deg, #22252c, #2b2f37, #22252c); background-size: 200% 100%; }
@keyframes dx-shim { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Rows used inside cards (queues, lists) */
.dx-rows { display: flex; flex-direction: column; gap: 6px; }
.dx-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 14px; background: var(--card-2); text-decoration: none; color: inherit;
  border: 0; text-align: left; font: inherit; cursor: pointer; width: 100%;
}
.dx-row:hover { background: #eceef2; text-decoration: none; }
.dx-row__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-4); }
.dx-row__dot.is-danger { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.dx-row__dot.is-warning { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.dx-row__dot.is-info { background: var(--info); }
.dx-row__dot.is-clear { background: var(--success); }
.dx-row__label { font: 600 13px/1.25 var(--font-stack); color: var(--ink-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-row__sub { display: block; font: 500 11.5px/1.3 var(--font-stack); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-row__n { font: 750 18px/1 var(--font-stack); color: var(--ink); font-variant-numeric: tabular-nums; }
.dx-row.is-clear .dx-row__n { color: var(--ink-3); }

/* Mini bar chart (vertical) */
.dx-vbars { display: flex; align-items: flex-end; gap: 6px; height: 100%; min-height: 40px; }
.dx-vbars__c { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.dx-vbars__track { flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; min-height: 0; }
.dx-vbars__bar { width: 100%; border-radius: 6px 6px 3px 3px; background: var(--line-1); min-height: 3px; }
.dx-vbars__bar.is-hi { background: var(--ink); }
.dx-vbars__bar.is-lime { background: var(--lime-strong); }
.dx-vbars__x { font: 600 10.5px/1 var(--font-stack); color: var(--ink-3); }

/* Horizontal meters */
.dx-meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.dx-meter__lbl { font: 600 12.5px/1.25 var(--font-stack); color: var(--ink-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-meter__val { font: 700 12.5px/1 var(--font-stack); color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.dx-meter__track { grid-column: 1 / -1; height: 8px; border-radius: 6px; background: var(--card-2); overflow: hidden; }
.dx-meter__fill { display: block; height: 100%; border-radius: 6px; background: var(--ink); width: 0; transition: width .8s var(--ease); }
.dx-meter__fill.is-danger { background: var(--danger); }
.dx-meter__fill.is-warning { background: var(--warning); }
.dx-meter__fill.is-success { background: var(--success); }
.dx-meter__fill.is-lime { background: var(--lime-strong); }
.dx-meter--on-row .dx-meter__track { background: var(--card); }   /* a meter inside a grey row */

/* Ask Flo: questions about our numbers and about using Cflow (js/ask.js) */
.ask {
  position: fixed; z-index: 60; top: 12px; right: 12px; bottom: 12px; width: min(400px, calc(100vw - 24px));
  display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-pop);
  transform: translateX(16px); opacity: 0; transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.ask.is-open { transform: none; opacity: 1; }
.ask[hidden] { display: none; }
.ask__head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line-2); }
.ask__av { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; }
.ask__av svg { width: 40px; height: 40px; }
.ask__title { font: 750 15px/1.2 var(--font-stack); margin: 0; color: var(--ink); }
.ask__sub { font: 500 12px/1.3 var(--font-stack); color: var(--ink-3); margin: 2px 0 0; }
.ask__x { margin-left: auto; width: 30px; height: 30px; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--card-2); color: var(--ink-3); font-size: 16px; line-height: 1; cursor: pointer; }
.ask__log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.ask__hello { font: 500 13px/1.45 var(--font-stack); color: var(--ink-2); }
.ask__try { display: flex; flex-wrap: wrap; gap: 6px; }
.ask__try button { border: 0; cursor: pointer; }
.ask__try button:hover { background: var(--line-2); color: var(--ink); }
.ask__q { align-self: flex-end; max-width: 85%; padding: 9px 12px; border-radius: 16px 16px 4px 16px; background: var(--ink); color: #fff; font: 550 13px/1.4 var(--font-stack); overflow-wrap: anywhere; }
.ask__a { align-self: flex-start; max-width: 94%; padding: 11px 13px; border-radius: 16px 16px 16px 4px; background: var(--card-2); color: var(--ink-1); font: 500 13px/1.5 var(--font-stack); overflow-wrap: anywhere; }
.ask__a p { margin: 0; }
.ask__a ul { margin: 8px 0 0; padding-left: 18px; }
.ask__a li { margin: 2px 0; }
.ask__a .btn3 { margin-top: 10px; }
.ask__a.is-refused { color: var(--ink-2); }
.ask__meta { margin-top: 8px; font: 550 11px/1.35 var(--font-stack); color: var(--ink-3); }
.ask__meta.is-warn { color: var(--warning-ink); }
.ask__think { align-self: flex-start; font: 550 12px/1 var(--font-stack); color: var(--ink-3); padding: 8px 2px; }
.ask__form { border-top: 1px solid var(--line-2); padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.ask__form textarea { width: 100%; box-sizing: border-box; resize: none; min-height: 44px; max-height: 120px; padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-1); background: var(--card-2); font: 500 13px/1.4 var(--font-stack); color: var(--ink); }
.ask__form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; background: var(--card); }
.ask__row { display: flex; align-items: center; gap: 8px; }
.ask__left { flex: 1 1 auto; font: 550 11.5px/1.2 var(--font-stack); color: var(--ink-3); }
@media (max-width: 760px) { .ask { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(80vh, 640px); } }
@media (prefers-reduced-motion: reduce) { .ask { transition: none; } }
.ask__log[hidden], .ask__form[hidden], .ask__mem[hidden] { display: none; }
.ask__tabs { display: flex; gap: 4px; padding: 10px 16px 0; }
.ask__tab { flex: 1 1 0; height: 30px; border: 0; border-radius: 999px; background: var(--card-2); color: var(--ink-3); font: 650 12.5px/1 var(--font-stack); cursor: pointer; }
.ask__tab:hover { color: var(--ink); }
.ask__tab.is-on { background: var(--ink); color: #fff; }
.ask__tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Remember: decisions Flo keeps in mind (js/memory.js) */
.ask__mem { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.mem-new { display: flex; flex-direction: column; gap: 8px; }
.mem-lbl { font: 650 12.5px/1.3 var(--font-stack); color: var(--ink); }
.mem-new textarea { width: 100%; box-sizing: border-box; resize: none; min-height: 44px; max-height: 120px; padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-1); background: var(--card-2); font: 500 13px/1.4 var(--font-stack); color: var(--ink); }
.mem-new textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; background: var(--card); }
.mem-card { border-radius: 16px; background: var(--card-2); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mem-card__say { font: 600 13px/1.4 var(--font-stack); color: var(--ink); overflow-wrap: anywhere; }
.mem-card__row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px; font: 600 12px/1.2 var(--font-stack); color: var(--ink-3); }
.mem-card__row b { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.mem-card select, .mem-card input[type="date"] { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border-radius: var(--r-ctl); border: 1px solid var(--line-1); background: var(--card); font: 550 12.5px/1 var(--font-stack); color: var(--ink); }
.mem-card select:focus-visible, .mem-card input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.mem-prev { display: flex; flex-direction: column; gap: 4px; font: 550 12.5px/1.4 var(--font-stack); color: var(--ink-2); }
.mem-prev b { color: var(--ink); }
.mem-prev small { font: 500 11.5px/1.35 var(--font-stack); color: var(--ink-3); overflow-wrap: anywhere; }
.mem-warn { font: 550 12px/1.4 var(--font-stack); color: var(--warning-ink); }
.mem-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 500 12px/1.4 var(--font-stack); color: var(--ink-3); }
.mem-pick button { border: 0; cursor: pointer; }
.mem-pick button:hover { background: var(--line-2); color: var(--ink); }
.mem-card__acts { display: flex; justify-content: flex-end; gap: 8px; }
.mem-list { display: flex; flex-direction: column; gap: 8px; }
.mem-list__h { font: 700 10.5px/1 var(--font-stack); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.mem-item { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); }
.mem-item.is-off { opacity: .6; }
.mem-item__top { display: flex; align-items: center; gap: 8px; }
.mem-item__off { font: 650 11px/1 var(--font-stack); color: var(--ink-3); }
.mem-item__body { font: 550 13px/1.4 var(--font-stack); color: var(--ink-1); overflow-wrap: anywhere; }
.mem-item__meta { font: 500 11.5px/1.4 var(--font-stack); color: var(--ink-3); }
.mem-item__acts { display: flex; gap: 6px; margin-top: 2px; }

/* Small chips */
.chip3 { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: var(--card-2); font: 650 11.5px/1.2 var(--font-stack); color: var(--ink-2); white-space: nowrap; }
.chip3 i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip3.is-danger { background: var(--danger-soft); color: var(--danger); }
.chip3.is-warning { background: var(--warning-soft); color: var(--warning-ink); }
.chip3.is-success { background: var(--success-soft); color: var(--success-ink); }
.chip3.is-info { background: var(--info-soft); color: var(--info); }
.chip3.is-lime { background: var(--lime); color: var(--lime-ink); }
.chip3.is-ink { background: var(--ink); color: #fff; }

/* Switch: one on/off setting, with its word beside it */
.sw3 { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: 600 12px/1 var(--font-stack); color: var(--ink-2); white-space: nowrap; }
.sw3 input { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line-1); position: relative; margin: 0; cursor: pointer; transition: background .15s var(--ease); flex: 0 0 auto; }
.sw3 input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .22); transition: transform .15s var(--ease); }
.sw3 input:checked { background: var(--ink); }
.sw3 input:checked::after { transform: translateX(14px); }
.sw3 input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sw3 input:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Coach: the dark card that talks ------------------------------------------ */
.co { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.co-intro { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.co-av {
  width: 30px; height: 30px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--lime); color: var(--lime-ink); font: 800 14px/1 var(--font-stack);
}
.co-av--flo { width: 40px; height: 40px; background: none; border-radius: 0; margin-top: -4px; }
.co-av--flo .flo__shadow { fill: rgb(255 255 255 / .12); }
.co-hello { font: 550 13px/1.45 var(--font-stack); color: rgb(255 255 255 / .86); }
.co-hello b { color: #fff; }
.co-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; scrollbar-width: thin; scrollbar-color: #3a3f48 transparent; }
.co-msg {
  border-radius: 16px; background: var(--ink-soft); padding: 11px 12px 10px; border: 1px solid rgb(255 255 255 / .04);
  animation: co-in .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes co-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.co-msg__top { display: flex; align-items: center; gap: 8px; }
.co-msg__sev { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: #8a919e; }
.co-msg.is-critical .co-msg__sev { background: #ff6b5e; box-shadow: 0 0 0 3px rgb(255 107 94 / .2); }
.co-msg.is-warn .co-msg__sev { background: #f5b83d; }
.co-msg.is-win .co-msg__sev { background: var(--lime); }
.co-msg__title { flex: 1; min-width: 0; font: 650 13px/1.3 var(--font-stack); color: #fff; }
.co-msg__team { font: 600 10px/1 var(--font-stack); letter-spacing: .05em; text-transform: uppercase; color: rgb(255 255 255 / .62); }
.co-msg__body { font: 450 12.5px/1.45 var(--font-stack); color: rgb(255 255 255 / .66); margin: 5px 0 0 16px; }
.co-msg__acts { display: flex; gap: 6px; margin: 9px 0 0 16px; flex-wrap: wrap; }
.co-act {
  height: 26px; padding: 0 10px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px; font: 650 11.5px/1 var(--font-stack);
  background: rgb(255 255 255 / .08); color: rgb(255 255 255 / .85);
}
.co-act:hover { background: rgb(255 255 255 / .16); color: #fff; text-decoration: none; }
.co-act--lime { background: var(--lime); color: var(--lime-ink); }
/* "Urgent" in words beside the red dot (never colour alone), and Show more under the list, always in view. */
.co-msg__urgent { flex: 0 0 auto; font: 750 10px/1 var(--font-stack); letter-spacing: .06em; text-transform: uppercase; color: #ff8a80; }
.co > [data-coach-all] { margin-top: 8px; }
.co-act--lime:hover { background: var(--lime-strong); color: var(--lime-ink); }
.co-msg.is-done { opacity: .45; }
.co-msg.is-done .co-msg__title { text-decoration: line-through; text-decoration-color: rgb(255 255 255 / .4); }
.co-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font: 550 11.5px/1.3 var(--font-stack); color: rgb(255 255 255 / .45); }
.co-foot .co-act { margin-left: auto; }
.co-ai { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgb(200 242 109 / .14); color: var(--lime); font: 700 10.5px/1 var(--font-stack); letter-spacing: .03em; }
/* "Flo remembers": decisions the numbers already leave out (js/memory.js) */
.co-mem {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 7px 10px; cursor: pointer; text-align: left;
  border: 1px dashed rgb(255 255 255 / .16); border-radius: 12px; background: transparent; font: 550 11.5px/1.3 var(--font-stack); color: rgb(255 255 255 / .72);
}
.co-mem:hover { border-color: rgb(255 255 255 / .32); color: #fff; }
.co-mem:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.co-mem__k { flex: 0 0 auto; font: 700 10px/1 var(--font-stack); letter-spacing: .05em; text-transform: uppercase; color: rgb(255 255 255 / .45); }
.co-mem__v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Quest: the lime card that keeps score ------------------------------------ */
.qs { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; }
.qs-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.qs-meta { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.qs-ring { position: relative; width: 80px; height: 80px; }
.qs-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.qs-ring__bg { stroke: rgb(35 54 0 / .14); }
.qs-ring__fg { stroke: var(--lime-ink); transition: stroke-dashoffset 1s var(--ease); }
.qs-ring__c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.qs-ring__n { font: 800 19px/1 var(--font-stack); color: var(--lime-ink); font-variant-numeric: tabular-nums; }
.qs-ring__s { font: 650 9.5px/1.2 var(--font-stack); color: rgb(35 54 0 / .7); margin-top: 2px; }
.qs-lv { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qs-lv__badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--lime-ink); color: var(--lime); font: 750 12px/1 var(--font-stack); }
.qs-lv__streak { font: 700 12.5px/1 var(--font-stack); color: var(--lime-ink); }
.qs-xp { min-width: 0; }
.qs-xp__track { height: 8px; border-radius: 6px; background: rgb(35 54 0 / .14); overflow: hidden; }
.qs-xp__fill { height: 100%; border-radius: 6px; background: var(--lime-ink); width: 0; transition: width 1s var(--ease); }
.qs-xp__lbl { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; font: 650 11px/1.2 var(--font-stack); color: rgb(35 54 0 / .72); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qs-xp__lbl span { overflow: hidden; text-overflow: ellipsis; }
.qs-next { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.qs-task {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 14px;
  background: rgb(255 255 255 / .55); min-width: 0;
}
.qs-task__t { flex: 1; min-width: 0; font: 600 12.5px/1.3 var(--font-stack); color: var(--lime-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-task__t small { display: block; font-weight: 550; font-size: 11px; color: rgb(35 54 0 / .66); }
.qs-task__t small.is-late { color: var(--danger); }
.qs-tick {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; flex: 0 0 auto;
  background: var(--lime-ink); color: var(--lime); display: grid; place-items: center; font: 800 14px/1 var(--font-stack);
}
.qs-tick:hover { transform: scale(1.06); }
.qs-tick:disabled { opacity: .5; cursor: progress; }
.qs-clear { font: 650 13px/1.4 var(--font-stack); color: var(--lime-ink); padding: 6px 2px; }
.qs-badges { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; flex: 0 0 auto; }
.qs-badge { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; background: rgb(255 255 255 / .5); font: 650 11px/1 var(--font-stack); color: var(--lime-ink); white-space: nowrap; }
/* The quest card keeps its order of importance when space is short:
   ring and level first, then the next task, then badges. */
.dx-card--lime > .dx-card__body { container-type: size; }
@container (max-height: 230px) {
  .qs-badges { display: none; }
  .qs-task + .qs-task { display: none; }
}
@container (max-height: 175px) {
  .qs { gap: 8px; }
  .qs-ring { width: 62px; height: 62px; }
  .qs-ring__n { font-size: 15px; }
  .qs-ring__s { display: none; }
  .qs-meta { gap: 7px; }
  .qs-xp__lbl { display: none; }
  .qs-task { padding: 6px 6px 6px 10px; }
  .qs-tick { width: 26px; height: 26px; font-size: 12px; }
}
@container (max-height: 105px) { .qs-next { display: none; } }
.qs-badge.is-off { opacity: .45; }
.qs-burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.qs-burst i { position: absolute; width: 8px; height: 8px; border-radius: 2px; top: 40%; left: 50%; animation: qs-pop 1.1s var(--ease) forwards; }
@keyframes qs-pop { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* ---- Flow map: the isometric scene -------------------------------------------- */
.fm { position: relative; width: 100%; height: 100%; min-height: 0; perspective: 1400px; }
.fm-head { position: absolute; z-index: 3; top: 14px; left: 18px; right: 14px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.fm-head > * { pointer-events: auto; }
.fm-stage { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .5s var(--ease); }
.fm-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.fm-legend { position: absolute; z-index: 3; left: 14px; right: 14px; bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.fm-legend .chip3 { background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 1px 2px rgb(18 20 24 / .05); }
.fm-legend .chip3 b { font-weight: 800; color: var(--ink); }
.fm-tip {
  position: absolute; z-index: 4; min-width: 200px; max-width: 260px; pointer-events: auto;
  background: var(--glass); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgb(255 255 255 / .8); border-radius: 18px; box-shadow: var(--shadow-pop);
  padding: 12px 14px; opacity: 0; transform: translateY(6px); transition: opacity .15s var(--ease), transform .15s var(--ease);
}
.fm-tip.is-on { opacity: 1; transform: none; }
.fm-tip__h { display: flex; align-items: center; gap: 8px; font: 750 13.5px/1.2 var(--font-stack); color: var(--ink); }
.fm-tip__state { font: 600 11px/1.3 var(--font-stack); color: var(--ink-3); margin: 3px 0 8px; display: flex; align-items: center; gap: 5px; }
.fm-tip__state i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.fm-tip__state.is-warning i { background: var(--warning); }
.fm-tip__state.is-danger i { background: var(--danger); }
.fm-tip__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.fm-tip__k { font: 550 10.5px/1.2 var(--font-stack); color: var(--ink-3); }
.fm-tip__v { font: 750 15px/1.2 var(--font-stack); color: var(--ink); font-variant-numeric: tabular-nums; }
.fm-tip a { display: inline-flex; }

/* SVG parts */
.fm-ground { fill: #ffffff; }
.fm-grid { stroke: #e3e7ee; stroke-width: 1; }
/* roads: concrete inside the works, asphalt out to the customers; kerbs and a dashed centre line */
.fm-asphalt.is-make { fill: #d9dfe7; }
.fm-asphalt.is-sell, .fm-asphalt.is-return { fill: #aab3bf; }
.fm-kerb { stroke: #ffffff; stroke-width: 1.4; }
.fm-kerb.is-make { stroke: #f4f6f9; stroke-width: 1.2; }
.fm-lane { stroke-width: 1.5; stroke-dasharray: 7 6; stroke-linecap: butt; }
.fm-lane.is-make { stroke: #8fc63e; }
.fm-lane.is-sell { stroke: #ffffff; }
.fm-lane.is-return { stroke: #f7c27e; }
/* vehicles and goods — each face shaded like the buildings (top, left, right) */
.fm-veh { pointer-events: none; }
.fm-veh polygon { stroke: rgb(18 20 24 / .2); stroke-width: .45; stroke-linejoin: round; }
.fm-veh .fm-vshadow, .fm-veh .fm-stripe, .fm-veh .fm-seam, .fm-veh .fm-tail, .fm-veh .fm-tyre, .fm-veh .fm-hub { stroke: none; }
.fm-vshadow { fill: rgb(18 20 24 / .15); }
.fm-van.fm-vt { fill: #ffffff; } .fm-van.fm-vl { fill: #eef1f5; } .fm-van.fm-vr { fill: #d7dde5; }
.fm-cab.fm-vt { fill: #464d59; } .fm-cab.fm-vl { fill: #343a44; } .fm-cab.fm-vr { fill: #272c34; }
.fm-box.fm-vt { fill: #f6f8fa; } .fm-box.fm-vl { fill: #e6eaf0; } .fm-box.fm-vr { fill: #cfd6df; }
.fm-bed.fm-vt { fill: #b4bcc7; } .fm-bed.fm-vl { fill: #9ea7b3; } .fm-bed.fm-vr { fill: #8a94a1; }
.fm-chassis { fill: #2e333b; }
.fm-bumper { fill: #555c68; }
.fm-glass { fill: #3a4a61; }
.fm-stripe { fill: #c8f26d; }
.fm-seam { fill: rgb(18 20 24 / .16); }
.fm-tail { fill: #e0574c; }
.fm-lamp { fill: #fff7d6; }
.fm-grille { fill: #2e333b; }
.fm-tyre { fill: #1b1e24; }
.fm-hub { fill: #aab2bd; }
.fm-trolley.fm-vt { fill: #9aa4b2; } .fm-trolley.fm-vl { fill: #858f9d; } .fm-trolley.fm-vr { fill: #737c89; }
.fm-carton.fm-vt { fill: #e6cc9f; } .fm-carton.fm-vl { fill: #d6b583; } .fm-carton.fm-vr { fill: #c19e6c; }
.fm-carton.is-b.fm-vt { fill: #eed8b0; } .fm-carton.is-b.fm-vl { fill: #dfc293; } .fm-carton.is-b.fm-vr { fill: #caa97a; }
.fm-tape { fill: #b8925a; }
.fm-lift.fm-vt { fill: #f7c948; } .fm-lift.fm-vl { fill: #eab62e; } .fm-lift.fm-vr { fill: #d29d1f; }
.fm-mast.fm-vt { fill: #5d6470; } .fm-mast.fm-vl { fill: #4a515c; } .fm-mast.fm-vr { fill: #3b414b; }
.fm-pallet.fm-vt { fill: #d8b887; } .fm-pallet.fm-vl { fill: #c4a072; } .fm-pallet.fm-vr { fill: #ae8b5f; }
.fm-cloth.c0.fm-vt { fill: #5b77a8; } .fm-cloth.c0.fm-vl { fill: #4a6593; } .fm-cloth.c0.fm-vr { fill: #3c547d; }
.fm-cloth.c1.fm-vt { fill: #cfc4ad; } .fm-cloth.c1.fm-vl { fill: #bdb197; } .fm-cloth.c1.fm-vr { fill: #a99c81; }
.fm-cloth.c2.fm-vt { fill: #3e4766; } .fm-cloth.c2.fm-vl { fill: #323a55; } .fm-cloth.c2.fm-vr { fill: #282f46; }
.fm-cloth.c3.fm-vt { fill: #93a06b; } .fm-cloth.c3.fm-vl { fill: #808d5a; } .fm-cloth.c3.fm-vr { fill: #6d7a4b; }
/* doors on the buildings */
.fm-node .fm-lintel { fill: #b8c2ce; }
.fm-node .fm-door { fill: #dde3ea; }
.fm-node .fm-door-gap { fill: #3a414c; }
.fm-node .fm-slat { stroke: #bec7d2; stroke-width: .8; }
.fm-node .fm-house-door { fill: #9aa6b5; }
/* shipping containers in the courier yard */
.fm-box-a.fm-vt { fill: #a9cc62; } .fm-box-a.fm-vl { fill: #92b84d; } .fm-box-a.fm-vr { fill: #7a9d3d; }
.fm-box-b.fm-vt { fill: #6f95d6; } .fm-box-b.fm-vl { fill: #587fc2; } .fm-box-b.fm-vr { fill: #4669a6; }
.fm-box-c.fm-vt { fill: #e39a6c; } .fm-box-c.fm-vl { fill: #d18355; } .fm-box-c.fm-vr { fill: #b66d43; }
.fm-rib { stroke: rgb(18 20 24 / .14); stroke-width: 1; }

/* into the warehouse */
.fm .fm-nodes, .fm .fm-roads, .fm .fm-moving, .fm .fm-arcs, .fm .fm-pins { transition: opacity .35s var(--ease); }
.fm.is-zoom .fm-stage .fm-roads, .fm.is-zoom .fm-stage .fm-moving, .fm.is-zoom .fm-stage .fm-arcs, .fm.is-zoom .fm-stage .fm-pins { opacity: 0; }
.fm.is-zoom .fm-stage .fm-node:not(.is-hub) { opacity: .08; transition: opacity .35s var(--ease); }
.dx-card:has(.fm.is-zoom) .fm-legend, .dx-card:has(.fm.is-zoom) > .dx-card__head { opacity: 0; pointer-events: none; transition: opacity .2s; }
.fm-inside {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; border-radius: inherit;
  background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #f2f4f7 100%);
  opacity: 0; transform: scale(.97); transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.fm-inside.is-on { opacity: 1; transform: none; }
.fm-inside[hidden] { display: none; }
.fm-in__head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 14px 0; }
.fm-in__t { font: 750 14px/1.2 var(--font-stack); color: var(--ink); margin: 0 6px 0 4px; }
.fm-in__open { margin-left: auto; }
.fm-in__body { flex: 1 1 auto; min-height: 0; display: flex; gap: 8px; padding: 0 14px 12px 0; }
.fm-in-svg { flex: 1 1 auto; min-width: 0; min-height: 0; }
.fm-in__side { flex: 0 0 196px; display: flex; flex-direction: column; gap: 5px; padding-top: 10px; min-height: 0; overflow: hidden; }
.fm-in__sec { font: 700 10px/1 var(--font-stack); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 8px 2px 2px; }
.fm-in__sec:first-child { margin-top: 0; }
.fm-in__row { display: grid; grid-template-columns: 8px auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgb(18 20 24 / .06); }
.fm-in__row i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.fm-in__row.is-warning i { background: var(--warning); }
.fm-in__row b { font: 800 15px/1 var(--font-stack); color: var(--ink); font-variant-numeric: tabular-nums; }
.fm-in__row span { font: 600 11px/1.25 var(--font-stack); color: var(--ink-3); }
.fm-in__movers { list-style: none; margin: 0; padding: 4px; display: flex; flex-direction: column; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgb(18 20 24 / .06); }
.fm-in__movers li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 8px; padding: 6px 8px; }
.fm-in__movers li + li { border-top: 1px solid var(--line, #eef0f3); }
.fm-in__movers span { font: 650 12px/1.25 var(--font-stack); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-in__movers b { font: 800 12px/1.25 var(--font-stack); color: var(--ink); font-variant-numeric: tabular-nums; }
.fm-in__movers em { grid-column: 1 / -1; font: 550 10.5px/1.2 var(--font-stack); font-style: normal; color: var(--ink-3); }
.fm-in__movers li.is-low em { color: #b7791f; }
@media (max-width: 760px) { .fm-in__side { display: none; } .fm-in__body { padding-right: 0; } }
.fm-in-floor { fill: #eceff3; }
.fm-in-tile { stroke: #e3e7ed; stroke-width: .8; }
.fm-in-wall-b { fill: #e9edf2; } .fm-in-wall-l { fill: #dde3ea; }
.fm-in-wall-cap { fill: #c8d0db; } .fm-in-wall-cut { fill: #b4bfcc; }
.fm-in-win { fill: #cfe0f6; }
.fm-inside .fm-lintel { fill: #c3ccd7; } .fm-inside .fm-door { fill: #d5dce5; } .fm-inside .fm-slat { stroke: #bcc5d0; stroke-width: .8; }
.fm-in-zone { stroke-width: 1.2; stroke-dasharray: 6 5; }
.fm-in-zone.is-in { fill: rgb(132 198 42 / .07); stroke: #9cc85a; }
.fm-in-zone.is-out { fill: rgb(47 111 228 / .05); stroke: #8eaee4; }
.fm-in-zone.is-ret { fill: rgb(240 138 36 / .06); stroke: #e8ae6e; }
.fm-in-walk { stroke: #f2c94c; stroke-width: 1.5; opacity: .75; }
.fm-in-dock { fill: #4b525d; }
.fm-in-paint { font: 800 9px/1 var(--font-stack); letter-spacing: .14em; }
.fm-in-paint.is-in { fill: #86b444; } .fm-in-paint.is-out { fill: #7f9fd6; } .fm-in-paint.is-ret { fill: #dc9b55; }
.fm-upr.fm-vt, .fm-upr.fm-vl { fill: #5479b4; } .fm-upr.fm-vr { fill: #42649c; }
.fm-rack-back { fill: rgb(84 121 180 / .07); stroke: rgb(84 121 180 / .25); stroke-width: .6; }
.fm-beam.fm-vt { fill: #e6eaf0; } .fm-beam.fm-vl { fill: #ec913f; } .fm-beam.fm-vr { fill: #d57b2c; }
.fm-plate.is-healthy { fill: #45b56c; } .fm-plate.is-warning { fill: #e8a63a; } .fm-plate.is-critical { fill: #e0574c; }
.fm-plate.is-mover { fill: var(--lime); }
.fm-plate.fm-vt { filter: brightness(1.12); }
.fm-table.fm-vt { fill: #f4f6f9; } .fm-table.fm-vl { fill: #c9d1dc; } .fm-table.fm-vr { fill: #b3bdca; }
.fm-post.fm-vt, .fm-post.fm-vl { fill: #8f99a7; } .fm-post.fm-vr { fill: #7a8492; }
.fm-mesh { fill: rgb(140 151 166 / .14); stroke: #a6b0bd; stroke-width: .8; }
.fm-bay { cursor: default; outline: none; }
.fm-bay:hover, .fm-bay:focus { filter: drop-shadow(0 0 5px rgb(200 242 109 / .95)); }
.fm-flow { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.fm-flow.is-return { stroke: #f08a24; stroke-dasharray: 6 6; }
.fm-node { cursor: pointer; }
.fm-node:focus { outline: none; }
.fm-face-top { fill: #ffffff; }
.fm-face-l { fill: #e4e9f1; }
.fm-face-r { fill: #cfd7e3; }
.fm-node .fm-roofline { stroke: #dfe4ec; stroke-width: 1; fill: none; }
.fm-node .fm-window { fill: #7fa6e8; opacity: .55; }
.fm-node.is-hub .fm-face-top { fill: #fbfcfd; }
.fm-node:hover .fm-face-top, .fm-node:focus .fm-face-top, .fm-node.is-sel .fm-face-top { fill: #f3fbe2; }
.fm-node:hover .fm-face-l, .fm-node:focus .fm-face-l, .fm-node.is-sel .fm-face-l { fill: #dcebc4; }
.fm-node:hover .fm-face-r, .fm-node:focus .fm-face-r, .fm-node.is-sel .fm-face-r { fill: #c6dca2; }
.fm-shadow { fill: rgb(18 20 24 / .07); }
/* a patch of ground under a station that is behind (amber) or stuck (red) */
.fm-zone { fill: transparent; stroke: none; }
.fm-node.is-warning .fm-zone { fill: rgb(232 169 58 / .15); stroke: rgb(214 148 34 / .55); stroke-width: 1.2; stroke-dasharray: 5 4; }
.fm-node.is-danger .fm-zone { fill: rgb(224 76 66 / .13); stroke: rgb(214 69 60 / .6); stroke-width: 1.2; stroke-dasharray: 5 4; animation: fm-zone 2.6s ease-in-out infinite; }
@keyframes fm-zone { 50% { opacity: .45; } }
.fm-pin rect { fill: #ffffff; filter: drop-shadow(0 2px 4px rgb(18 20 24 / .12)); }
.fm-pin .fm-pin__n { font: 800 13px/1 var(--font-stack); fill: var(--ink); font-variant-numeric: tabular-nums; }
.fm-pin .fm-pin__l { font: 600 9.5px/1 var(--font-stack); fill: var(--ink-3); letter-spacing: .02em; }
.fm-pin .fm-pin__dot { r: 3.2; fill: var(--success); }
.fm-node.is-warning .fm-pin__dot { fill: var(--warning); }
.fm-node.is-danger .fm-pin__dot { fill: var(--danger); }
.fm-node.is-idle .fm-pin__dot { fill: var(--ink-4); }
@media (prefers-reduced-motion: reduce) {
  .fm-node.is-danger .fm-zone { animation: none; }
  .co-msg { animation: none; }
}

/* ---- Sales funnel: the shop floor (js/journey.js) -------------------------------
   The flow map's ground, walls, pins and glass card. The way in (feed → website →
   cart → checkout → orders) is concrete with a lime dashed middle, like the works'
   roads on the flow map; the way out to the customers is asphalt. Each lane off
   the road is the people who stopped at a step: red or amber when that step lost
   more people than before, lime when it kept more. */
.jm-road.is-in { fill: #d9dfe7; }
.jm-road.is-other { fill: #e3e7ed; }
.jm-road.is-after { fill: #aab3bf; }
.jm-kerb { stroke: #ffffff; stroke-width: 1.2; }
.jm-lane { stroke-width: 1.5; stroke-dasharray: 7 6; }
.jm-lane.is-in { stroke: #8fc63e; }
.jm-lane.is-other, .jm-lane.is-after { stroke: #ffffff; }
.jm-road.is-exit { fill: #e9edf2; }
.jm-road.is-exit.is-warning { fill: rgb(232 169 58 / .22); }
.jm-road.is-exit.is-danger { fill: rgb(224 76 66 / .2); }
.jm-road.is-exit.is-up { fill: rgb(178 224 74 / .3); }
.jm-kerb.is-exit { stroke-width: 1; }
.jm-lane.is-exit { stroke: #c3cad4; stroke-width: 1.3; stroke-dasharray: 3 5; }
.jm-lane.is-exit.is-danger { stroke: #e0574c; } .jm-lane.is-exit.is-warning { stroke: #e8a63a; } .jm-lane.is-exit.is-up { stroke: #8fc63e; }
.jm-walker { fill: #3d434f; stroke: #ffffff; stroke-width: 1.2; }
.jm-walker.is-other { fill: #7c8695; }
.jm-walker.is-out { fill: #a3acb8; }
.jm-walker.is-out.is-danger { fill: var(--danger); } .jm-walker.is-out.is-warning { fill: var(--warning); }
.jm-stem { stroke: #c4ccd8; stroke-width: 1; stroke-dasharray: 2 2; }
.jm-pin__s { font-size: 10.5px; font-weight: 700; fill: var(--ink-3); }
.jm-pin.is-danger .jm-pin__s, .jm-pin.is-danger .fm-pin__dot { fill: var(--danger); }
.jm-pin.is-warning .jm-pin__s, .jm-pin.is-warning .fm-pin__dot { fill: var(--warning); }
.jm-pin.is-up .jm-pin__s { fill: #4f7f0c; } .jm-pin.is-up .fm-pin__dot { fill: var(--lime-strong); }
.jm-pin.is-idle .fm-pin__dot { fill: var(--ink-4); }
.jm-ll text, .jm-hook__t { paint-order: stroke; stroke: #ffffff; stroke-width: 3.2px; stroke-linejoin: round; }
.jm-ll__n { font: 750 12px/1 var(--font-stack); fill: var(--ink-1); font-variant-numeric: tabular-nums; }
.jm-ll__w { font: 550 10.5px/1 var(--font-stack); fill: var(--ink-3); }
.jm-ll__x { font: 750 10.5px/1 var(--font-stack); fill: var(--ink-2); }
.jm-ll__q { font: 600 10.5px/1 var(--font-stack); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.jm-ll__g { font: 700 10.5px/1 var(--font-stack); fill: #4f7f0c; }
.jm-ll.is-danger .jm-ll__n, .jm-ll.is-danger .jm-ll__x { fill: var(--danger); }
.jm-ll.is-warning .jm-ll__n, .jm-ll.is-warning .jm-ll__x { fill: var(--warning); }
.jm-ll.is-up .jm-ll__x { fill: #4f7f0c; }
.jm-hook { fill: none; stroke: #7fae1f; stroke-width: 1.8; stroke-dasharray: 4 3; stroke-linecap: round; }
.jm-hook__head { fill: #7fae1f; }
.jm-hook__t { font: 750 10.5px/1 var(--font-stack); fill: #4f7f0c; }
.jm-after { fill: rgb(240 138 36 / .04); stroke: #e8ae6e; stroke-width: 1.2; stroke-dasharray: 6 5; }
.jm-paint { font: 800 8.5px/1 var(--font-stack); letter-spacing: .12em; }
.jm-paint.is-after { fill: #d18e45; }
/* what stands at each place */
.jm-plinth.fm-vt { fill: #f4f6f9; } .jm-plinth.fm-vl { fill: #dfe4eb; } .jm-plinth.fm-vr { fill: #c9d1dc; }
.jm-phone.fm-vt { fill: #464d59; } .jm-phone.fm-vl { fill: #343a44; } .jm-phone.fm-vr { fill: #272c34; }
.jm-screen { fill: #ffffff; }
.jm-ad-who { fill: var(--lime); }
.jm-ad-line { fill: #cdd3dc; }
.jm-ad-pic { fill: #e7edf5; }
.jm-tee.is-a { fill: #3e4766; } .jm-tee.is-b { fill: #cfc4ad; } .jm-tee.is-c { fill: #93a06b; }
.jm-tee-neck { fill: rgb(18 20 24 / .22); }
.jm-ad-cta { fill: var(--lime); }
.jm-ad-next { fill: #eef2f6; }
.jm-glass { fill: #9cbcf2; opacity: .85; }
.jm-glass.is-door { fill: #c3d6f6; opacity: 1; }
.jm-mullion { stroke: #ffffff; stroke-width: 1.1; }
.jm-awning { fill: var(--lime); }
.jm-awning.is-edge { fill: #a9d34f; }
.jm-post.fm-vt, .jm-post.fm-vl { fill: #8f99a7; } .jm-post.fm-vr { fill: #737d8b; }
.jm-board.fm-vt { fill: #464d59; } .jm-board.fm-vl { fill: #2f343d; } .jm-board.fm-vr { fill: #252a31; }
.jm-pic { fill: var(--lime); }
.jm-pic-ink { fill: #ffffff; }
.jm-pic-dark { fill: #2f343d; }
.jm-canopy.fm-vt { fill: #ffffff; } .jm-canopy.fm-vl { fill: #e4e9f1; } .jm-canopy.fm-vr { fill: #cfd7e3; }
.jm-arrow { fill: #ffffff; stroke: #aab3bf; stroke-width: .8; }
.jm-node.is-up .fm-zone { fill: rgb(178 224 74 / .16); stroke: rgb(120 170 30 / .55); stroke-width: 1.2; stroke-dasharray: 5 4; }
.fm-tip__state.is-up i { background: var(--lime-strong); }

/* ---- Sales funnel screen and its dashboard cards (funnel.html) ------------------ */
.fu-lead { font: 550 13px/1.45 var(--font-stack); color: var(--ink-3); margin: 0; }
.fu-main { font: 700 16px/1.4 var(--font-stack); color: var(--ink); margin: 2px 0 0; }
.dx-card--ink .fu-lead { color: rgb(255 255 255 / .62); } .dx-card--ink .fu-main { color: #ffffff; }
.fu-head__go { align-self: flex-start; margin-top: 12px; }
.fu-sub { display: flex; align-items: baseline; gap: 6px; font: 650 10.5px/1 var(--font-stack); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 16px 2px 8px; }
.fu-sub span { letter-spacing: 0; text-transform: none; font-weight: 550; }
.fu-sub:first-child { margin-top: 2px; }
.fu-sub + .fu-list { margin-bottom: 14px; }
/* the way through, beside the map: one row per step */
.fu-way { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px 10px; border-radius: 18px; background: var(--glass, rgb(255 255 255 / .86)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 2px rgb(18 20 24 / .05), 0 8px 24px rgb(18 20 24 / .06); overflow-y: auto; }
.fu-way__h { display: flex; align-items: center; gap: 6px; font: 750 13px/1.2 var(--font-stack); color: var(--ink); margin: 0 6px 6px; }
.fu-way__h span { margin-left: auto; font: 550 11px/1.2 var(--font-stack); color: var(--ink-3); }
.fu-way__row, .fu-way__sum { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; column-gap: 9px; row-gap: 2px; align-items: center; padding: 8px 8px; border: 0; border-radius: 12px; background: none; text-align: left; font: inherit; }
.fu-way__row { cursor: pointer; }
.fu-way__row:hover, .fu-way__row:focus-visible { background: var(--card-2); outline: none; }
.fu-way__row.is-danger, .fu-way__row.is-warning { background: rgb(224 87 76 / .07); }
.fu-way__row.is-warning { background: rgb(232 169 58 / .09); }
.fu-way__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.fu-way__row.is-danger .fu-way__dot { background: var(--danger); } .fu-way__row.is-warning .fu-way__dot { background: var(--warning); }
.fu-way__row.is-up .fu-way__dot { background: var(--lime-strong); } .fu-way__row.is-idle .fu-way__dot { background: var(--ink-4); }
.fu-way__name { font: 650 12.5px/1.25 var(--font-stack); color: var(--ink-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-way__n { font: 750 15px/1.1 var(--font-stack); color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.fu-way__sub { grid-column: 2; font: 550 11px/1.3 var(--font-stack); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-way__x { grid-column: 3; font: 750 11px/1.3 var(--font-stack); font-style: normal; text-align: right; white-space: nowrap; }
.fu-way__row.is-danger .fu-way__x { color: var(--danger); } .fu-way__row.is-warning .fu-way__x { color: var(--warning-ink); } .fu-way__row.is-up .fu-way__x { color: #4f7f0c; }
.fu-way__sum { margin: 4px 0 2px; border-top: 1px solid var(--line-1); border-radius: 0; padding-top: 10px; }
.fu-way--card { position: absolute; z-index: 2; top: 12px; right: 12px; bottom: 12px; width: 312px; padding: 10px 8px 8px; }
.fu-way--card .fu-way__row, .fu-way--card .fu-way__sum { padding: 6px 8px; }
.fu-way__sum .fu-way__name { grid-column: 2; }
/* Google's lane on the Sales funnel: the same rows, read only */
.fu-glane { display: flex; flex-direction: column; gap: 2px; }
.fu-glane .fu-way__row { cursor: default; }
.fu-glane .fu-way__row:hover { background: none; }
/* why ad orders moved: each part's orders, out from the middle line */
.fu-why { display: flex; flex-direction: column; gap: 4px; }
.fu-why__row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 46px; align-items: center; gap: 12px; padding: 6px 4px; }
.fu-why__name { font: 650 12.5px/1.25 var(--font-stack); color: var(--ink-1); min-width: 0; }
.fu-why__name small { display: block; font: 550 11px/1.3 var(--font-stack); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-why__track { position: relative; display: block; height: 14px; }
.fu-why__track::before { content: ""; position: absolute; left: 50%; top: -6px; bottom: -6px; width: 1px; background: var(--line-1); }
.fu-why__track s { position: absolute; top: 2px; height: 10px; border-radius: 4px; background: var(--ink-3); text-decoration: none; }
.fu-why__row.is-buy .fu-why__track s { background: var(--ink-2); }
.fu-why__row.is-held .fu-why__track s { background: var(--ink-4); }
.fu-why__row.is-loss .fu-why__track s { background: var(--danger); }
.fu-why__row.is-gain .fu-why__track s { background: var(--lime-strong); }
.fu-why__v { font: 750 13px/1 var(--font-stack); color: var(--ink-1); text-align: right; font-variant-numeric: tabular-nums; }
.fu-why__row.is-loss .fu-why__v { color: var(--danger); } .fu-why__row.is-gain .fu-why__v { color: #4f7f0c; }
.fu-why__row.is-loss { background: rgb(224 87 76 / .06); border-radius: 12px; }
.fu-why__axis { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 46px; gap: 12px; padding: 2px 4px 0; font: 550 10.5px/1 var(--font-stack); color: var(--ink-3); }
.fu-why__ax { grid-column: 2; display: flex; justify-content: space-between; }
/* fix the leak */
.fu-fix__lead { margin: 0 2px 4px; font: 650 13px/1.45 var(--font-stack); color: var(--ink-1); }
.fu-fix__wait { font: 550 12px/1.4 var(--font-stack); color: var(--ink-3); padding: 2px 2px 4px; }
.fu-fix__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fu-fix__list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; padding: 8px 10px; border-radius: 12px; background: var(--card-2); color: inherit; text-decoration: none; }
.fu-fix__list a:hover, .fu-fix__list a:focus-visible { background: var(--line-2); outline: none; }
.fu-fix__list b { font: 650 12.5px/1.3 var(--font-stack); color: var(--ink-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-fix__list span { grid-column: 1; font: 550 11px/1.3 var(--font-stack); color: var(--ink-3); }
.fu-fix__list em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font: 750 12.5px/1 var(--font-stack); font-style: normal; color: var(--danger); white-space: nowrap; }
.fu-fix__checks { margin: 0 0 12px; padding: 0 0 0 20px; }
.fu-fix__go { align-self: flex-start; }
.fu-fix__checks li { font: 550 12.5px/1.5 var(--font-stack); color: var(--ink-2); padding: 2px 0; }
.fu-days { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: 84px auto; gap: 4px 8px; }
.fu-days__y { display: flex; flex-direction: column; justify-content: space-between; font: 600 10.5px/1 var(--font-stack); color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.fu-days__svg { width: 100%; height: 84px; display: block; overflow: visible; border-bottom: 1px solid var(--line-1); }
.fu-days__svg polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fu-days__svg .is-prev { stroke: var(--ink-4); }
.fu-days__svg .is-now { stroke: var(--danger); }
.fu-days__split { stroke: var(--line-1); stroke-width: 1; stroke-dasharray: 3 3; }
.fu-days__x { grid-column: 2; display: flex; justify-content: space-between; font: 550 10.5px/1 var(--font-stack); color: var(--ink-3); }
.fu-kept { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.fu-kept b { font: 750 30px/1 var(--font-stack); color: var(--ink); font-variant-numeric: tabular-nums; }
.fu-kept span { font: 550 12px/1.35 var(--font-stack); color: var(--ink-3); }
.fu-out { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.fu-out b { font: 650 12.5px/1.3 var(--font-stack); color: var(--ink-1); }
.fu-out em { font: 750 13px/1.3 var(--font-stack); font-style: normal; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.fu-out > span { grid-column: 1 / -1; font: 500 11.5px/1.4 var(--font-stack); color: var(--ink-3); }
.fu-out.is-warning em { color: var(--warning-ink); } .fu-out.is-danger em { color: var(--danger); }
.fu-pair { display: grid; grid-template-columns: 64px minmax(0, 1fr) 46px; align-items: center; gap: 8px; margin-top: 6px; font: 600 11px/1 var(--font-stack); color: var(--ink-3); }
.fu-pair i { display: block; height: 7px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.fu-pair i s { display: block; height: 100%; border-radius: 4px; background: var(--ink); text-decoration: none; }
.fu-pair.is-cod i s { background: var(--warning); }
.fu-pair b { font: 700 11.5px/1 var(--font-stack); color: var(--ink-1); text-align: right; font-variant-numeric: tabular-nums; }
.fu-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.fu-grid th { font: 650 10.5px/1.2 var(--font-stack); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); text-align: center; padding: 2px 4px; }
.fu-grid th[scope="row"] { text-align: left; text-transform: none; letter-spacing: 0; font: 650 12.5px/1.25 var(--font-stack); color: var(--ink-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-grid th[scope="row"] small { display: block; font: 500 10.5px/1.2 var(--font-stack); color: var(--ink-3); }
.fu-grid td { height: 44px; padding: 4px 6px; border-radius: 10px; background: var(--card-2); text-align: center; vertical-align: middle; font: 700 13px/1.15 var(--font-stack); color: var(--ink-1); font-variant-numeric: tabular-nums; }
.fu-grid td small { display: block; font: 600 10.5px/1.2 var(--font-stack); color: var(--ink-3); }
.fu-grid td.is-down { background: rgb(224 87 76 / .12); } .fu-grid td.is-down small { color: var(--danger); }
.fu-grid td.is-up { background: rgb(178 224 74 / .22); } .fu-grid td.is-up small { color: #4f7f0c; }
.fu-grid td.is-few { color: var(--ink-3); }
.fu-grid td.is-empty { background: transparent; color: var(--ink-3); font-weight: 500; }
.fu-grid td.is-out { box-shadow: inset 0 0 0 1.5px var(--danger); }
.fu-grid td.is-low { box-shadow: inset 0 0 0 1.5px var(--warning); }
.fu-grid td.is-total { background: transparent; border: 1px solid var(--line-1); }
.fu-list { display: flex; flex-direction: column; gap: 6px; }
.fu-li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 10px; border-radius: 12px; background: var(--card-2); }
.fu-li b { font: 650 12.5px/1.3 var(--font-stack); color: var(--ink-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-li em { font: 750 12.5px/1.3 var(--font-stack); font-style: normal; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fu-li span { grid-column: 1 / -1; font: 500 11px/1.35 var(--font-stack); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-li.is-down em { color: var(--danger); } .fu-li.is-up em { color: #4f7f0c; }
.fu-li.is-out span, .fu-li.is-low span { color: var(--warning-ink); }
.fu-table { width: 100%; border-collapse: collapse; }
.fu-table th { font: 650 10.5px/1.2 var(--font-stack); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-1); }
.fu-table td { font: 550 12.5px/1.3 var(--font-stack); color: var(--ink-1); padding: 9px 10px; border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.fu-table .is-num { text-align: right; }
.fu-table tr:hover td { background: var(--card-2); }
.fu-chg.is-down { color: var(--danger); font-weight: 700; } .fu-chg.is-up { color: #4f7f0c; font-weight: 700; }

/* ---- Ad engine (adengine.html, js/adengine.js) ----------------------------------
   Status colours carry the calls and the problems only; ink is the action. */
.ae-live { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 14px; }
.ae-live__age { font: 550 11.5px/1 var(--font-stack); color: var(--ink-3); }
.ae-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ae-tabs::-webkit-scrollbar { display: none; }
#ae-notices .notice { margin-bottom: 12px; }
.ae-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; margin-bottom: 14px; align-items: stretch; }
.ae-hero .dx-stats { margin: 0; }
.ae-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.ae-cols--budget { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
/* four tiles with their 14 days along the foot (Ad engine, Sales funnel): the
   note full width, this week's seven bars dark */
.ae-stats .dx-stat, .dx-stats--foot .dx-stat { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; }
.ae-stats .dx-stat__note, .dx-stats--foot .dx-stat__note { grid-column: 1; }
.ae-stats .dx-stat__bars, .dx-stats--foot .dx-stat__bars { grid-column: 1; grid-row: 4; align-self: end; width: 100%; height: 38px; margin-top: 10px; justify-content: space-between; }
.ae-stats .dx-stat__bars i, .dx-stats--foot .dx-stat__bars i { flex: 0 1 4px; }
.ae-cols .dx-card, .ae-hero .dx-card, .ae-trend, .ae-works, .ae-ideas, .ae-setup, .ae-none { min-height: 0; }
.ae-trend, .ae-works, .ae-ideas, .ae-setup { margin-bottom: 14px; }
.ae-sub { font: 650 10.5px/1 var(--font-stack); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 14px 2px 8px; }
.ae-hint { font: 500 12px/1.45 var(--font-stack); color: var(--ink-3); margin: 8px 0 0; }
.ae-ok { font: 650 13px/1.4 var(--font-stack); color: var(--success-ink); padding: 6px 0; }
.ae-dim { color: var(--ink-3); }
.ae-scroll { overflow-x: auto; }

/* the call */
.ae-call__word { display: flex; align-items: center; gap: 10px; font: 750 30px/1.1 var(--font-stack); letter-spacing: -.02em; color: #fff; margin-top: 2px; }
.ae-call__word i { width: 12px; height: 12px; border-radius: 50%; background: rgb(255 255 255 / .4); }
.ae-call__word.is-scale i { background: color-mix(in srgb, var(--success) 70%, #fff); box-shadow: 0 0 0 5px rgb(255 255 255 / .08); }
.ae-call__word.is-hold i { background: color-mix(in srgb, var(--warning) 75%, #fff); box-shadow: 0 0 0 5px rgb(255 255 255 / .08); }
.ae-call__word.is-pull i { background: color-mix(in srgb, var(--danger) 75%, #fff); box-shadow: 0 0 0 5px rgb(255 255 255 / .08); }
.ae-call__why { font: 500 13.5px/1.55 var(--font-stack); color: rgb(255 255 255 / .82); margin: 8px 0 18px; }
.ae-call__be { font: 500 12.5px/1.5 var(--font-stack); color: rgb(255 255 255 / .72); margin: 12px 0 0; }
.ae-gauge { margin-top: auto; padding-top: 18px; }
.ae-gauge__bar { position: relative; height: 10px; border-radius: 5px; background: rgb(255 255 255 / .08); }
.ae-gauge__bar > span { position: absolute; top: 0; bottom: 0; }
.ae-gauge__bar > span:first-child { border-radius: 5px 0 0 5px; } .ae-gauge__bar > span:nth-child(4) { border-radius: 0 5px 5px 0; }
.ae-gauge__bar .is-loss { background: color-mix(in srgb, var(--danger) 55%, transparent); }
.ae-gauge__bar .is-pull { background: color-mix(in srgb, var(--warning) 55%, transparent); }
.ae-gauge__bar .is-hold { background: rgb(255 255 255 / .16); }
.ae-gauge__bar .is-scale { background: color-mix(in srgb, var(--success) 60%, transparent); }
.ae-gauge__at { position: absolute; top: -5px; width: 3px; height: 20px; border-radius: 2px; background: #fff; transform: translateX(-50%); }
.ae-gauge__at em { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); font: 750 12px/1 var(--font-stack); font-style: normal; color: var(--ink); background: #fff; padding: 3px 7px; border-radius: 7px; white-space: nowrap; }
.ae-gauge__ticks { position: relative; height: 20px; }
.ae-gauge__ticks span { position: absolute; top: 7px; transform: translateX(-50%); font: 700 11px/1 var(--font-stack); color: rgb(255 255 255 / .75); white-space: nowrap; }
.ae-gauge__key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font: 550 11px/1.2 var(--font-stack); color: rgb(255 255 255 / .6); }
.ae-gauge__key i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: -0.5px; }
.ae-gauge__key .is-loss i { background: color-mix(in srgb, var(--danger) 55%, transparent); }
.ae-gauge__key .is-pull i { background: color-mix(in srgb, var(--warning) 55%, transparent); }
.ae-gauge__key .is-hold i { background: rgb(255 255 255 / .16); }
.ae-gauge__key .is-scale i { background: color-mix(in srgb, var(--success) 60%, transparent); }

/* the brief */
.ae-brief__head { font: 700 15px/1.4 var(--font-stack); color: var(--ink); margin: 0 0 4px; }
.ae-brief__read { font: 500 13px/1.55 var(--font-stack); color: var(--ink-2); margin: 0 0 12px; }
.ae-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ae-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card-2); }
.ae-step__n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 750 12px/1 var(--font-stack); }
.ae-step.is-done .ae-step__n { background: var(--success); } .ae-step.is-skipped .ae-step__n { background: var(--ink-4); }
.ae-step.is-done .ae-step__tgt, .ae-step.is-skipped .ae-step__tgt { color: var(--ink-3); text-decoration: line-through; }
.ae-step__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.ae-step__tgt { font: 700 13.5px/1.35 var(--font-stack); color: var(--ink); overflow-wrap: anywhere; }
.ae-step__mark { font: 600 11.5px/1 var(--font-stack); color: var(--ink-3); }
.ae-step__why { font: 500 12.5px/1.5 var(--font-stack); color: var(--ink-2); margin: 4px 0 0; }
.ae-step__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.ae-quiet { color: var(--ink-3); }
.ae-step__exec { margin-top: 8px; } .ae-step__exec:empty { display: none; }
.ae-exec { border: 1px solid var(--line-1); background: var(--card); border-radius: 12px; padding: 10px 12px; }
.ae-exec__sum { font: 650 13px/1.45 var(--font-stack); color: var(--ink); }
.ae-exec__ops { margin: 6px 0 0; padding-left: 18px; font: 500 12.5px/1.6 var(--font-stack); color: var(--ink-2); }
.ae-exec__note { font: 500 11.5px/1.45 var(--font-stack); color: var(--ink-3); margin-top: 6px; }
.ae-exec__btns { display: flex; gap: 6px; margin-top: 8px; }
.ae-notes { margin-top: 12px; }
.ae-notes summary { cursor: pointer; font: 650 12px/1.4 var(--font-stack); color: var(--ink-3); }
.ae-notes__l { margin: 6px 0 0; padding-left: 18px; font: 500 12.5px/1.5 var(--font-stack); color: var(--ink-2); }
.ae-notes__l.is-warn li::marker { color: var(--warning-ink); }

/* where ads lose orders */
.ae-need { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ae-need__i { display: grid; grid-template-columns: 40px minmax(0, 1fr) 28px; gap: 10px; align-items: start; padding: 10px; border-radius: 14px; background: var(--card-2); border-left: 3px solid transparent; }
.ae-need__i.is-danger { border-left-color: var(--danger); } .ae-need__i.is-warning { border-left-color: var(--warning); } .ae-need__i.is-info { border-left-color: var(--info); }
.ae-need__name { font: 700 13px/1.3 var(--font-stack); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-need__what { font: 500 12.5px/1.45 var(--font-stack); color: var(--ink-2); margin-top: 2px; }
.ae-need__what b { font-weight: 700; color: var(--ink); margin-right: 5px; }
.ae-need__what i, .ae-cr__issues i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); margin-right: 6px; vertical-align: 1px; }
.is-danger > .ae-need__txt i, .ae-cr__issues .is-danger i { background: var(--danger); }
.is-warning > .ae-need__txt i, .ae-cr__issues .is-warning i { background: var(--warning); }
.is-info > .ae-need__txt i, .ae-cr__issues .is-info i { background: var(--info); }
.ae-cr__issues .is-success i { background: var(--success); }
.ae-need__check { font: 500 11.5px/1.4 var(--font-stack); color: var(--ink-3); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ae-go { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-1); background: var(--card); color: var(--ink); font: 700 14px/1 var(--font-stack); cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s; }
.ae-go:hover { background: var(--ink); color: var(--lime); }
.ae-more { margin-top: 8px; align-self: flex-start; }
.ae-earn { display: flex; flex-wrap: wrap; gap: 8px; }
.ae-earn__c { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 0; border-radius: 12px; background: var(--success-soft); text-align: left; cursor: pointer; max-width: 100%; }
.ae-earn__c span { min-width: 0; }
.ae-earn__c b { display: block; font: 700 12.5px/1.3 var(--font-stack); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-earn__c small { display: block; font: 550 11.5px/1.3 var(--font-stack); color: var(--ink-2); }

/* pictures */
.ae-thumb { flex: none; width: 64px; height: 80px; border-radius: 12px; overflow: hidden; background: var(--card-2); display: grid; place-items: center; font: 750 20px/1 var(--font-stack); color: var(--ink-3); }
.ae-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ae-thumb.is-sm { width: 40px; height: 50px; border-radius: 10px; font-size: 15px; }
.ae-thumb.is-xs { width: 32px; height: 40px; border-radius: 8px; font-size: 13px; }

/* creatives */
.ae-crs__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.ae-h2 { font: 750 18px/1.2 var(--font-stack); letter-spacing: -.01em; color: var(--ink); margin: 0; }
.ae-crs__meta { font: 550 12px/1.2 var(--font-stack); color: var(--ink-3); }
.ae-filter small { font: 650 10.5px/1 var(--font-stack); opacity: .7; margin-left: 2px; }
.ae-filter button:disabled { opacity: .4; cursor: default; }
.ae-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
.ae-cr { background: var(--card); border-radius: 20px; box-shadow: var(--sh-card); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; border-top: 3px solid transparent; scroll-margin-top: 16px; transition: box-shadow .3s; }
.ae-cr.is-danger { border-top-color: var(--danger); } .ae-cr.is-warning { border-top-color: var(--warning); }
.ae-cr.is-flash { box-shadow: 0 0 0 3px var(--lime), var(--sh-lift); }
.ae-cr__head { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; align-items: start; }
.ae-cr__head .ae-thumb { grid-row: span 2; }
.ae-cr__title h3 { font: 700 14px/1.3 var(--font-stack); color: var(--ink); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ae-cr__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.ae-cr__tags span { font: 600 11px/1 var(--font-stack); color: var(--ink-3); background: var(--card-2); padding: 4px 7px; border-radius: 999px; }
.ae-cr__tags .is-dim { background: transparent; padding-left: 2px; }
.ae-cr__call { grid-column: 2; justify-self: start; margin-top: 7px; white-space: normal; }
.ae-cr__nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ae-cr__nums > div { background: var(--card-2); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.ae-cr__nums span { display: block; font: 600 11px/1.2 var(--font-stack); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ae-cr__nums b { display: block; font: 750 17px/1.2 var(--font-stack); color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 3px; white-space: nowrap; }
.ae-cr__nums b.is-over { color: var(--danger); }
.ae-cr__nums small { display: block; font: 550 11px/1.2 var(--font-stack); color: var(--ink-3); margin-top: 1px; }
.ae-bar { display: block; position: relative; height: 6px; border-radius: 3px; background: var(--line-1); margin-top: 7px; }
.ae-bar s { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ink-2); text-decoration: none; }
.ae-bar s.is-over { background: var(--danger); }
.ae-bar u { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--ink); }
.ae-road { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.ae-road__s { background: var(--card-2); border-radius: 10px; padding: 6px 4px 5px; text-align: center; min-width: 0; }
.ae-road__s em { display: block; font: 600 10.5px/1.2 var(--font-stack); font-style: normal; color: var(--ink-3); }
.ae-road__s b { display: block; font: 750 13px/1.3 var(--font-stack); color: var(--ink); font-variant-numeric: tabular-nums; }
.ae-road__s.is-weak { background: var(--danger-soft); } .ae-road__s.is-weak b { color: var(--danger); }
.ae-road__s.is-strong { background: var(--success-soft); } .ae-road__s.is-strong b { color: var(--success-ink); }
.ae-road__s.is-none { opacity: .55; }
.ae-road__s small { display: block; font: 600 10px/1.2 var(--font-stack); color: var(--ink-3); white-space: nowrap; }
.ae-cr__issues { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ae-cr__issues li { font: 500 12.5px/1.45 var(--font-stack); color: var(--ink-2); }
.ae-cr__issues b { color: var(--ink); font-weight: 700; margin-right: 4px; }
.ae-cr__issues small { display: block; font: 500 11.5px/1.4 var(--font-stack); color: var(--ink-3); margin: 2px 0 0 13px; }
.ae-cr__facts { margin: 0; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.ae-cr__facts > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
.ae-cr__facts dt { font: 600 11px/1.5 var(--font-stack); color: var(--ink-3); }
.ae-cr__facts dd { margin: 0; font: 500 12px/1.5 var(--font-stack); color: var(--ink-2); min-width: 0; }
.ae-cr__facts b { color: var(--ink); font-weight: 700; }
.ae-cr__facts .is-over { color: var(--danger); font-weight: 700; }
.ae-sell { display: inline-block; margin-right: 10px; white-space: nowrap; }
.ae-sell.is-low { color: var(--warning-ink); } .ae-sell.is-out { color: var(--danger); }
.ae-w { display: inline-block; margin-right: 9px; font: 600 11.5px/1.5 var(--font-stack); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ae-w.is-bad { color: var(--danger); } .ae-w.is-good { color: var(--success-ink); } .ae-w.is-none { color: var(--ink-3); }
.ae-cr__idea { align-self: flex-start; }
.ae-empty { padding: 32px 12px; }

/* budget */
.ae-money__sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.ae-money__k { border-radius: 14px; padding: 10px 12px; background: var(--card-2); }
.ae-money__k b { display: block; font: 750 20px/1.2 var(--font-stack); color: var(--ink); font-variant-numeric: tabular-nums; }
.ae-money__k span { display: block; font: 550 12px/1.4 var(--font-stack); color: var(--ink-2); margin-top: 2px; }
.ae-money__k.is-danger b { color: var(--danger); } .ae-money__k.is-success b { color: var(--success-ink); }
.ae-chart { min-width: 0; }
.ae-scatter, .ae-line, .ae-spend { display: block; width: 100%; height: auto; overflow: visible; }
.ae-zone { fill: color-mix(in srgb, var(--danger) 5%, transparent); }
.ae-grid0 { stroke: var(--line-1); }
.ae-kill { stroke: var(--danger); stroke-width: 1.5; stroke-dasharray: 5 4; }
.ae-kill__t { font: 650 11px/1 var(--font-stack); fill: var(--danger); }
.ae-ax { font: 550 11px/1 var(--font-stack); fill: var(--ink-3); }
.ae-ax--t { fill: var(--ink-4); }
.ae-dot { cursor: pointer; outline: none; }
.ae-dot circle { stroke: #fff; stroke-width: 2; fill: var(--ink-4); transition: stroke .15s; }
.ae-dot.is-success circle { fill: var(--success); } .ae-dot.is-info circle { fill: var(--info); }
.ae-dot.is-warning circle { fill: var(--warning); } .ae-dot.is-danger circle { fill: var(--danger); }
.ae-dot:hover circle, .ae-dot:focus-visible circle { stroke: var(--ink); stroke-width: 2.5; }
.ae-dot text { font: 650 11px/1 var(--font-stack); fill: var(--ink-2); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.ae-dot__n { font: 750 10.5px/1 var(--font-stack); fill: #fff; pointer-events: none; }
.ae-dot__off { font: 700 11px/1 var(--font-stack); fill: var(--danger); }
.ae-named { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.ae-named button { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 8px; align-items: center; width: 100%; padding: 4px 6px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.ae-named button:hover { background: var(--card-2); }
.ae-named__n { grid-row: span 2; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 750 10.5px/1 var(--font-stack); color: #fff; background: var(--ink-4); }
.ae-named__n.is-success { background: var(--success); } .ae-named__n.is-info { background: var(--info); } .ae-named__n.is-warning { background: var(--warning); } .ae-named__n.is-danger { background: var(--danger); }
.ae-named b { font: 650 12.5px/1.3 var(--font-stack); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-named small { font: 550 11.5px/1.3 var(--font-stack); color: var(--ink-3); }
.ae-named .is-over { color: var(--danger); font-weight: 700; }
.ae-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; }
.ae-key { font: 600 11.5px/1 var(--font-stack); color: var(--ink-3); display: inline-flex; align-items: center; }
.ae-key i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-4); margin-right: 5px; }
.ae-key.is-success i { background: var(--success); } .ae-key.is-info i { background: var(--info); } .ae-key.is-warning i { background: var(--warning); }
.ae-key.is-danger i { background: var(--danger); } .ae-key.is-spend i { background: var(--ink-2); border-radius: 2px; } .ae-key.is-orders i { background: var(--info); border-radius: 2px; }
.ae-key.is-dim { color: var(--ink-3); }
.ae-key.is-kill i { width: 14px; height: 0; border-radius: 0; background: none; border-top: 2px dashed var(--danger); }
.ae-tbl { width: 100%; border-collapse: collapse; }
.ae-tbl th { font: 650 10.5px/1.2 var(--font-stack); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 8px; border-bottom: 1px solid var(--line-1); white-space: nowrap; }
.ae-tbl td { font: 550 12.5px/1.3 var(--font-stack); color: var(--ink-1); padding: 9px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.ae-tbl td b { font-weight: 700; color: var(--ink); }
.ae-tbl td small { display: block; font: 550 11px/1.3 var(--font-stack); color: var(--ink-3); margin-top: 2px; }
.ae-tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ae-tbl tr.is-off td { opacity: .55; }
.ae-tbl--sets td:first-child { min-width: 120px; }
.ae-tbl--costs { max-width: 760px; }
.ae-sh { min-width: 110px; }
.ae-sh b { display: block; font-variant-numeric: tabular-nums; }
.ae-sh .ae-share { margin: 5px 0 3px; max-width: 160px; }
.ae-share { display: block; height: 6px; border-radius: 3px; background: var(--line-2); margin: 2px 0; overflow: hidden; }
.ae-share s { display: block; height: 100%; border-radius: 3px; text-decoration: none; }
.ae-share.is-spend s { background: var(--ink-2); } .ae-share.is-orders s { background: var(--info); }
.ae-cpo.is-danger { color: var(--danger); font-weight: 750; } .ae-cpo.is-success { color: var(--success-ink); font-weight: 750; }
.ae-tbl small.is-warn { color: var(--warning-ink); }
.ae-gate { stroke-width: 1.2; stroke-dasharray: 4 4; }
.ae-gate.is-scale { stroke: var(--success); } .ae-gate.is-pull { stroke: var(--warning); } .ae-gate.is-loss { stroke: var(--danger); }
.ae-gate__t { font: 650 10.5px/1 var(--font-stack); }
.ae-gate__t.is-scale { fill: var(--success); } .ae-gate__t.is-pull { fill: var(--warning); } .ae-gate__t.is-loss { fill: var(--danger); }
.ae-merl { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ae-merd { fill: var(--ink); } .ae-dayd { fill: var(--ink-4); opacity: .6; }
.ae-now { font: 750 11.5px/1 var(--font-stack); fill: var(--ink); }
.ae-keys--trend { margin: 6px 0 0; }
.ae-key.is-line i { width: 14px; height: 3px; border-radius: 2px; background: var(--ink); }
.ae-key.is-day i { width: 6px; height: 6px; background: var(--ink-4); opacity: .6; }
.ae-sbar { fill: var(--ink-3); } .ae-sbar.is-prov { fill: var(--ink-4); opacity: .5; }

/* make next */
.ae-works__g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ae-works__g .ae-sub { margin-top: 2px; }
.ae-dims { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.ae-dims li { display: grid; grid-template-columns: minmax(80px, 130px) minmax(0, 1fr) 62px; gap: 2px 10px; align-items: center; }
.ae-dims__l { font: 650 12.5px/1.3 var(--font-stack); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-dims__b { display: block; position: relative; height: 10px; border-radius: 5px; background: var(--card-2); }
.ae-dims__b s { display: block; height: 100%; border-radius: 5px; text-decoration: none; }
.ae-dims__b s.is-success { background: var(--success); } .ae-dims__b s.is-info { background: var(--info); } .ae-dims__b s.is-danger { background: var(--danger); }
.ae-dims__b u { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--ink); }
.ae-dims li b { font: 750 13px/1 var(--font-stack); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.ae-dims li small { grid-column: 2 / -1; font: 550 11px/1.3 var(--font-stack); color: var(--ink-3); }
.ae-names { list-style: none; padding: 0; margin: 0; }
.ae-names li { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.ae-names b { font: 650 12.5px/1.35 var(--font-stack); color: var(--ink); overflow-wrap: anywhere; }
.ae-names span { font: 500 11.5px/1.35 var(--font-stack); color: var(--ink-3); }
.ae-ideas__g { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.ae-idea { border: 1px solid var(--line-1); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: var(--card); min-width: 0; }
.ae-idea__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ae-idea__head h3 { font: 700 14.5px/1.35 var(--font-stack); color: var(--ink); margin: 0; overflow-wrap: anywhere; }
.ae-idea__kind { font: 550 11.5px/1.35 var(--font-stack); color: var(--ink-3); margin-top: 2px; }
.ae-idea__for { font: 500 12px/1.45 var(--font-stack); color: var(--ink-2); margin: 2px 0 4px; }
.ae-idea .ae-sub { margin: 10px 0 4px; }
.ae-idea__hook { font: 650 13px/1.5 var(--font-stack); color: var(--ink); margin: 0; }
.ae-idea__beats, .ae-idea__prod ul { margin: 0; padding-left: 18px; font: 500 12.5px/1.55 var(--font-stack); color: var(--ink-2); }
.ae-idea__copy { font: 500 12.5px/1.55 var(--font-stack); color: var(--ink-2); }
.ae-idea__copy b { color: var(--ink); }
.ae-idea__copy p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ae-idea__why { font: 500 12.5px/1.55 var(--font-stack); color: var(--ink-2); margin: 0; overflow-wrap: anywhere; }
.ae-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ae-chips .chip3 { white-space: normal; }
.ae-idea__prod { margin-top: 8px; }
.ae-idea__prod summary { cursor: pointer; font: 650 12px/1.4 var(--font-stack); color: var(--ink-3); }
.ae-idea__prod p { font: 500 12.5px/1.55 var(--font-stack); color: var(--ink-2); margin: 6px 0 0; }
.ae-idea__ph { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.ae-idea__ph .ae-sub { margin: 0; }
.ae-pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; margin: 6px 0 0; padding: 10px 12px; background: var(--card-2); border-radius: 10px; font: 11.5px/1.5 ui-monospace, monospace; color: var(--ink-1); }
.ae-idea__test { font: 500 12px/1.5 var(--font-stack); color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 8px; margin: 8px 0 0; }
.ae-idea__btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ae-idea-line { font: 500 12.5px/1.5 var(--font-stack); color: var(--ink-3); padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
/* ideas in two sections (20261103b): the reviewer's verdict, AI-ready scenes, the Real shoot brief */
.ae-ideas__sum { margin: 0 0 12px; }
.ae-rev { border-radius: 10px; padding: 8px 10px; font: 500 12px/1.45 var(--font-stack); display: flex; flex-direction: column; gap: 2px; margin: 2px 0 2px; }
.ae-rev b { font-weight: 700; }
.ae-rev span { color: var(--ink-2); overflow-wrap: anywhere; }
.ae-rev ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); }
.ae-rev li { overflow-wrap: anywhere; }
.ae-rev small { color: var(--ink-3); font-size: 11px; }
.ae-rev.is-ok { background: var(--success-soft); } .ae-rev.is-ok b { color: var(--success-ink); }
.ae-rev.is-wait { background: var(--warning-soft); } .ae-rev.is-wait b { color: var(--warning-ink); }
.ae-rev.is-info { background: var(--info-soft); } .ae-rev.is-info b { color: var(--info); }
.ae-idea__rw { font: 500 11.5px/1.4 var(--font-stack); color: var(--ink-3); margin: 0; }
.ae-idea__sec { border-top: 1px solid var(--line-2); margin-top: 8px; padding-top: 8px; }
.ae-idea__sec summary { cursor: pointer; font: 650 12.5px/1.4 var(--font-stack); color: var(--ink-1); }
.ae-idea__sec[open] summary { margin-bottom: 6px; }
.ae-idea__meta { font: 500 12px/1.5 var(--font-stack); color: var(--ink-2); margin: 3px 0 0; overflow-wrap: anywhere; }
.ae-idea__meta b { font-weight: 650; color: var(--ink-1); margin-right: 4px; }
.ae-scenes { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ae-scene { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; align-items: start; }
.ae-scene__t { font: 650 11px/1.6 var(--font-stack); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ae-scene__b { min-width: 0; font: 500 12px/1.5 var(--font-stack); color: var(--ink-2); }
.ae-scene__b p { margin: 0; overflow-wrap: anywhere; }
.ae-scene__text { display: flex; flex-direction: column; margin-bottom: 2px; }
.ae-scene__text b { font: 700 12.5px/1.45 var(--font-stack); color: var(--ink); overflow-wrap: anywhere; }
.ae-scene__mo { color: var(--ink-3); font-size: 11.5px; }
.ae-scene__ph { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ae-scene__ph img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line-1); }
.ae-scene__pn { font: 650 11px/1 var(--font-stack); color: var(--ink-2); background: var(--card-2); border-radius: 6px; padding: 5px 6px; }
.ae-idea__notes { margin: 6px 0 0; padding-left: 18px; font: 500 11.5px/1.5 var(--font-stack); color: var(--ink-3); }
.ae-idea__task { text-decoration: none; align-self: center; }
.ae-tok { background: var(--card-2); border: 1px dashed var(--border-strong); border-radius: 4px; padding: 0 3px; font-weight: inherit; white-space: nowrap; }
.ae-hist summary { cursor: pointer; font: 650 12px/1.4 var(--font-stack); color: var(--ink-3); margin: 12px 0 10px; }

/* setup */
.ae-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 550 12.5px/1.4 var(--font-stack); color: var(--ink-1); margin: 6px 0; }
.ae-row--sep { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.ae-in { flex: 1 1 260px; min-width: 0; height: 34px; padding: 0 12px; border: 1px solid var(--line-1); border-radius: 10px; font: 500 12.5px/1 var(--font-stack); background: var(--card); color: var(--ink); }
#ae-result .notice { margin-top: 8px; }

/* brand kit (Setup; js/brandkit.js) */
.bk.is-flash { box-shadow: 0 0 0 3px var(--lime), var(--sh-lift); }
.bk-cov { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 6px 28px; margin-top: 2px; }
.bk-cov__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.bk-cov__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font: 550 12.5px/1.3 var(--font-stack); color: var(--ink-1); }
.bk-cov__row b { min-width: 112px; font-weight: 650; color: var(--ink); }
.bk-sw { width: 14px; height: 14px; border-radius: 4px; flex: none; box-shadow: inset 0 0 0 1px rgb(18 20 24 / .14); }
.bk-pk { flex: none; min-width: 26px; height: 18px; padding: 0 5px; border-radius: 5px; background: var(--card-2); font: 700 10.5px/18px var(--font-stack); font-style: normal; color: var(--ink-2); text-align: center; }
.bk-up { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.bk-f { display: flex; flex-direction: column; gap: 5px; font: 650 10.5px/1.2 var(--font-stack); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.bk-f .ae-in { flex: none; width: 196px; text-transform: none; letter-spacing: 0; }
.bk-chk { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; font: 550 12.5px/1.3 var(--font-stack); color: var(--ink-1); }
.bk #bk-status .notice { margin-top: 8px; }
.bk-seg { margin-left: auto; }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; align-items: start; margin-top: 8px; }
.bk-item { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line-1); border-radius: 14px; overflow: hidden; background: var(--card); }
.bk-item.is-off { opacity: .62; }
.bk-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--card-2); }
.bk-thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.bk-thumb.is-clear { background: repeating-conic-gradient(var(--card-2) 0 25%, var(--card) 0 50%) 0 0 / 16px 16px; }
.bk-thumb__none { font: 700 18px/1 var(--font-stack); color: var(--ink-3); }
.bk-item__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px 12px 12px; }
.bk-item__label { font: 650 13px/1.35 var(--font-stack); color: var(--ink); overflow-wrap: anywhere; }
.bk-item__meta { font: 500 11.5px/1.4 var(--font-stack); color: var(--ink-3); overflow-wrap: anywhere; }
.bk-item__note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-item__btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bk-edit { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.bk-edit .ae-in { flex: none; width: 100%; }
.bk-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px 24px; margin-top: 4px; }
.bk-sec { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bk-sec__t { font: 650 10.5px/1.2 var(--font-stack); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.bk-sec ul { margin: 0; padding-left: 16px; font: 500 12.5px/1.5 var(--font-stack); color: var(--ink-2); }
.bk-sec li { overflow-wrap: anywhere; }
.bk-ta { flex: none; width: 100%; height: auto; min-height: 64px; padding: 8px 10px; font: 500 12.5px/1.5 var(--font-stack); resize: vertical; }
.bk-rules__btns { grid-column: 1 / -1; margin-top: 0; }

/* Google's view (Google Ad Engine Phase 4): its test, campaigns, search terms, products */
.ae-gtest .dx-card__body { display: flex; flex-direction: column; gap: 10px; }
.ae-gword { display: flex; align-items: center; gap: 10px; font: 750 26px/1.1 var(--font-stack); letter-spacing: -.02em; color: var(--ink); }
.ae-gword i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-4); }
.ae-gword.is-scale i { background: var(--success); }
.ae-gword.is-pull i { background: var(--danger); }
.ae-gwhy { font: 500 13px/1.5 var(--font-stack); color: var(--ink-2); margin: 0; }
.ae-gmeters { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.ae-gtest .ae-hint { margin: 0; }
.ae-need__i.is-text { grid-template-columns: minmax(0, 1fr); }
.ae-gcamps, .ae-gterms, .ae-gprods { margin-bottom: 14px; }
.ae-gnotes .ae-sub:first-child { margin-top: 0; }
.ae-tbl .is-over { color: var(--danger); font-weight: 700; }
.ae-tbl td > div .chip3 { margin: 4px 4px 0 0; }
.ae-tbl--g td:first-child { min-width: 170px; }
.ae-gprods > .dx-card__head { flex-wrap: wrap; }

@media (max-width: 1180px) {
  .ae-hero, .ae-cols, .ae-cols--budget, .ae-works__g { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ae-hero .dx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ae-hero .dx-stat:nth-child(3)::before { display: none; }
  .ae-grid, .ae-ideas__g { grid-template-columns: minmax(0, 1fr); }
  .ae-filter { max-width: 100%; overflow-x: auto; }
  .ae-money__sum { grid-template-columns: minmax(0, 1fr); }
  .ae-road__s em { font-size: 10px; }
  .ae-cr__facts > div { grid-template-columns: 84px minmax(0, 1fr); }
  .ae-call__word { font-size: 26px; }
  .ae-named { grid-template-columns: minmax(0, 1fr); }
  .bk-cov { grid-template-columns: minmax(0, 1fr); }
  .bk-f { flex: 1 1 150px; }
  .bk-f .ae-in { width: 100%; }
  .bk-seg { margin-left: 0; }
  .bk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bk-cov__row b { min-width: 0; }
  /* Google's tables keep the columns a decision needs on a phone. */
  .ae-tbl--g .is-wide { display: none; }
  .ae-tbl--g th, .ae-tbl--g td { padding-left: 6px; padding-right: 6px; }
  .ae-tbl--g th { white-space: normal; }
  .ae-tbl--g td:first-child { min-width: 116px; }
}

/* ---- Team pulse (admin) */
.tp { display: flex; flex-direction: column; gap: 9px; }
.tp-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.tp-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); font: 750 11px/1 var(--font-stack); color: var(--ink-2); }
.tp-av.is-away { opacity: .45; }
.tp-name { font: 600 12.5px/1.2 var(--font-stack); color: var(--ink-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-sub { font: 500 11px/1.3 var(--font-stack); color: var(--ink-3); }
.tp-score { font: 750 13px/1 var(--font-stack); color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.tp-score small { display: block; font: 600 10px/1.2 var(--font-stack); color: var(--ink-3); margin-top: 2px; }
.tp-bar { grid-column: 2 / -1; height: 5px; border-radius: 4px; background: var(--card-2); overflow: hidden; margin-top: -4px; }
.tp-bar i { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.tp-bar i.is-danger { background: var(--danger); }

/* ---- Responsive: no-scroll on a desktop screen, a calm column elsewhere ------- */
@media (max-width: 1180px), (max-height: 660px) {
  body.is-dash .main-wrap .content { overflow-y: auto; }
  .dx { height: auto; }
  .dx-board { grid-template-rows: none; grid-auto-rows: minmax(150px, auto); }
  .dx-board > .dx-card { grid-column: span 6 !important; grid-row: auto !important; min-height: 240px; }
  .dx-board > .dx-card--map { grid-column: 1 / -1 !important; min-height: 420px; }
  /* While a card loads it holds about the height it loads at, so the cards
     under it stay put (a phone's board jumped by most of a screen as each card
     filled in: frontend audit of 15 Nov 2026). The count cards keep the same
     rows every day; the coach is always taller than this, so whatever it adds
     lands below the first screen. */
  .dx-board > #c-coach:has(> .dx-card__body > .dx-skel) { min-height: 600px; }
  .dx-board > :is(#c-floor, #c-relay):has(> .dx-card__body > .dx-skel) { min-height: 468px; }
  .dx-board > #c-next:has(> .dx-card__body > .dx-skel) { min-height: 440px; }
  .dx-board > :is(#c-returns, #c-desk, #c-months):has(> .dx-card__body > .dx-skel) { min-height: 415px; }
  .dx-board > #c-drops:has(> .dx-card__body > .dx-skel) { min-height: 343px; }
}
@media (max-width: 1180px) { .dx-hero { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .dx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dx-stat:nth-child(3)::before { display: none; }
  .dx-board > .dx-card { grid-column: 1 / -1 !important; }
  .dx-board > .dx-card--map { min-height: 340px; }
  .dx-hello__h { font-size: 22px; }
}

/* ---- Flo, the coach (js/buddy.js) ----------------------------------------------
   A small character on every screen. Lime body, ink face; it bobs, blinks,
   talks, cheers (jump + arms up + confetti) and flies to the menu row where
   the work is. Drag it anywhere; it remembers. */
.buddy { position: fixed; right: 22px; bottom: 22px; z-index: 250; width: 64px; height: 64px; transition: transform .6s cubic-bezier(.34,1.56,.64,1); }
/* A sticky bar along the bottom (a form's Save, a bulk action) keeps its right end, where its main button sits,
   clear of Flo on a narrow screen: add .flo-clear to it (frontend audit of 15 Nov 2026). */
@media (max-width: 900px) { body:has(.buddy) .flo-clear { margin-right: 60px; } }
.buddy.is-dragging { transition: none; cursor: grabbing; }
.buddy.is-shy:not(.is-open):not(:hover) { opacity: .35; transform: scale(.78); transform-origin: 100% 100%; }
/* Stepped back, it lets clicks through: a dialog's button under it (Save as draft) stays usable. */
.buddy.is-shy:not(.is-open) { pointer-events: none; }
.buddy__me { position: relative; width: 64px; height: 64px; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; }
.buddy__me:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; border-radius: 22px; }
.buddy__count {
  position: absolute; top: -2px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box;
  display: grid; place-items: center; border-radius: 999px; background: var(--ink); color: var(--lime);
  font: 800 11px/1 var(--font-stack); box-shadow: 0 0 0 3px var(--canvas);
}
.buddy.is-asleep { position: fixed; right: 22px; bottom: 22px; z-index: 250; width: 46px; height: 46px; padding: 0; border: 0; background: none; cursor: pointer; opacity: .75; }
.buddy.is-asleep:hover { opacity: 1; }
.flo { width: 100%; height: 100%; overflow: visible; display: block; }
.flo__shadow { fill: rgb(18 20 24 / .16); transform-origin: 32px 60px; }
.flo__body { fill: var(--lime); stroke: var(--ink); stroke-width: 2.4; }
.flo__face { fill: var(--ink); }
.flo__eyes ellipse { fill: var(--lime); transform-box: fill-box; transform-origin: center; animation: flo-blink 4.8s infinite; }
.flo__mouth { fill: none; stroke: var(--lime); stroke-width: 2.2; stroke-linecap: round; transform-box: fill-box; transform-origin: center; }
.flo__cheek { fill: #f59a8c; opacity: .75; }
.flo__stalk { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.flo__bulb { fill: var(--ink); }
.flo__arm path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.flo__arm { transform-box: fill-box; }
.flo__arm--l { transform-origin: 100% 100%; } .flo__arm--r { transform-origin: 0% 100%; }
.flo__all { transform-origin: 32px 54px; animation: flo-bob 3.2s ease-in-out infinite; }
.flo.is-talk .flo__mouth { animation: flo-talk .5s ease-in-out 6; }
.flo.is-alert .flo__bulb { fill: var(--danger); animation: flo-glow 1.2s ease-in-out infinite; }
.flo.is-cheer .flo__all { animation: flo-jump .7s cubic-bezier(.34,1.56,.64,1) 3; }
.flo.is-cheer .flo__arm--l { animation: flo-wave-l .35s ease-in-out 6 alternate; }
.flo.is-cheer .flo__arm--r { animation: flo-wave-r .35s ease-in-out 6 alternate; }
.flo.is-cheer .flo__bulb { fill: var(--lime); stroke: var(--ink); stroke-width: 1.5; }
.flo.is-sleep .flo__eyes ellipse { animation: none; transform: scaleY(.15); }
.flo.is-sleep .flo__all { animation: flo-bob 6s ease-in-out infinite; }
@keyframes flo-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes flo-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes flo-talk { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.9); } }
@keyframes flo-glow { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes flo-jump { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-14px) scale(1.04, .96); } }
@keyframes flo-wave-l { from { transform: rotate(0deg); } to { transform: rotate(38deg); } }
@keyframes flo-wave-r { from { transform: rotate(0deg); } to { transform: rotate(-38deg); } }

.buddy__bubble {
  position: absolute; bottom: 74px; right: 0; width: 300px; box-sizing: border-box; padding: 14px 16px 12px;
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow-pop); color: var(--ink-2);
  font: 500 13.5px/1.45 var(--font-stack); animation: buddy-in .22s var(--ease);
}
.buddy__bubble::after { content: ''; position: absolute; right: 24px; bottom: -7px; width: 14px; height: 14px; background: var(--card); transform: rotate(45deg); border-radius: 3px; }
.buddy__bubble { left: 0; right: auto; } .buddy__bubble::after { left: 24px; right: auto; }
.buddy.is-east .buddy__bubble { left: auto; right: 0; } .buddy.is-east .buddy__bubble::after { left: auto; right: 24px; }
.buddy.is-below .buddy__bubble { bottom: auto; top: 74px; } .buddy.is-below .buddy__bubble::after { bottom: auto; top: -7px; }
.buddy__who { font: 750 12px/1.2 var(--font-stack); color: var(--ink); margin-bottom: 4px; }
.buddy__who span { font-weight: 500; color: var(--ink-3); }
.buddy__text { color: var(--ink); font-weight: 600; margin-bottom: 10px; }
.buddy__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.buddy__x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--card-2); color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1; }
.buddy__rest { display: block; margin: 10px 0 0; padding: 0; border: 0; background: none; color: var(--ink-3); font: 500 11.5px/1 var(--font-stack); cursor: pointer; }
.buddy__rest:hover { color: var(--ink-2); text-decoration: underline; }
.buddy__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.buddy__foot .buddy__rest { margin: 0; }
.buddy__ask { padding: 0; border: 0; background: none; color: var(--ink-1); font: 650 12px/1 var(--font-stack); cursor: pointer; }
.buddy__ask:hover { text-decoration: underline; }
@keyframes buddy-in { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
.buddy__confetti { position: absolute; left: 32px; top: 20px; pointer-events: none; }
.buddy__confetti i { position: absolute; width: 8px; height: 8px; border-radius: 2px; animation: qs-pop 1.2s var(--ease) forwards; }
.sidebar .nav-item.is-pointed { animation: nav-point .5s ease-in-out 4 alternate; }
@keyframes nav-point { to { background: rgb(200 242 109 / .32); color: #fff; } }
@media (max-width: 900px) { .sidebar.open ~ .buddy, body:has(.sidebar.open) .buddy { display: none; } }
@media (max-width: 760px) {
  .buddy { right: 14px; bottom: 14px; width: 54px; height: 54px; }
  .buddy__me { width: 54px; height: 54px; }
  .buddy__bubble { width: min(300px, calc(100vw - 28px)); bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .flo__all, .flo__eyes ellipse, .flo.is-talk .flo__mouth, .flo.is-alert .flo__bulb, .flo.is-cheer .flo__all, .flo.is-cheer .flo__arm--l, .flo.is-cheer .flo__arm--r { animation: none; }
  .buddy { transition: none; }
}
@media print { .buddy { display: none !important; } }

/* Dispatch map (Orders & dispatch): where the orders are, stage by stage, and
   what is coming back. Each stage is a button that opens its list. */
.dmap { background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 6px; }
.dmap__flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dmap__flow > li { position: relative; min-width: 0; display: flex; }
.dmap__flow > li + li::before {
  content: ""; position: absolute; left: -5px; top: 50%; width: 9px; height: 9px; margin-top: -5px; z-index: 1;
  border-top: 2px solid var(--ink-4); border-right: 2px solid var(--ink-4); transform: rotate(45deg); opacity: .55;
}
.dmap__stage {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 12px 16px 12px 18px;
  border: 0; border-radius: 17px; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.dmap__stage:hover { background: var(--card-2); }
.dmap__stage:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.dmap__stage.is-next { background: var(--lime-soft); }
.dmap__stage.is-next:hover { background: var(--lime); }
.dmap__label { max-width: 100%; font: 600 12px/1.3 var(--font-stack); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dmap__stage.is-next .dmap__label { color: var(--lime-ink); }
.dmap__value { font: 750 26px/1.15 var(--font-stack); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 4px; white-space: nowrap; }
.dmap__value small { font: 600 13px/1 var(--font-stack); color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.dmap__note { max-width: 100%; font: 550 11.5px/1.3 var(--font-stack); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dmap__note.is-warn { color: var(--warning-ink); }
.dmap__note.is-danger { color: var(--danger); }
.dmap__back { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 6px 4px; padding: 8px 4px 2px; border-top: 1px solid var(--line-2); }
.dmap__back-title { font: 650 12px/1 var(--font-stack); color: var(--ink-2); margin-right: 4px; white-space: nowrap; }
.dmap__chip {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 10px; border: 0; border-radius: 999px;
  background: var(--card-2); color: var(--ink-2); font: 550 12px/1.2 var(--font-stack); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.dmap__chip b { font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }
.dmap__chip.is-danger b { color: var(--danger); }
.dmap__chip.is-warn b { color: var(--warning-ink); }
.dmap__chip:hover { background: var(--line-1); text-decoration: none; }
.dmap__chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.dmap-old { display: grid; gap: 8px; margin-top: 10px; }
.dmap-old[hidden] { display: none; }
.dmap-old .notice__msg { overflow-wrap: anywhere; }
@media (max-width: 1180px) {
  .dmap__flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dmap__flow > li:nth-child(4)::before { display: none; }
}
@media (max-width: 660px) {
  .dmap__flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dmap__flow > li:nth-child(odd)::before { display: none; }
  .dmap__flow > li:nth-child(4)::before { display: block; }
  .dmap__stage { padding: 10px 12px 10px 14px; }
  .dmap__value { font-size: 22px; }
}

/* Bank statements: a payee or a line sorted just now keeps its place, marked
   until the list is loaded again (bank.html). */
.bk-table tr.is-just { background: var(--success-soft); }

/* ---- Material pictures (js/pictograms.js): the kind, with the product types it
   serves as badges, its size and its shade. Used on Receive & dispatch, Raw
   materials, Approvals and Purchase orders. */
.mpic { position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--mpic, 44px); height: var(--mpic, 44px); border-radius: var(--r-3);
  background: var(--card-2); border: 1px solid var(--line-1); color: var(--ink); }
.mpic.is-general { border-style: dashed; color: var(--ink-3); }
.mpic__badges { position: absolute; right: -6px; bottom: -6px; display: inline-flex; gap: 2px; }
.mpic__for, .mpic__more { display: inline-grid; place-items: center; min-width: calc(var(--mpic, 44px) * .42); height: calc(var(--mpic, 44px) * .42);
  border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 0 0 2px var(--card); }
.mpic__more { font: 700 10px/1 var(--font-stack); padding: 0 4px; }
.mpic__size { position: absolute; left: -6px; top: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  display: inline-grid; place-items: center; background: var(--lime); color: var(--lime-ink);
  font: 750 10.5px/1 var(--font-stack); box-shadow: 0 0 0 2px var(--card); }
.mpic__shade { position: absolute; right: 4px; top: 4px; width: 10px; height: 10px; border-radius: 999px;
  border: 1px solid var(--border-strong); }
.mpic__shade.is-clear { background: repeating-linear-gradient(45deg, var(--card) 0 2px, var(--line-1) 2px 4px); }

/* ---- Receive & dispatch (stores.html): big choice tiles, the rows of boxes and
   lines, and the weight check. */
.st-tile { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; text-align: left;
  background: var(--card); border: 1px solid var(--line-1); border-radius: var(--r-tile); color: var(--ink);
  font: 650 15px/1.3 var(--font-stack); cursor: pointer; box-shadow: var(--sh-card); }
.st-tile:hover { border-color: var(--border-strong); box-shadow: var(--sh-lift); }
.st-tile[disabled] { opacity: .55; cursor: default; box-shadow: none; }
.st-tile__sub { display: block; margin-top: 3px; font: 500 12.5px/1.35 var(--font-stack); color: var(--ink-3); }
.st-tile__n { margin-left: auto; font: 750 18px/1 var(--font-stack); font-variant-numeric: tabular-nums; color: var(--ink-2); text-align: center; }
.st-tile__n .st-tile__sub { margin-top: 2px; }
.st-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line-2); }
.st-row:last-child { border-bottom: 0; }
.st-row__main { min-width: 0; flex: 1; }
.st-row__t { font: 650 14px/1.3 var(--font-stack); color: var(--ink); }
.st-row__s { font: 500 12px/1.35 var(--font-stack); color: var(--ink-3); }
.st-num { font: 700 14px/1.2 var(--font-stack); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.st-code { font: 700 12.5px/1 var(--font-mono, ui-monospace, monospace); letter-spacing: .02em; }
.st-check { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-ctl);
  background: var(--card-2); font: 600 13px/1.35 var(--font-stack); color: var(--ink-2); }
.st-check.is-ok { background: var(--success-soft); color: var(--success-ink); }
.st-check.is-warn { background: var(--warning-soft); color: var(--warning-ink); }
.st-check.is-err { background: var(--danger-soft); color: var(--danger-ink); }
.st-check b { font-size: 18px; font-variant-numeric: tabular-nums; }

/* =============================================================================
   5. TOUCH AND MOTION — kept last
   ============================================================================= */
/* ---- Touch screens (tablets at the bench, phones): bigger targets for the
   shared controls. A mouse keeps the compact sizes. Last in the file, so it
   wins over each control's own size above (frontend audit of 15 Nov 2026). */
@media (pointer: coarse) {
  .btn3 { min-height: 42px; }
  .btn3--sm { min-height: 36px; }
  .seg button, .seg a { padding: 10px 14px; }
  .lm { width: 26px; height: 26px; }
  .co-act { min-height: 34px; }
  .qs-tick { min-width: 34px; min-height: 34px; }
  .dx-lens.seg button { padding: 10px 14px; }
}
/* No shimmer for people who asked for less motion: the skeleton stays, still. */
@media (prefers-reduced-motion: reduce) { .dx-skel i, .k-skeleton::after { animation: none !important; } }
