/* pulse.css — the shared Communic8 Pulse design (redesign plan: communic8-context doc 116).
 *
 * Link it as /ui/pulse.css, NOT /static/pulse.css: nginx caches /static for 7 days and this
 * file changes as each page moves over. Everything here is namespaced .pl-* (or scoped under
 * body.pl) so linking it never restyles a page that hasn't been converted yet.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/inter-5.2-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/inter-5.2-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
/* Montserrat, Studio's lettering, for the staff pages (doc 125; @fontsource-variable/montserrat 5.3.0,
   SIL OFL: static/fonts/montserrat-OFL.txt). Self-hosted like Inter, so nothing loads from Google. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/montserrat-5.3-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/montserrat-5.3-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brand — the same palette as today's pages (--lime/--plum/--pink in each template). */
  --pl-lime: #bfd64b;
  --pl-lime-h: #adc63d;
  --pl-lime-pale: #f1f6dc;
  --pl-lime-ink: #3f4d0c;
  --pl-plum: #811a4f;
  --pl-plum-h: #6a1040;
  --pl-plum-pale: #fbe4ee;
  --pl-pink: #e8308a;

  /* Surfaces and text */
  --pl-bg: #f4f4f5;
  --pl-surface: #ffffff;
  --pl-sunken: #f7f7f8;
  --pl-sidebar: #141414;
  --pl-sidebar-text: #e9e9ea;
  --pl-sidebar-chip: #262626;
  --pl-border: #e4e4e7;
  --pl-border-strong: #d4d4d8;
  --pl-text: #18181b;
  --pl-muted: #5f5f66;
  --pl-faint: #8a8a91;

  /* Plan badges */
  --pl-social-bg: #fde2ef;   --pl-social-ink: #a3195b;
  --pl-splus-bg: #ece3fb;    --pl-splus-ink: #6b3fb5;
  --pl-story-bg: #dff3f1;    --pl-story-ink: #0f6e66;
  --pl-platform-bg: #e0ebff; --pl-platform-ink: #1f5fbf;  /* platform pills */

  /* Status pills */
  --pl-ok-bg: #eef5cf;       --pl-ok-ink: #4a5a0e;
  --pl-bad-bg: #fbe3ec;      --pl-bad-ink: #a3194f;
  --pl-edit-bg: #e3edff;     --pl-edit-ink: #2457b5;
  --pl-wait-bg: #eeeef0;     --pl-wait-ink: #45454b;

  --pl-font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --pl-mono: ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace;
  --pl-radius: 10px;
  --pl-radius-sm: 6px;
  --pl-shadow: 0 1px 2px rgba(24, 24, 27, .04);
  --pl-sidebar-w: 248px;
}
/* Staff pages (body.pl: sign-in, Admin, Security; body.pl-plan: the dashboard and plans) use Studio's
   Montserrat (doc 125). The client pages (portal, questionnaire, verify) keep Inter, unchanged. */
body:is(.pl, .pl-plan) { --pl-font: 'Montserrat', 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif; }

/* ── Page base: only for pages that opt in with <body class="pl"> ───────────── */
body.pl {
  margin: 0;
  background: var(--pl-bg);
  color: var(--pl-text);
  font-family: var(--pl-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.pl input, body.pl select, body.pl textarea, body.pl button { font-family: inherit; }

/* ── App shell: dark sidebar + main column ─────────────────────────────────── */
.pl-shell { display: flex; min-height: 100vh; }
/* The sidebar matches Studio's (studio/static/studio.css .side*, doc 125): same width, logo, switch,
   items, icons and headings, so the two apps look like one. */
.pl-sidebar {
  width: var(--pl-sidebar-w); flex-shrink: 0; background: var(--pl-sidebar); color: var(--pl-sidebar-text);
  display: flex; flex-direction: column; padding: 24px 16px 20px; box-sizing: border-box;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.pl-sidebar-logo { display: flex; flex-direction: column; align-items: flex-end; align-self: flex-start; text-decoration: none; margin: 0 0 28px 8px; }
.pl-sidebar-logo img { width: 196px; max-width: 100%; height: auto; display: block; }
.pl-sidebar-logo span { color: #fff; font-size: 10px; font-weight: 700; line-height: 1.5; letter-spacing: .22em; text-transform: uppercase; margin-top: 1px; }
/* The Pulse | Studio switch under the logo (doc 119): Studio opens through /open-studio. */
.pl-switch { display: flex; gap: 4px; padding: 4px; margin: -12px 0 24px; border-radius: 12px; background: rgba(255, 255, 255, .08); }
.pl-switch > * {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 9px; font-size: 15px; font-weight: 700; line-height: 1.2;
  color: var(--pl-sidebar-text); text-decoration: none;
}
.pl-switch .on { background: var(--pl-lime); color: #111; }
.pl-switch a:hover { background: rgba(255, 255, 255, .1); }
.pl-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
/* The purple box at the foot of the menu, as Studio's .side-promo. It goes to the Dashboard. */
.pl-promo {
  position: relative; display: block; margin-top: 20px; padding: 20px 18px 64px; border-radius: 14px; overflow: hidden;
  color: #fff; text-decoration: none; font-size: 18px; font-weight: 700; line-height: 1.25;
  background: radial-gradient(120px 90px at 100% 0, rgba(218, 63, 148, .55), transparent 70%),
    radial-gradient(150px 110px at 105% 108%, var(--pl-lime) 0 55%, transparent 56%), linear-gradient(160deg, #3b0a24, #811a4f);
}
.pl-promo b { color: var(--pl-lime); }
.pl-promo .go {
  position: absolute; right: 16px; bottom: 16px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--pl-lime); color: #111; display: flex; align-items: center; justify-content: center;
}
@media (max-height: 760px) { .pl-promo { display: none; } }
.pl-nav-item {
  display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0 14px; border-radius: 10px; box-sizing: border-box;
  color: var(--pl-sidebar-text); text-decoration: none; font-size: 15px; font-weight: 500; line-height: 1.2;
  background: none; border: none; width: 100%; text-align: left; cursor: pointer;
}
.pl-nav-item:hover { background: rgba(255, 255, 255, .07); }
.pl-nav-item.active { background: var(--pl-lime); color: #111; font-weight: 700; }
.pl-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.pl-nav-label {
  margin: 20px 14px 6px; font-size: 11px; font-weight: 700; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase;
  color: #8e8e93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* A plan page's steps, moved into the menu by pulse.js (doc 125), as Studio's .side-steps: the client's name,
   the plan, then its phases and steps. The page still shows and hides the list (#sidebar) itself. */
#plWsSide .pl-nav-client { display: none; }
#plWsSide #sidebar.pl-side-steps {
  width: auto; margin: 0; padding: 0; background: none; border: none; border-radius: 0; box-shadow: none;
  position: static; overflow: visible; align-self: stretch; flex-direction: column;
}
#plWsSide .pl-side-plan { color: #fff; font-weight: 700; cursor: default; }
#plWsSide .pl-side-plan:hover { background: none; }
#plWsSide .pl-side-plan span { flex: 1; }
#plWsSide .pl-side-plan .pl-side-chev { width: 16px; height: 16px; opacity: .6; }
#plWsSide .sb-group { margin: 0; }
#plWsSide .sb-parent {
  display: block; width: 100%; padding: 14px 8px 4px 16px; border: none; background: none !important;
  color: #8e8e93; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
#plWsSide .sb-parent > span:first-child { display: block !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#plWsSide .sb-parent > span:first-child::before { margin-right: 5px; }
#plWsSide .sb-children { background: none; padding: 0; }
#plWsSide .sb-child {
  display: block; width: 100%; min-height: 34px; margin: 1px 0; padding: 7px 12px 7px 48px; box-sizing: border-box;
  border: none; border-radius: 10px; background: none; color: #c7c7cc; font-size: 14px; line-height: 1.35; text-align: left;
}
#plWsSide .sb-child:hover { background: rgba(255, 255, 255, .07); color: #fff; }
#plWsSide .sb-child.active { background: var(--pl-lime); color: #111; font-weight: 700; }
#plWsSide .sb-child.done::after { color: var(--pl-lime); }
#plWsSide .sb-child.active.done::after { color: #111; }
/* inside a client the steps need the room: the purple box shows on the Dashboard, Admin and Security only */
.pl-sidebar:has(#sidebar.pl-side-steps[style*="flex"]) .pl-promo { display: none; }
.pl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ── Page header: breadcrumb, title, plan badge, quarter, actions ───────────── */
.pl-header {
  background: var(--pl-surface); border-bottom: 1px solid var(--pl-border);
  padding: 16px 32px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.pl-crumbs { font-size: 13px; color: var(--pl-muted); display: flex; flex-wrap: wrap; gap: 6px; }
.pl-crumbs span + span::before { content: '\203A'; margin-right: 6px; color: var(--pl-faint); }
.pl-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.pl-title { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
.pl-quarter { font-size: 12.5px; color: var(--pl-muted); }
.pl-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pl-user { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
/* The name at the top right opens a menu (pulse.js), as in Studio: Admin Panel, Security, Sign out. */
.pl-user-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px 0 4px; border: none; border-radius: 10px;
  background: none; color: var(--pl-text); font: inherit; font-weight: 600; cursor: pointer;
}
.pl-user-btn:hover, .pl-user-btn[aria-expanded="true"] { background: var(--pl-bg); }
.pl-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: #1c1c1e; color: #fff; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.pl-menu {
  position: absolute; z-index: 3500; min-width: 200px; padding: 6px; background: #fff; border: 1px solid var(--pl-border);
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); font-family: var(--pl-font);
}
.pl-menu-label { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--pl-border); font-size: 13px; color: var(--pl-muted); }
.pl-menu-label:last-child { border-bottom: none; margin-bottom: 0; }
.pl-menu a {
  display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 8px;
  color: var(--pl-text); text-decoration: none; font-size: 15px; font-weight: 500;
}
.pl-menu a:hover, .pl-menu a:focus-visible { background: var(--pl-lime-pale); outline: none; }
.pl-menu a.on { font-weight: 700; }
.pl-menu a span { display: flex; flex-direction: column; min-width: 0; }
.pl-menu.wide { min-width: 340px; max-width: 420px; }
.pl-menu.wide a { white-space: normal; line-height: 1.35; padding: 8px 12px; }
.pl-menu small { color: var(--pl-muted); font-size: 12px; }

/* ── The top bar (doc 125), as Studio's .topbar: client picker, search, bell, name menu ── */
.pl-topbar {
  position: relative; z-index: 20; height: 68px; flex-shrink: 0; box-sizing: border-box; background: var(--pl-surface);
  border-bottom: 1px solid var(--pl-border); display: flex; align-items: center; gap: 16px; padding: 0 32px;
}
.pl-header.pl-topbar { justify-content: flex-start; }
.pl-tb-client {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 200px; height: 44px;
  padding: 0 14px; border: 1px solid var(--pl-border-strong); border-radius: 10px; background: #fff; color: #111;
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.pl-tb-client:hover { background: var(--pl-sunken); }
.pl-tb-client-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tb-search { position: relative; flex: 1; max-width: 620px; display: flex; align-items: center; }
.pl-tb-search > svg { position: absolute; left: 14px; color: var(--pl-muted); pointer-events: none; }
.pl-topbar .pl-tb-search input {
  width: 100%; min-width: 0; height: 44px; box-sizing: border-box; padding: 0 14px 0 42px; margin: 0;
  border: 1px solid var(--pl-border-strong); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; color: var(--pl-text);
}
.pl-topbar .pl-tb-search input:focus { outline: none; border-color: var(--pl-plum); box-shadow: 0 0 0 3px rgba(129, 26, 79, .12); }
.pl-search-results {
  position: absolute; top: 50px; left: 0; right: 0; z-index: 30; max-height: 420px; overflow: auto; padding: 6px;
  background: #fff; border: 1px solid var(--pl-border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}
.pl-search-results[hidden] { display: none; }
.pl-search-results a {
  display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px 10px; border-radius: 8px;
  color: #111; text-decoration: none; box-sizing: border-box;
}
.pl-search-results a:hover, .pl-search-results a:focus-visible { background: var(--pl-lime-pale); outline: none; }
.pl-search-results .kind {
  flex: none; width: 52px; padding-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--pl-plum);
}
.pl-search-results .lbl { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.pl-search-results small { color: var(--pl-muted); font-size: 12px; }
.pl-search-results .none { padding: 12px; color: var(--pl-muted); font-size: 14px; }
.pl-tb-bell {
  position: relative; margin-left: auto; width: 44px; height: 44px; padding: 0; border: none; border-radius: 50%;
  background: none; color: #111; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.pl-tb-bell:hover, .pl-tb-bell[aria-expanded="true"] { background: var(--pl-bg); }
.pl-bell-dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: #da3f94; border: 2px solid #fff; }
.pl-bell-dot[hidden] { display: none; }
@media (max-width: 900px) {
  .pl-topbar, .pl-header.pl-topbar { padding: 0 16px; gap: 8px; flex-wrap: nowrap; }
  .pl-tb-client { min-width: 0; }
  .pl-tb-client-name { max-width: 90px; }
  .pl-user-btn > span:not(.pl-avatar), .pl-user-btn > svg { display: none; }
}
.pl-content { padding: 24px 32px 32px; flex: 1; }
/* The footer line, as Studio's .site-foot */
.pl-footnote { font-size: 12px; line-height: 1.6; text-align: center; color: var(--pl-muted); padding: 8px 0 24px; }
.pl-footnote .sep { margin: 0 8px; color: #c7c7cc; }

/* ── Step list beside a plan page ──────────────────────────────────────────── */
.pl-workspace { display: flex; gap: 20px; align-items: flex-start; }
.pl-steps {
  width: 250px; flex-shrink: 0; background: var(--pl-surface); border: 1px solid var(--pl-border);
  border-radius: var(--pl-radius); padding: 14px 12px; box-sizing: border-box;
}
.pl-steps-phase {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pl-text); padding: 12px 8px 6px;
}
.pl-steps-phase:first-child { padding-top: 4px; }
.pl-step {
  display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 6px 12px 6px 18px; border-radius: 6px; font-size: 13.5px; color: var(--pl-muted);
  border-left: 3px solid transparent;
}
.pl-step:hover { background: var(--pl-sunken); color: var(--pl-text); }
.pl-step.active { background: var(--pl-lime-pale); color: var(--pl-text); font-weight: 600; border-left-color: var(--pl-lime); }
.pl-step.done::after { content: ' \2713'; color: var(--pl-lime-h); font-weight: 700; }
.pl-workspace-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.pl-card {
  background: var(--pl-surface); border: 1px solid var(--pl-border); border-radius: var(--pl-radius);
  box-shadow: var(--pl-shadow); padding: 22px 24px;
}
.pl-card-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.pl-card-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; display: inline-flex;
  align-items: center; justify-content: center; background: var(--pl-lime-pale); color: var(--pl-lime-ink);
}
.pl-card-icon svg { width: 22px; height: 22px; }
.pl-card-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.pl-card-sub { font-size: 14px; color: var(--pl-muted); margin: 0; }
.pl-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--pl-muted); margin: 0 0 4px;
}
.pl-sunken { background: var(--pl-sunken); border-radius: 8px; padding: 12px 14px; }
.pl-divider { border: none; border-top: 1px solid var(--pl-border); margin: 20px 0; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.pl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
  font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.pl-btn svg { width: 16px; height: 16px; }
.pl-btn:disabled { opacity: .5; cursor: not-allowed; }
.pl-btn-primary { background: var(--pl-lime); color: #18181b; }
.pl-btn-primary:hover:not(:disabled) { background: var(--pl-lime-h); }
.pl-btn-plum { background: var(--pl-plum); color: #fff; }
.pl-btn-plum:hover:not(:disabled) { background: var(--pl-plum-h); }
.pl-btn-dark { background: #18181b; color: #fff; }
.pl-btn-outline { background: var(--pl-surface); color: var(--pl-text); border-color: var(--pl-border-strong); }
.pl-btn-outline:hover:not(:disabled) { background: var(--pl-sunken); }
.pl-btn-danger { background: #fdecec; color: #b42318; border-color: #f5c2c0; }
.pl-btn-link { background: none; border: none; color: var(--pl-plum); padding: 4px 6px; }
.pl-btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 6px; }
.pl-btn-lg { padding: 12px 20px; font-size: 15px; }
.pl-btn-block { width: 100%; }
/* Approve / Reject toggles on review cards: outline until chosen. */
.pl-btn-approve { background: var(--pl-surface); color: var(--pl-lime-ink); border-color: var(--pl-lime); }
.pl-btn-approve.on { background: var(--pl-lime); color: #18181b; }
.pl-btn-reject { background: var(--pl-surface); color: var(--pl-muted); border-color: var(--pl-border-strong); }
.pl-btn-reject.on { background: var(--pl-plum); color: #fff; border-color: var(--pl-plum); }

/* ── Badges and pills ──────────────────────────────────────────────────────── */
.pl-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.pl-badge-social { background: var(--pl-social-bg); color: var(--pl-social-ink); }
.pl-badge-splus { background: var(--pl-splus-bg); color: var(--pl-splus-ink); }
.pl-badge-story { background: var(--pl-story-bg); color: var(--pl-story-ink); }
.pl-badge-ok { background: var(--pl-ok-bg); color: var(--pl-ok-ink); }
.pl-badge-bad { background: var(--pl-bad-bg); color: var(--pl-bad-ink); }
.pl-badge-edit { background: var(--pl-edit-bg); color: var(--pl-edit-ink); }
.pl-badge-wait { background: var(--pl-wait-bg); color: var(--pl-wait-ink); }
.pl-badge-outline { background: var(--pl-surface); color: var(--pl-wait-ink); border: 1px solid var(--pl-border-strong); }
.pl-num {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; background: #18181b; color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.pl-counters { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Stat cards (dashboard) ────────────────────────────────────────────────── */
.pl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
/* As Studio's (studio.css .stat, doc 125): a tinted card, a drawn icon in a white circle, the number,
   a label and a note. The tint classes (green, pink, blue, yellow) are Studio's colours. */
.pl-stat {
  background: var(--pl-surface); border: 1px solid var(--pl-border); border-radius: 12px;
  padding: 20px; display: flex; align-items: center; gap: 16px;
}
.pl-stat.green { background: #f3f8e1; border-color: #e3edc4; }
.pl-stat.pink { background: #fdeef5; border-color: #f8d9e8; }
.pl-stat.blue { background: #eaf4fb; border-color: #d3e8f5; }
.pl-stat.yellow { background: #fdf6e3; border-color: #f5e6bd; }
.pl-stat-icon {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; display: inline-flex;
  align-items: center; justify-content: center; background: #fff; color: var(--pl-text);
}
.pl-stat.green .pl-stat-icon { color: #5b7a12; }
.pl-stat.pink .pl-stat-icon { color: var(--pl-plum); }
.pl-stat.blue .pl-stat-icon { color: #1f6f99; }
.pl-stat.yellow .pl-stat-icon { color: #8a5a00; }
.pl-stat-value { font-size: 32px; font-weight: 700; line-height: 1.05; color: #111; font-variant-numeric: tabular-nums; }
.pl-stat-label { font-size: 15px; font-weight: 600; color: #111; margin-top: 2px; }
.pl-stat-note { font-size: 13px; color: var(--pl-muted); }

/* ── Tables ────────────────────────────────────────────────────────────────── */
.pl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pl-table th {
  text-align: left; font-size: 13px; font-weight: 600; color: var(--pl-muted);
  padding: 10px 8px; border-bottom: 1px solid var(--pl-border); vertical-align: bottom;
}
.pl-table td { padding: 14px 8px; border-bottom: 1px solid var(--pl-border); vertical-align: top; }
.pl-table tr:last-child td { border-bottom: none; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.pl-field { display: flex; flex-direction: column; gap: 6px; }
.pl-label { font-size: 14px; font-weight: 600; color: var(--pl-text); }
.pl-label .req { color: var(--pl-plum); }
.pl-input, .pl-select, .pl-textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--pl-border-strong);
  border-radius: 8px; background: var(--pl-surface); color: var(--pl-text); font-size: 14px; font-family: inherit;
}
.pl-input:focus, .pl-select:focus, .pl-textarea:focus {
  outline: none; border-color: var(--pl-plum); box-shadow: 0 0 0 3px rgba(129, 26, 79, .12);
}
.pl-textarea { min-height: 96px; resize: vertical; }
.pl-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.pl-check-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--pl-border-strong);
  border-radius: 8px; background: var(--pl-surface); cursor: pointer;
}
.pl-check-card input { margin-top: 3px; }
.pl-help { font-size: 13px; color: var(--pl-muted); }

/* ── Notices ───────────────────────────────────────────────────────────────── */
.pl-notice {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 8px;
  border: 1px solid var(--pl-border); background: var(--pl-sunken); font-size: 14px;
}
.pl-notice-ok { background: var(--pl-lime-pale); border-color: #d9e7a0; }
.pl-notice-bad { background: var(--pl-plum-pale); border-color: #f3c3d8; }
.pl-log {
  font-family: var(--pl-mono); font-size: 12.5px; color: var(--pl-muted); background: var(--pl-sunken);
  border: 1px solid var(--pl-border); border-radius: 8px; padding: 12px 14px; min-height: 64px; white-space: pre-wrap;
}

/* ── Side panels (Notifications, Upcoming, My tasks) ───────────────────────── */
.pl-panel {
  background: var(--pl-surface); border: 1px solid var(--pl-border); border-radius: var(--pl-radius);
  padding: 16px 18px;
}
.pl-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pl-panel-title { font-size: 15px; font-weight: 700; margin: 0; }
.pl-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--pl-wait-bg);
  font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
}

/* ── Sign-in pages (sign in, forgot / reset password): form left, dark panel right ── */
.pl-auth { min-height: 100vh; display: flex; }
.pl-auth-form { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--pl-surface); padding: 40px 24px; }
.pl-auth-wrap { width: 100%; max-width: 592px; }
.pl-auth-logo { height: 38px; width: auto; display: block; margin-bottom: 34px; }
.pl-auth h2 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 6px; }
.pl-auth .sub { font-size: 14px; color: var(--pl-muted); margin: 0 0 26px; }
.pl-auth .pl-label { display: block; margin: 0 0 8px; }
.pl-auth-field { margin-bottom: 22px; }
.pl-auth .error-box {
  background: var(--pl-plum-pale); border: 1px solid #f3c3d8; border-radius: 8px; padding: 11px 14px;
  font-size: 14px; color: var(--pl-bad-ink); margin-bottom: 18px; display: none;
}
.pl-auth .error-box.visible { display: block; }
.pl-auth .success-box {
  background: var(--pl-lime-pale); border: 1px solid #d9e7a0; border-radius: 8px; padding: 14px;
  font-size: 14px; color: var(--pl-lime-ink); line-height: 1.6;
}
.pl-auth .footer { font-size: 12.5px; color: var(--pl-muted); margin: 18px 0 0; }
.pl-auth .footer a, .pl-auth-link { color: var(--pl-plum); font-size: 13px; font-weight: 600; }
.pl-auth .pl-btn-block { height: 46px; }
.pl-in-wrap { position: relative; }
.pl-in-wrap .pl-in-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--pl-faint); pointer-events: none; display: flex; }
.pl-in-wrap .pl-input { padding: 11px 12px 11px 38px; font-size: 14.5px; }
.pl-in-wrap.pl-pw .pl-input { padding-right: 44px; }
.pl-in-wrap .eye-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none;
  cursor: pointer; padding: 4px; color: var(--pl-muted); display: flex; align-items: center;
}
.pl-in-wrap .eye-btn:hover { color: var(--pl-text); }
.pl-auth-art {
  flex: 1; position: relative; overflow: hidden; background: var(--pl-sidebar); color: #fff;
  display: flex; flex-direction: column; justify-content: center; padding: 56px;
}
.pl-auth-art::before, .pl-auth-art::after { content: ''; position: absolute; border-radius: 50%; }
.pl-auth-art::before { width: 380px; height: 380px; right: -120px; top: -120px; background: var(--pl-plum); }
.pl-auth-art::after { width: 360px; height: 360px; right: -60px; bottom: -180px; background: var(--pl-lime); }
.pl-auth-art h1 { position: relative; z-index: 1; font-size: 46px; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin: 0 0 22px; max-width: 440px; }
.pl-auth-art h1 span { color: var(--pl-lime); }
.pl-auth-art p { position: relative; z-index: 1; font-size: 15px; line-height: 1.6; color: #d4d4d8; margin: 0; max-width: 440px; }
.pl-auth-art-foot { position: absolute; z-index: 1; left: 56px; bottom: 52px; font-size: 12.5px; color: #a1a1aa; }

/* ── Plan pages (Social Image, Social Short): <body class="pl-plan"> ─────────
   These pages keep their own markup, ids and script. They link this file AFTER their
   own <style> block, and every rule here is wrapped in :where(), which adds no
   specificity, so a rule here replaces the page's rule for the same selector and
   nothing more. The page supplies #plWsSide (dark sidebar) and #plWsHeader
   (breadcrumb, phase title, plan badge, quarter); app.html also has its Clients
   dashboard, shown with body.pl-dash. */
body.pl-plan { font-family: var(--pl-font); background: var(--pl-bg); color: var(--pl-text); -webkit-font-smoothing: antialiased; }
body.pl-plan :is(button, input, select, textarea, .comm-modal):not([style*="monospace"]):not([style*="Courier"]) { font-family: var(--pl-font) !important; }
body.pl-plan [style*="font-family:Arial"] { font-family: var(--pl-font) !important; }
:where(body.pl-plan) :is(.top-bar, .logo-bar, .site-footer) { display: none !important; }
:where(body.pl-plan) #plWsSide { position: fixed; left: 0; top: 0; bottom: 0; height: auto; z-index: 60; }
body.pl-plan:not(.pl-dash) { padding-left: var(--pl-sidebar-w); height: 100vh; overflow: hidden; }
:where(body.pl-plan.pl-dash) :is(#plWsSide, #plWsTop, #plWsHeader) { display: none; }
:where(body.pl-plan) .pl-nav-client { cursor: default; }
:where(body.pl-plan) .pl-nav-client span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(body.pl-plan) #plWsHeader { flex-shrink: 0; }
:where(body.pl-plan) .body-layout { border-left: none; background: var(--pl-bg); }
:where(body.pl-plan) .workspace-outer {
  background: var(--pl-bg); padding: 24px 32px 8px;
  flex-direction: column; align-items: center; justify-content: flex-start;
}
/* The footnote line, drawn here because the panels sit at uneven nesting depths. */
:where(body.pl-plan) .workspace-outer::after {
  content: "\00a9  2026 the ei8ht lab \00b7  Powered by AI \00b7  AI can make mistakes. Check important info.";
  width: 100%; max-width: 1400px; font-size: 12px; color: var(--pl-muted); padding: 8px 0 24px;
}
:where(body.pl-plan) .workspace-inner { width: 100%; max-width: 1400px; background: none; gap: 20px; align-items: flex-start; flex-shrink: 0; }
:where(body.pl-plan) .content { border-left: none; background: none; }
:where(body.pl-plan) .panel-body { padding: 0; }
:where(body.pl-plan) .section-hdr { display: none; }
/* Step list */
:where(body.pl-plan) .sidebar {
  width: 250px; background: var(--pl-surface); border: 1px solid var(--pl-border); border-radius: var(--pl-radius);
  padding: 12px 10px; align-self: flex-start; position: sticky; top: 0; counter-reset: phase; overflow: visible;
}
:where(body.pl-plan) .sb-title { display: none !important; }
:where(body.pl-plan) .sb-parent {
  background: none !important; color: var(--pl-text); font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; padding: 12px 8px 6px; cursor: default; pointer-events: none; counter-increment: phase;
}
:where(body.pl-plan) .sb-group:first-of-type .sb-parent { padding-top: 4px; }
:where(body.pl-plan) :is(.sb-parent svg, .sb-parent .chev) { display: none !important; }
:where(body.pl-plan) .sb-parent > span:first-child { display: flex !important; align-items: center; gap: 6px !important; }
:where(body.pl-plan) .sb-parent > span:first-child::before { content: counter(phase) " \00b7"; }
:where(body.pl-plan) .sb-children { background: none; padding: 0; }
:where(body.pl-plan) .sb-child {
  width: 100%; margin: 1px 0; padding: 6px 12px 6px 18px; background: none; border: none;
  border-left: 3px solid transparent; border-radius: 6px; color: var(--pl-muted); font-size: 13.5px;
}
:where(body.pl-plan) .sb-child:hover { background: var(--pl-sunken); color: var(--pl-text); border-left-color: transparent; }
:where(body.pl-plan) .sb-child.active { background: var(--pl-lime-pale); color: var(--pl-text); font-weight: 600; border-left-color: var(--pl-lime); }
:where(body.pl-plan) .sb-child.done::after { color: var(--pl-lime-h); font-weight: 700; }
:where(body.pl-plan) .sb-child.active.done::after { color: var(--pl-lime-h); }
/* Shared building blocks on every step */
:where(body.pl-plan) .card {
  background: var(--pl-surface); border: 1px solid var(--pl-border); border-radius: var(--pl-radius);
  padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--pl-shadow);
}
:where(body.pl-plan) .card-title { font-size: 18px; font-weight: 700; color: var(--pl-text); margin-bottom: 8px; }
:where(body.pl-plan) label.flbl { font-size: 13.5px; font-weight: 600; color: var(--pl-text); }
:where(body.pl-plan) :is(input[type=text], input[type=password], input[type=number], input[type=email], input[type=date], input[type=url], textarea, select) {
  border: 1px solid var(--pl-border-strong); border-radius: 8px; font-size: 14px; color: var(--pl-text); padding: 10px 12px;
}
:where(body.pl-plan) :is(input:focus, textarea:focus, select:focus) { border-color: var(--pl-plum); box-shadow: 0 0 0 3px rgba(129, 26, 79, .12); }
:where(body.pl-plan) .btn { border-radius: 8px; font-weight: 600; font-size: 13.5px; border: 1px solid transparent; }
:where(body.pl-plan) .btn-lime { background: var(--pl-lime); color: #18181b; }
:where(body.pl-plan) .btn-lime:hover { background: var(--pl-lime-h); }
:where(body.pl-plan) .btn-mag { background: var(--pl-plum); color: #fff; }
:where(body.pl-plan) .btn-mag:hover { background: var(--pl-plum-h); }
:where(body.pl-plan) .btn-gray { background: var(--pl-surface); color: var(--pl-text); border-color: var(--pl-border-strong); }
:where(body.pl-plan) .btn-gray:hover { background: var(--pl-sunken); }
:where(body.pl-plan) .btn-red { background: #fdecec; color: #b42318; border-color: #f5c2c0; }
:where(body.pl-plan) .btn-red:hover { background: #fbdcdc; }
:where(body.pl-plan) .status { border-radius: 8px; font-size: 13px; font-weight: 600; }
:where(body.pl-plan) .logbox {
  font-family: var(--pl-mono); font-size: 12.5px; color: var(--pl-muted); background: var(--pl-sunken);
  border: 1px solid var(--pl-border); border-radius: 8px;
}
:where(body.pl-plan) .badge { border-radius: 999px; font-size: 12px; font-weight: 600; padding: 2px 10px; }
:where(body.pl-plan) .bdone { background: var(--pl-ok-bg); color: var(--pl-ok-ink); border: none; }
:where(body.pl-plan) .bpend { background: var(--pl-wait-bg); color: var(--pl-wait-ink); }
:where(body.pl-plan) .pill { border-radius: 999px; background: var(--pl-ok-bg); color: var(--pl-ok-ink); border: none; }
:where(body.pl-plan) .note { color: var(--pl-faint); font-size: 12px; }
:where(body.pl-plan) .prog-wrap { height: 6px; background: var(--pl-wait-bg); border-radius: 999px; }
:where(body.pl-plan) .prog-bar { border-radius: 999px; }
:where(body.pl-plan) .qtab { font-weight: 600; font-size: 13px; }
:where(body.pl-plan) .qtab-active { color: var(--pl-plum) !important; border-bottom-color: var(--pl-plum) !important; }
:where(body.pl-plan) .btab { border-radius: 999px; border: 1px solid var(--pl-border-strong); background: var(--pl-surface); color: var(--pl-muted); font-weight: 600; }
:where(body.pl-plan) .btab.active { background: var(--pl-plum); border-color: var(--pl-plum); color: #fff; }
:where(body.pl-plan) .btab.done { background: var(--pl-ok-bg); border-color: #d9e7a0; color: var(--pl-ok-ink); }
:where(body.pl-plan) :is(.comm-modal, .modal) { border-radius: 12px; }
:where(body.pl-plan) .pb { border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; }
:where(body.pl-plan) .etag { border-radius: 999px; padding: 1px 8px; font-size: 11px; border: none; background: var(--pl-plum-pale); }
:where(body.pl-plan) .review-flag { border-radius: 8px; }
:where(body.pl-plan) .ai-box { background: #f3effc; border: none; border-radius: 8px; color: #5b3d9a; font-family: var(--pl-mono); font-size: 12.5px; }
/* Review cards on every plan: Approve/Reject column, client-edited badge, reason box */
:where(body.pl-plan) .rv-dec { display: flex; flex-direction: column; gap: 8px; }
:where(body.pl-plan) .rv-dec .pl-btn { width: 100%; }
:where(body.pl-plan) .rv-edited { margin-top: 10px; }
:where(body.pl-plan) .rv-comment {
  width: 100%; margin-top: 10px; padding: 6px 8px !important; font-size: 12px !important; border: 1px solid #f3c3d8 !important;
  border-radius: 6px !important; resize: vertical; min-height: 70px; line-height: 1.4;
}
/* Review tables shown as cards: <table class="post-table pl-rows"> with the 8 cells
   Decision, #, Date, Pillar, Content, Platform, Hashtags, Brief (Social posts, Social+
   reels). Rows stay <tr>/<td>, so every id, handler and DOM lookup is unchanged.
   The right-hand panel's label comes from --pl-brief on the table. */
:where(body.pl-plan) .tbl-wrap:has(> .pl-rows) { max-height: none; overflow: visible; border: none; border-radius: 0; }
:where(body.pl-plan) .pl-rows thead { display: none; }
:where(body.pl-plan) :is(.pl-rows, .pl-rows > tbody) { display: block; }
:where(body.pl-plan) .pl-rows > tbody > tr {
  display: grid; grid-template-columns: 104px 132px minmax(0, 1fr) 210px; grid-template-rows: auto auto auto auto 1fr;
  column-gap: 16px; row-gap: 6px; background: var(--pl-surface) !important; border: 1px solid var(--pl-border) !important;
  border-radius: var(--pl-radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--pl-shadow);
}
:where(body.pl-plan) .pl-rows > tbody > tr > td {
  padding: 0 !important; border: none !important; background: none !important; min-width: 0 !important;
  text-align: left !important; white-space: normal !important;
}
:where(body.pl-plan) .pl-rows > tbody > tr > td[colspan] { grid-column: 1 / -1; text-align: center !important; }
:where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(1) { grid-column: 1; grid-row: 1 / -1; }
:where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(2) {
  grid-column: 2; grid-row: 1; justify-self: start; width: 24px; height: 24px; border-radius: 50%;
  background: #18181b !important; color: #fff !important; font-size: 12px !important; display: flex; align-items: center; justify-content: center;
}
:where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(3) { grid-column: 2; grid-row: 1; padding-left: 32px !important; font-size: 13px !important; color: var(--pl-text) !important; line-height: 1.5; }
:where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(4) { grid-column: 2; grid-row: 2; }
:where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(6) { grid-column: 2; grid-row: 3; font-size: 12.5px !important; }
:where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(7) { grid-column: 2; grid-row: 4; font-size: 12px !important; color: var(--pl-faint) !important; }
:where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(5) { grid-column: 3; grid-row: 1 / -1; }
:where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(8) {
  grid-column: 4; grid-row: 1 / -1; background: var(--pl-sunken) !important; border-radius: 8px; padding: 12px 14px !important;
  font-size: 12.5px !important; color: var(--pl-text) !important; align-self: start;
}
:where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(8)::before {
  content: var(--pl-brief, 'Image brief'); display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--pl-muted); margin-bottom: 6px;
}
:where(body.pl-plan) .pl-rows td:nth-child(3) button { font-size: 12.5px !important; padding: 0 !important; border: none !important; background: none !important; color: var(--pl-plum) !important; font-weight: 600; }
:where(body.pl-plan) .pl-rows td:nth-child(3) input { font-size: 12.5px !important; padding: 4px 6px !important; }
:where(body.pl-plan) .pl-rows td:nth-child(3) [id*="ateEdit"] button { padding: 4px 0 !important; border-radius: 6px !important; }
:where(body.pl-plan) .pl-rows td:nth-child(3) [id*="ateEdit"] button:first-child { background: var(--pl-lime) !important; color: #18181b !important; }
:where(body.pl-plan) .pl-rows td:nth-child(5) div[style*="text-transform:uppercase"] { font-size: 11px !important; letter-spacing: .1em !important; }
:where(body.pl-plan) .pl-rows td:nth-child(5) div[style*="font-weight:bold;font-size:13px"] { font-size: 17px !important; font-weight: 700 !important; }
:where(body.pl-plan) .pl-rows td:nth-child(5) div[style*="font-size:12px;color:#444"] { font-size: 14px !important; color: var(--pl-muted) !important; }
:where(body.pl-plan) .pl-rows td:nth-child(5) div[style*="font-style:italic"] { font-size: 13.5px !important; font-style: normal !important; font-weight: 600; color: var(--pl-text) !important; }
/* Laptop widths: the brief moves under the content. */
@media (max-width: 1400px) {
  :where(body.pl-plan) .pl-rows > tbody > tr { grid-template-columns: 104px 132px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto; }
  :where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(5) { grid-row: 1 / 5; }
  :where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(8) { grid-column: 3; grid-row: 5; margin-top: 8px; }
}
/* Narrow screens: decisions on the left, everything else stacked. */
@media (max-width: 1000px) {
  :where(body.pl-plan) .pl-rows > tbody > tr { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto; }
  :where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(n) { grid-column: 2; grid-row: auto; }
  :where(body.pl-plan) .pl-rows > tbody > tr > td:nth-child(1) { grid-column: 1; grid-row: 1 / span 8; }
  :where(body.pl-plan) .pl-rows > tbody > tr > td:is(:nth-child(2), :nth-child(3)) { grid-row: 1; }
}
/* Content cards: Social Short briefs, captions on every plan */
:where(body.pl-plan) :is(.outline-card, .reel-card, .cap-post) {
  background: var(--pl-surface); border: 1px solid var(--pl-border) !important; border-radius: var(--pl-radius);
  box-shadow: var(--pl-shadow); margin-bottom: 16px; overflow: hidden;
}
:where(body.pl-plan) :is(.outline-card-hdr, .reel-card-hdr) { background: var(--pl-surface) !important; border-bottom: 1px solid var(--pl-border); padding: 14px 20px; gap: 12px; }
:where(body.pl-plan) :is(.outline-card-body, .reel-card-body) { padding: 16px 20px; }
:where(body.pl-plan) .cap-hdr { background: var(--pl-surface) !important; border-bottom: none; padding: 16px 20px 6px; gap: 12px; flex-wrap: wrap; }
:where(body.pl-plan) .cap-hdr strong { font-size: 14px; color: var(--pl-text); }
:where(body.pl-plan) .cap-body { padding: 8px 20px 18px; }
:where(body.pl-plan) .cap-text { background: var(--pl-sunken); border: none; border-radius: 8px; padding: 14px 16px; font-size: 14px; line-height: 1.65; color: var(--pl-text); }
:where(body.pl-plan) .vis h4 { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--pl-muted); margin: 12px 0 3px; }
:where(body.pl-plan) .vis p { font-size: 14px; color: var(--pl-text); }
:where(body.pl-plan) .cr-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
:where(body.pl-plan) .cr-dec { display: flex; gap: 8px; margin-left: auto; }
/* Action rows on the review steps colour their buttons inline (lime / plum / pink /
   blue with white text); map them onto the Pulse buttons. */
:where(body.pl-plan) .btn[style*="background:#bdd64d"] { background: var(--pl-lime) !important; color: #18181b !important; }
:where(body.pl-plan) .btn:is([style*="background:#811a4f"], [style*="background:var(--plum)"]) { background: var(--pl-plum) !important; color: #fff !important; border-color: var(--pl-plum) !important; }
:where(body.pl-plan) .btn:is([style*="background:#da3f94"], [style*="background:#41abdd"]) {
  background: var(--pl-surface) !important; color: var(--pl-text) !important; border: 1px solid var(--pl-border-strong) !important;
}
:where(body.pl-plan) .btn:is([style*="background:#da3f94"], [style*="background:#41abdd"]):hover:not(:disabled) { background: var(--pl-sunken) !important; }
/* Approve / Reject toggles that colour themselves inline by state (#f5f8e5 idle,
   #bdd64d approved, #811a4f rejected), as on the Social Short cards. */
:where(body.pl-plan) button[onclick*="Status("]:is([style*="background:#f5f8e5"], [style*="background:#bdd64d"], [style*="background:#811a4f"]) {
  border-radius: 6px !important; padding: 5px 12px !important; font-size: 13px !important; font-weight: 600 !important;
  border: 1px solid var(--pl-border-strong) !important; background: var(--pl-surface) !important; color: var(--pl-muted) !important;
}
:where(body.pl-plan) button[onclick*="'approved'"][style*="background:#f5f8e5"] { border-color: var(--pl-lime) !important; color: var(--pl-lime-ink) !important; }
:where(body.pl-plan) button[onclick*="Status("][style*="background:#bdd64d"] { background: var(--pl-lime) !important; border-color: var(--pl-lime) !important; color: #18181b !important; }
:where(body.pl-plan) button[onclick*="Status("][style*="background:#811a4f"] { background: var(--pl-plum) !important; border-color: var(--pl-plum) !important; color: #fff !important; }
/* Status pills coloured inline (client decisions, "Client edited", state badges) */
:where(body.pl-plan) span[style*="background:#dcfce7"] { background: var(--pl-ok-bg) !important; color: var(--pl-ok-ink) !important; border: none !important; border-radius: 999px !important; padding: 2px 9px !important; font-weight: 600 !important; }
:where(body.pl-plan) span[style*="background:#fee2e2"] { background: var(--pl-bad-bg) !important; color: var(--pl-bad-ink) !important; border: none !important; border-radius: 999px !important; padding: 2px 9px !important; font-weight: 600 !important; }
:where(body.pl-plan) .outline-status { border-radius: 999px; font-weight: 600; }
:where(body.pl-plan) span:is([style*="background:#eff6ff"], [style*="background:#dbeafe"]) { background: var(--pl-edit-bg) !important; color: var(--pl-edit-ink) !important; border: none !important; border-radius: 999px !important; padding: 2px 9px !important; font-weight: 600 !important; }
/* Filter pills under the review buttons */
:where(body.pl-plan) :is(#appCount, #capAppCount, #reelAppCount) button { border-radius: 999px !important; font-weight: 600 !important; }
@media (max-width: 900px) {
  /* the whole page scrolls on a phone, rather than a small inner area */
  body.pl-plan:not(.pl-dash) { padding-left: 0; height: auto; overflow: visible; }
  :where(body.pl-plan) #plWsSide { position: static; }
  :where(body.pl-plan) :is(.body-layout, .workspace-outer) { overflow: visible; }
  :where(body.pl-plan) .workspace-outer { padding: 16px; }
  :where(body.pl-plan) .workspace-inner { flex-direction: column; }
  :where(body.pl-plan) .sidebar { width: 100%; position: static; }
}

/* ── Narrow screens: the sidebar sits above the page (as in Studio), step list stacks ── */
@media (max-width: 900px) {
  .pl-shell { flex-direction: column; }
  .pl-sidebar { width: 100%; height: auto; position: static; }
  .pl-promo { display: none; }
  .pl-header { padding: 14px 16px; flex-wrap: wrap; }
  .pl-content { padding: 16px; }
  .pl-workspace { flex-direction: column; }
  .pl-steps { width: 100%; }
  .pl-grid-2 { grid-template-columns: 1fr; }
  .pl-auth-art { display: none; }
}

/* The pink question box (pulse.js plConfirm), in place of the browser's own grey confirm() box: the same look as
   the Brand DNA modal. */
.pl-confirm-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 3000; display: flex;
  align-items: center; justify-content: center; }
.pl-confirm { background: #fff; border-radius: 12px; width: 460px; max-width: 90vw; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3); font-family: var(--pl-font); }
.pl-confirm-hdr { background: #da3f94; color: #fff; padding: 16px 20px; font-size: 15px; font-weight: 700; }
.pl-confirm-body { padding: 20px 24px 8px; }
.pl-confirm-body p { font-size: 13px; color: #333; margin: 0 0 12px; line-height: 1.6; }
.pl-confirm-note { background: #f8f8f6; border-left: 3px solid var(--pl-lime); padding: 9px 13px; font-size: 12px;
  color: #555; border-radius: 0 4px 4px 0; margin: 0 0 12px; line-height: 1.5; }
.pl-confirm-foot { padding: 12px 20px; background: #f8f8f6; display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid #eee; }
.pl-confirm-foot button { font: 600 13px var(--pl-font); border-radius: 8px; padding: 9px 18px; cursor: pointer; }
.pl-confirm-cancel { background: #fff; color: #222; border: 1px solid #d4d4d0; }
.pl-confirm-ok { background: #da3f94; color: #fff; border: none; padding: 9px 24px !important; }
.pl-confirm-ok:hover { background: #c4337f; }
.pl-confirm-foot button:focus-visible { outline: 2px solid #811a4f; outline-offset: 2px; }
