/* ============================================================
   Mhleni Support — portal + admin UI styles
   Reuses the Mhleni Projects brand tokens (Design/Branding/tokens).
   Aqua = imagination · Ember = reality · petrol-teal base.
   Vanilla CSS, no build step.
   ============================================================ */
:root {
  --ink: #07181d;
  --ink-2: #0b242b;
  --ink-3: #0f2f38;
  --line: #1d3f47;
  --aqua: #1ee3c0;
  --aqua-deep: #0fbfa3;
  --sky: #46c8f0;
  --ember: #ff8a4c;
  --ember-soft: #ffb487;
  --mist: #bcd3d6;
  --mist-dim: #7d9aa0;
  --paper: #f3f7f6;
  --word: #eafcf8;

  --gradient: linear-gradient(135deg, var(--aqua-deep), var(--sky));

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --maxw: 1100px;

  /* destructive actions (POPIA erase, delete, revoke, refunds) */
  --danger: #7a2230;
  --danger-glow: rgba(122, 34, 48, .08);

  /* semantic status colors shared by the badges AND the analytics charts —
     one entity, one color, everywhere */
  --resolved: #8fe388;
  --urgent: #ff6b6b;

  /* validated categorical palette (fixed order, dark surface #0b242b) — colour
     follows the PRODUCT wherever product is the analytics dimension. Never cycled. */
  --s1: #0d9c85;
  --s2: #c45f2a;
  --s3: #2b7fa8;
  --s4: #99852e;
}

* { box-sizing: border-box; }

/* [hidden] must always win — author display rules (e.g. .btn's inline-flex)
   otherwise override the UA's [hidden]{display:none} and "hidden" leaks. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

/* On-theme scrollbars everywhere (the side menu + any scroll container) - a thin petrol
   thumb on a transparent track, brightening on hover; replaces the OS default light bar. */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--mist-dim); background-clip: padding-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--word);
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(30, 227, 192, .10), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(70, 200, 240, .08), transparent 55%),
    var(--ink);
  background-attachment: fixed;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
a { color: var(--aqua); text-decoration: none; }
a:hover { text-decoration: underline; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--aqua);
  margin: 0 0 .5rem;
}

.muted { color: var(--mist); }
.dim { color: var(--mist-dim); }
.center { text-align: center; }
.mono { font-family: var(--font-mono); }

/* ── Layout ─────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── Admin CRM shell — left sidebar + full-width content (Q104) ──────────
   The admin console uses a fixed left rail on desktop and an off-canvas drawer
   <=768px. Admin page bodies drop the centered max-width cap so content is
   full-width. Member (non-admin) pages keep the .topbar and are unaffected. */
.sidenav {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px; z-index: 40;
  display: flex; flex-direction: column;
  /* A subtle vertical petrol gradient gives the rail depth without competing with content
     (Q147 rail refinement). Falls back to the flat ink-2 where color-mix is unsupported. */
  background: var(--ink-2);
  background: linear-gradient(180deg, var(--ink-2), color-mix(in srgb, var(--ink-2) 72%, var(--ink)));
  border-right: 1px solid var(--line);
  overflow-y: auto; padding: 14px 12px;
}
.sidenav .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; font-weight: 700; color: var(--word); }
.sidenav .brand:hover { text-decoration: none; }
.sidenav .brand svg { width: 30px; height: 30px; flex: 0 0 auto; }
.sidenav .brand .sub { display: block; font-size: .7rem; color: var(--aqua); font-weight: 600; }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav-h { margin: 14px 8px 4px; font-size: .66rem; letter-spacing: .09em; text-transform: uppercase; color: var(--mist-dim); }
.snav-link { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--mist); font-weight: 500; }
.snav-link .navicon { flex: 0 0 auto; opacity: .75; }
.snav-link:hover { background: var(--ink-3); color: var(--word); text-decoration: none; }
.snav-link[aria-current="page"] { background: var(--ink-3); color: var(--aqua); }
.snav-link[aria-current="page"] .navicon { opacity: 1; }
/* Active-state left accent bar (Q147) — the aqua marker the preview locked in. */
.snav-link[aria-current="page"]::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--aqua);
}
/* Live count pill (Q147) — e.g. the Triage backlog. Hidden by default; loadNavCounts()
   reveals it only when the count is > 0. Sits at the row end via margin-left:auto. */
.snav-count {
  margin-left: auto; font-family: var(--font-mono); font-size: .68rem; line-height: 1;
  color: var(--mist-dim); background: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 2px 8px;
}
.snav-link[aria-current="page"] .snav-count { color: var(--aqua); border-color: color-mix(in srgb, var(--aqua) 35%, transparent); }
.snav-foot { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ── "Today" operational strip (Q147) — the staff triage board's operational pulse ──
   Four KPI cards answering: what arrived, what's going stale, what has no owner, what got
   done. The warn card tints ember only when its value is non-zero (server-set class). */
.today-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 4px; }
.today-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 16px;
}
.today-card .today-n { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--word); }
.today-card .today-l { font-size: .82rem; color: var(--mist-dim); line-height: 1.25; }
.today-card .today-sub { display: block; }
.today-card-warn { border-color: color-mix(in srgb, var(--urgent) 45%, var(--line)); }
.today-card-warn .today-n { color: var(--urgent); }
@media (max-width: 640px) { .today-strip { grid-template-columns: 1fr 1fr; } }
.sidenav-toggle, .sidenav-backdrop { display: none; }
.admin-main { margin-left: 240px; min-width: 0; }
.admin-main > .wrap, .admin-main .wrap { max-width: none; }
main.admin-main ~ .bulkbar { left: 240px; }  /* align the fixed bulk bar with the content column */

@media (max-width: 768px) {
  .sidenav {
    transform: translateX(-100%);
    transition: transform .25s var(--ease);
    box-shadow: 2px 0 18px rgba(0, 0, 0, .4);
  }
  .sidenav.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-main .wrap { padding-top: 62px; }
  main.admin-main ~ .bulkbar { left: 0; }
  .sidenav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    position: fixed; top: 12px; left: 12px; z-index: 45; width: 42px; height: 42px;
    background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
    cursor: pointer;
  }
  .sidenav-toggle span { display: block; width: 18px; height: 2px; background: var(--word); margin: 0 auto; border-radius: 2px; }
  .sidenav-backdrop.open { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .5); }
}

header.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 24, 29, .82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; color: var(--word); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; display: block; }
.brand .sub { color: var(--mist-dim); font-weight: 500; font-size: .9rem; }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topbar nav a, .topbar nav button.linklike, .topbar nav .prod-switch > summary {
  color: var(--mist); font-size: .92rem; padding: 8px 12px; border-radius: var(--radius-pill);
  background: none; border: 0; cursor: pointer; font-family: var(--font-body);
}
.topbar nav a:hover, .topbar nav button.linklike:hover, .topbar nav .prod-switch > summary:hover { color: var(--word); background: var(--ink-3); text-decoration: none; }
.topbar nav a[aria-current="page"] { color: var(--aqua); }

/* hamburger toggle — hidden until the mobile breakpoint collapses the nav */
.menu-btn {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 10px; cursor: pointer;
}
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--word); border-radius: 2px; margin: 3px 0; transition: transform .25s var(--ease), opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Mobile: collapse the topbar nav into a dropdown panel behind the hamburger.
   Scoped to .has-menu so single-link auth pages keep their inline nav. */
@media (max-width: 640px) {
  .topbar.has-menu .menu-btn { display: block; }
  .topbar.has-menu nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    margin: 0; padding: 12px 20px 16px;
    background: var(--ink-2); border-bottom: 1px solid var(--line);
  }
  .topbar.has-menu nav.open { display: flex; }
  .topbar.has-menu nav a,
  .topbar.has-menu nav button.linklike { padding: 11px 12px; text-align: left; border-radius: var(--radius-sm); }
  .topbar.has-menu nav #whoami { padding: 8px 12px; }
}

main { padding: 32px 0 80px; }
.stack > * + * { margin-top: 18px; }

/* ── Cards / surfaces ───────────────────────────────────── */
.card {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card.tight { padding: 18px; }
.auth-card { max-width: 440px; margin: 6vh auto 0; }
.split { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .split.cols-2 { grid-template-columns: 320px 1fr; align-items: start; } }

/* ── Forms ──────────────────────────────────────────────── */
.field { display: block; margin-bottom: 16px; }
.field > label { display: block; font-size: .85rem; font-weight: 600; color: var(--word); margin-bottom: 6px; }
.field .hint { font-size: .78rem; color: var(--mist-dim); margin-top: 5px; }
input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: .98rem;
  color: var(--word);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus,
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 2px;
  border-color: var(--aqua);
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mist) 50%), linear-gradient(135deg, var(--mist) 50%, transparent 50%); background-position: calc(100% - 18px) center, calc(100% - 13px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

fieldset { border: 0; margin: 0; padding: 0; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: 11px 20px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer; transition: transform .12s var(--ease), filter .15s var(--ease), background .15s;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--ember); color: #2a0f00; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-aqua { background: var(--aqua); color: #04231d; }
.btn-aqua:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; color: var(--word); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink-2); }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn:active { transform: translateY(1px); }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── Status banners (aria-live) ─────────────────────────── */
.banner { border-radius: var(--radius-sm); padding: 11px 14px; font-size: .9rem; margin-bottom: 16px; border: 1px solid transparent; }
.banner:empty { display: none; }
.banner.ok { background: rgba(30, 227, 192, .12); border-color: rgba(30, 227, 192, .4); color: var(--aqua); }
.banner.err { background: rgba(255, 138, 76, .12); border-color: rgba(255, 138, 76, .45); color: var(--ember-soft); }
.banner.info { background: var(--ink-2); border-color: var(--line); color: var(--mist); }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--ink-2); color: var(--mist); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* status */
.st-new { color: var(--sky); border-color: rgba(70, 200, 240, .45); }
.st-open { color: var(--aqua); border-color: rgba(30, 227, 192, .45); }
.st-pending { color: var(--ember-soft); border-color: rgba(255, 138, 76, .45); }
.st-resolved { color: var(--resolved); border-color: rgba(143, 227, 136, .45); }
.st-closed { color: var(--mist-dim); border-color: var(--line); }
/* priority */
.pr-low { color: var(--mist-dim); }
.pr-normal { color: var(--mist); }
.pr-high { color: var(--ember-soft); border-color: rgba(255, 138, 76, .45); }
.pr-urgent { color: var(--urgent); border-color: rgba(255, 107, 107, .5); }

/* ── Ticket list ────────────────────────────────────────── */
.ticket-list { display: grid; gap: 12px; }
.ticket-row {
  display: block; background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px; transition: border-color .15s, transform .12s var(--ease);
}
a.ticket-row:hover { text-decoration: none; border-color: var(--aqua-deep); transform: translateY(-1px); }
.ticket-row .row-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.ticket-row .subject { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--word); }
.ticket-row .ref { font-family: var(--font-mono); font-size: .78rem; color: var(--mist-dim); }
.ticket-row .meta { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; font-size: .8rem; color: var(--mist-dim); }

/* ── Conversation thread ────────────────────────────────── */
.thread { display: grid; gap: 14px; }
.msg { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--ink-2); }
.msg.from-staff { border-left: 3px solid var(--aqua); }
.msg.from-user { border-left: 3px solid var(--ember); }
.msg.from-system { border-left: 3px solid var(--line); background: transparent; }
.msg.internal { border-left: 3px dashed var(--ember-soft); background: rgba(255, 138, 76, .06); }
.msg .who { font-size: .76rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--mist-dim); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msg .body { white-space: pre-wrap; word-break: break-word; color: var(--word); }
.tag-internal { color: var(--ember-soft); border: 1px solid rgba(255, 138, 76, .5); border-radius: var(--radius-pill); padding: 1px 7px; font-size: .62rem; }
.msg .attachments { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 5px; font-size: .84rem; }
.msg .attachments a { display: inline-flex; align-items: center; gap: 6px; }
.msg .attachments a::before { content: "\1F4CE"; font-size: .9em; } /* paperclip */

/* ── Tables (admin list) ────────────────────────────────── */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.tickets { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 760px; }
table.tickets th, table.tickets td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
table.tickets th { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mist-dim); background: var(--ink-2); position: sticky; top: 0; }
table.tickets tbody tr { cursor: pointer; transition: background .12s; }
table.tickets tbody tr:hover { background: var(--ink-2); }
table.tickets td.ref { font-family: var(--font-mono); color: var(--aqua); }

/* ── Kanban triage board (admin/index.html) ─────────────── */
/* Active columns + a "Resolved & closed" drawer. Drag-and-drop reshapes status;
   every card also carries a keyboard-reachable "Move to…" select (S15 a11y). */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.kanban-col {
  display: flex; flex-direction: column; min-height: 120px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px;
  transition: border-color .15s, background .15s;
}
.kanban-col.drag-over { border-color: var(--aqua); background: var(--ink-3); }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.kanban-col-head h2 { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mist); margin: 0; }
.kanban-count {
  font-family: var(--font-mono); font-size: .7rem; color: var(--mist-dim);
  background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 1px 9px;
}
.kanban-cards { display: grid; gap: 10px; min-height: 60px; align-content: start; flex: 1; }
.kanban-cards:empty::after {
  content: "No tickets"; display: block; text-align: center; color: var(--mist-dim); font-size: .8rem;
  padding: 16px 0; border: 1px dashed var(--line); border-radius: var(--radius-sm);
}

.kanban-card {
  background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px;
  cursor: grab; transition: border-color .15s, transform .12s var(--ease), box-shadow .15s;
}
.kanban-card:hover { border-color: var(--aqua-deep); transform: translateY(-1px); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .5; border-style: dashed; }
.kc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.kc-ref { font-size: .74rem; color: var(--aqua); }
.kc-subject { font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--word); margin: 0 0 8px; line-height: 1.3; word-break: break-word; }
.kc-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .76rem; margin-bottom: 10px; }
.kc-move { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--mist-dim); }
.kc-move select { flex: 1; min-width: 0; font-size: .78rem; padding: 6px 28px 6px 9px; text-transform: none; letter-spacing: normal; }

/* ── Dense card encodings (Q148): priority left edge, age dot, assignee avatar ──────── */
.kanban-card { padding-left: 15px; } /* room for the priority edge */
.kanban-card::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--line);
}
.kanban-card[data-priority="urgent"]::before { background: var(--urgent); }
.kanban-card[data-priority="high"]::before { background: var(--ember-soft); }
.kanban-card[data-priority="low"]::before { background: var(--mist-dim); }
.kc-age { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: .68rem; color: var(--mist-dim); }
.kc-age-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--resolved); flex: 0 0 auto; }
.kc-age-old .kc-age-dot { background: var(--ember-soft); }
.kc-age-stale .kc-age-dot { background: var(--urgent); }
.kc-avatar {
  margin-left: auto; width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: .58rem; font-weight: 700;
  color: var(--mist); background: var(--ink-2); border: 1px solid var(--line);
}
.kc-avatar-me { background: var(--gradient); color: var(--ink); border: 0; }
.kc-avatar-none { color: var(--mist-dim); }

/* ── Queue chips (Q148): one-tap preset filters with live counts ────────────────────── */
.queue-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2px; }
.qchip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: inherit;
  font-size: .8rem; color: var(--mist); background: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 6px 13px;
  transition: border-color .15s, color .15s;
}
.qchip:hover { border-color: var(--aqua-deep); color: var(--word); }
.qchip.on { border-color: var(--aqua); color: var(--aqua); background: rgba(30, 227, 192, .07); }
.qchip b { font-family: var(--font-mono); font-weight: 600; font-size: .72rem; }
.qchip-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }

/* ── Fast-focus command bar (Q148): the Ctrl-K hint on the board search ─────────────── */
.cmdk { position: relative; display: flex; align-items: center; }
.cmdk input[type="search"] { width: 100%; padding-right: 58px; }
.cmdk-hint {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .04em; color: var(--mist-dim);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; background: var(--ink-3);
}

/* The done-states drawer (collapsed by default) reuses the FAQ <details> idiom. */
.kanban-drawer { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--ink-2); }
.kanban-drawer > summary {
  cursor: pointer; padding: 14px 16px; list-style: none;
  font-family: var(--font-display); font-weight: 600; color: var(--word);
  display: flex; align-items: center; gap: 12px;
}
.kanban-drawer > summary::-webkit-details-marker { display: none; }
.kanban-drawer > summary::after { content: "+"; color: var(--aqua); font-size: 1.2rem; line-height: 1; margin-left: auto; }
.kanban-drawer[open] > summary::after { content: "\2212"; } /* minus */
.kanban-drawer[open] > summary { border-bottom: 1px solid var(--line); }
.kanban-drawer .kanban { padding: 14px; grid-auto-columns: minmax(0, 1fr); }

/* Mobile: columns scroll horizontally (drag-drop is desktop-only; the Move select
   keeps the board fully usable on touch). */
@media (max-width: 640px) {
  .kanban { grid-auto-columns: 82%; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
  .kanban-col { scroll-snap-align: start; }
  .kanban-drawer .kanban { grid-auto-columns: 82%; }
}

/* ── Bulk select mode + action bar (Slice 2) ────────────── */
/* The select-toggle row reuses the shared .row-between layout. */
#selectToggle[aria-pressed="true"] { border-color: var(--aqua); color: var(--aqua); }

/* The per-card checkbox is hidden until the board is in select mode. */
.kanban-card { position: relative; }
.kc-check { display: none; position: absolute; top: 8px; right: 8px; margin: 0; }
.kc-check-box { width: 18px; height: 18px; accent-color: var(--aqua); cursor: pointer; }
#region.selecting .kc-check { display: block; }
#region.selecting .kc-move { display: none; }            /* the single-move control is inert while selecting */
#region.selecting .kanban-card { cursor: pointer; }
#region.selecting .kanban-card:has(.kc-check-box:checked) { border-color: var(--aqua); background: var(--ink-2); }
#region.selecting { padding-bottom: 96px; }              /* clear the fixed bar */

.bulkbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--ink-2); border-top: 1px solid var(--aqua-deep); box-shadow: 0 -8px 24px rgba(0,0,0,.35); }
.bulkbar-inner { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 12px 0; }
.bulkbar .field { margin-bottom: 0; }
.bulkbar label { font-size: .72rem; }
.bulkbar-count { font-family: var(--font-mono); font-size: .82rem; color: var(--aqua); align-self: center; white-space: nowrap; }
@media (max-width: 640px) { .bulkbar-inner { gap: 8px; } .bulkbar .field { flex: 1 1 44%; } }

/* ── Filters ────────────────────────────────────────────── */
.filters { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .filters { grid-template-columns: 1fr 1fr 1.6fr auto; align-items: end; } }
.filters .field { margin-bottom: 0; }
.filters label { font-size: .72rem; }

/* ── States: loading / empty / error ────────────────────── */
.state { text-align: center; padding: 48px 20px; color: var(--mist-dim); border: 1px dashed var(--line); border-radius: var(--radius); }
.state .icon { font-size: 1.8rem; margin-bottom: 8px; }
.spinner { display: inline-block; width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--aqua); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--ink-3) 25%, var(--ink-2) 50%, var(--ink-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius-sm); height: 78px; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ── Misc ───────────────────────────────────────────────── */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.back-link { font-size: .85rem; color: var(--mist); display: inline-flex; gap: 6px; align-items: center; margin-bottom: 14px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.consent { font-size: .8rem; color: var(--mist-dim); background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; }
.consent a { color: var(--aqua); }
footer.foot { border-top: 1px solid var(--line); padding: 24px 0; color: var(--mist-dim); font-size: .82rem; }
footer.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ── Analytics tiles (Client Hub C4) — reuse .card surface + brand tokens ── */
.grid-tiles { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-tiles { grid-template-columns: repeat(4, 1fr); } }
.grid-tiles > * { min-width: 0; } /* long tile values shrink instead of blowing out the grid */
.tile { text-align: left; }
.tile-num { font-size: 1.7rem; font-weight: 700; color: var(--aqua); line-height: 1.1; word-break: break-word; }
.tile-label { font-size: .82rem; margin-top: 4px; }

/* ── Audit-log meta expansion (Client Hub C4) ── */
.meta-toggle { font-size: .8rem; color: var(--aqua); background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font-body); }
.meta-toggle:hover { text-decoration: underline; }
pre.meta-json { margin: 8px 0 0; padding: 10px 12px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--mist); font-family: var(--font-mono); font-size: .78rem; white-space: pre-wrap; word-break: break-word; max-width: 520px; }

/* visually-hidden but available to screen readers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Role badge (shared auth shell — MS.userMenu) ───────────── */
.role-badge {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  color: var(--aqua); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 3px 10px; background: var(--ink-3);
}

/* ── Cross-product switcher (shared auth shell — MS.productSwitcher) ── */
/* The summary reuses the .topbar nav-link pill styling (selector group above); only
   the icon+label layout, the marker reset, and the open-state are switcher-specific. */
.prod-switch { position: relative; display: inline-block; }
.topbar nav .prod-switch > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.prod-switch > summary::-webkit-details-marker { display: none; }
.topbar nav .prod-switch[open] > summary { color: var(--word); background: var(--ink-3); }
.prod-switch-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 230px;
  display: grid; gap: 2px; padding: 8px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .4);
}
.prod-switch-head {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mist-dim); margin: 2px 0 4px; padding: 0 10px;
}
.prod-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 10px; border-radius: var(--radius-sm); color: var(--mist); font-size: .92rem;
}
a.prod-item:hover { background: var(--ink-3); color: var(--word); text-decoration: none; }
.prod-item.current { color: var(--word); }
.prod-item .prod-name { font-weight: 500; }
.prod-item .prod-tag {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .03em;
  color: var(--aqua); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 2px 8px; white-space: nowrap;
}
.prod-item.current .prod-tag { color: var(--mist-dim); }

/* Mobile: inside the collapsed nav panel the dropdown renders inline (full width),
   so it never overflows the viewport. Mirrors the .topbar.has-menu collapse. */
@media (max-width: 640px) {
  .topbar.has-menu .prod-switch { display: block; }
  .topbar.has-menu .prod-switch > summary { padding: 11px 12px; border-radius: var(--radius-sm); }
  .topbar.has-menu .prod-switch-menu {
    position: static; min-width: 0; margin-top: 4px; box-shadow: none;
  }
}

/* ── Public landing (index.html) + client dashboard (app.html) ── */
.hero { padding: 28px 0 8px; max-width: 640px; }
.hero .brand { font-size: 1.3rem; margin-bottom: 18px; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin-bottom: .35em; }
.hero .lead { font-size: 1.05rem; color: var(--mist); margin-bottom: 1.4rem; }

/* FAQ accordion (semantic <details>/<summary>) */
.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--ink-3); padding: 0 16px;
}
.faq summary {
  cursor: pointer; padding: 14px 0; font-family: var(--font-display);
  font-weight: 600; color: var(--word); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--aqua); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; } /* minus */
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details > p { color: var(--mist); margin: 0; padding: 12px 0 16px; }

/* Status pill — pings /health */
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .9rem; color: var(--mist);
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 7px 14px; background: var(--ink-3);
}
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mist-dim); }
.status-pill.ok .dot { background: var(--aqua); }
.status-pill.down .dot { background: var(--ember); }
.status-pill.ok { color: var(--aqua); }
.status-pill.down { color: var(--ember-soft); }

/* ── Announcement banners (MS.announcementBanner) ───────────────────────── */
.ann-stack > * + * { margin-top: 10px; }
.ann {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--line); border-left: 3px solid var(--aqua);
  border-radius: var(--radius-sm); background: var(--ink-3);
  padding: 12px 14px; font-size: .92rem; color: var(--mist);
}
.ann-incident { border-left-color: var(--ember); }
.ann-promo { border-left-color: var(--sky, #46c8f0); }
.ann-body { flex: 1; min-width: 0; }
.ann-body strong { color: var(--word); }
.ann-cta { white-space: nowrap; }
.ann-x {
  background: none; border: 0; color: var(--mist-dim); cursor: pointer;
  font-size: 1.2rem; line-height: 1; padding: 0 2px; flex: 0 0 auto;
}
.ann-x:hover { color: var(--word); }

/* ── Status board (status.html) — component health rows ─────────────────── */
.health-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.health-row:last-child { border-bottom: 0; }
.health-name { font-family: var(--font-display); font-weight: 600; color: var(--word); }
.health-state {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
}
.health-state .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mist-dim); }
.health-state.operational { color: var(--aqua); }
.health-state.operational .dot { background: var(--aqua); }
.health-state.degraded { color: var(--ember-soft); }
.health-state.degraded .dot { background: var(--ember); }
.health-state.down { color: var(--ember-soft); }
.health-state.down .dot { background: var(--ember); }

/* text-style action button (table row actions, Sign out, Clear) — the topbar
   nav variant overrides this with its own pill styling (more specific rule) */
button.linklike {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--aqua); font-family: var(--font-body); font-size: .88rem;
}
button.linklike:hover { text-decoration: underline; }

/* ── Utilities (Q122) — replace the worst inline-style duplication ──────── */
.m0 { margin: 0; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.text-xs { font-size: .78rem; }
.num { text-align: right; }
.nowrap { white-space: nowrap; }
.h-sm { font-size: 1rem; margin: 0; }
/* card kicker — the small mono uppercase section label inside a card */
.kicker { font-size: .85rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--mist-dim); margin: 0 0 8px; }

/* checkboxes/radios are content-sized, never full-width form controls */
input[type="checkbox"], input[type="radio"] { width: auto; }
.check-row { display: flex; gap: 9px; align-items: center; cursor: pointer; }

/* ── Danger zone (destructive actions) ──────────────────────────────────── */
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(1.15); }
.card.danger { border-color: var(--danger); background: var(--danger-glow); }
.card.danger .kicker { color: var(--ember); }
.card.danger p { font-size: .82rem; line-height: 1.7; margin: 0 0 10px; }

/* ── Form accordion (compose/edit forms collapsed behind a summary) ─────── */
/* The shared expandable idiom for in-page compose forms (admin plans /
   announcements / KB / notices / staff, member account). Extends the native
   <details>/<summary> pattern (.faq / .kanban-drawer) — keyboard accessible
   for free. Put the form/body inside with class .fa-body. */
details.form-accordion { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-3); }
details.form-accordion > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 14px 22px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--word);
}
details.form-accordion > summary::-webkit-details-marker { display: none; }
details.form-accordion > summary::after { content: "+"; color: var(--aqua); font-size: 1.3rem; line-height: 1; margin-left: auto; }
details.form-accordion[open] > summary::after { content: "\2212"; } /* minus */
details.form-accordion[open] > summary { border-bottom: 1px solid var(--line); }
details.form-accordion > .fa-body { padding: 20px 22px 22px; }
details.form-accordion.danger { border-color: var(--danger); }

/* per-key rows inside an accordion body (admin settings console) */
.setting { padding: 14px 0; border-top: 1px solid var(--line); }
.fa-body .setting:first-child { border-top: 0; padding-top: 0; }

/* ── Responsive stacked tables (<=640px) ────────────────────────────────── */
/* The ONE shared strategy for wide admin tables on small screens: add
   .stack-sm to a table.tickets and data-label="Col" to each td. The header
   row hides and every row renders as a labelled card. Tables where stacking
   doesn't fit keep the .table-scroll horizontal-scroll fallback alone. */
@media (max-width: 640px) {
  table.tickets.stack-sm { min-width: 0; }
  table.tickets.stack-sm thead { display: none; }
  table.tickets.stack-sm tbody tr { display: block; padding: 8px 14px; }
  table.tickets.stack-sm tbody tr + tr { border-top: 1px solid var(--line); }
  table.tickets.stack-sm td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
    padding: 5px 0; border-bottom: 0; text-align: right;
  }
  table.tickets.stack-sm td[data-label]::before {
    content: attr(data-label);
    font-family: var(--font-mono); font-size: .66rem; letter-spacing: .07em;
    text-transform: uppercase; color: var(--mist-dim); text-align: left; flex: 0 0 auto;
  }
}

/* ── KB article body (.prose — staff-authored markdown subset) ──────────── */
.prose { line-height: 1.7; }
.prose h1, .prose h2, .prose h3 { margin: 1.3em 0 .45em; }
.prose h1:first-child, .prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose ul { margin: 0 0 1em; padding-left: 1.3rem; }
.prose li { margin: .3em 0; }
.prose a { text-decoration: underline; }

/* ── Wide-screen CRM layout helpers ─────────────────────────────────────── */
.cols-lg-2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .cols-lg-2 { grid-template-columns: 1fr 1fr; align-items: start; } }
@media (min-width: 1280px) { .grid-tiles.wide { grid-template-columns: repeat(8, 1fr); } }

/* ── Charts (admin analytics) — inline SVG built by MS.chart ────────────── */
.chart-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .chart-grid { grid-template-columns: 1fr 1fr; } }
.chart svg { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: .78rem; color: var(--mist); }
.chart-legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* ── Q149 hybrid analytics: section heads, KPI strip, donut/gauge/heat ──────── */
.analytics-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.range-slicer { display: inline-flex; align-items: center; gap: 6px; }
.range-slicer .rs-l { font-size: .72rem; margin-right: 2px; }
.rs-btn { font-family: var(--font-mono); font-size: .72rem; color: var(--mist); background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 5px 12px; cursor: pointer; transition: background .15s var(--ease), color .15s, border-color .15s; }
.rs-btn:hover { color: var(--word); border-color: var(--mist-dim); }
.rs-btn.on { background: var(--aqua); color: var(--ink); border-color: var(--aqua); font-weight: 600; }
.sec-head { display: flex; align-items: center; gap: 12px; margin: 28px 0 14px; }
.sec-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; margin: 0; }
.sec-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-head .k { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--aqua); white-space: nowrap; }

.kpi-strip { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
@media (min-width: 860px) { .kpi-strip { grid-template-columns: repeat(4, 1fr); } }
.kpi { min-width: 0; }
.kpi-l { font-size: .74rem; display: block; }
.kpi-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.kpi-n { font-family: var(--font-display); font-weight: 800; font-size: 1.85rem; line-height: 1.1; color: var(--word); word-break: break-word; }
.delta { font-family: var(--font-mono); font-size: .68rem; font-weight: 600; white-space: nowrap; }
.delta.good { color: var(--resolved); }
.delta.bad { color: var(--urgent); }
.delta.flat { color: var(--mist-dim); }
.spark { display: block; width: 100%; height: 24px; margin-top: 8px; }

/* The "Where tickets stand" + "Time to close" card: donut in the top half, the gauge
   fills the lower half and centres there (so a grid-stretched card never floats the gauge). */
.ops-stand { display: flex; flex-direction: column; }
.ops-stand .stand-half:first-child { flex: 0 0 auto; }
.ops-stand .stand-gauge { flex: 1 1 auto; display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.ops-stand .stand-gauge-fig { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; margin-top: 6px; }
.donut-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.donut { flex: none; }
.d-legend { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: .84rem; color: var(--mist); }
.d-legend li { display: flex; align-items: center; gap: 8px; }
.d-legend .sw { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.d-legend b { margin-left: auto; color: var(--word); padding-left: 10px; }

.heat { display: block; width: 100%; height: auto; margin-top: 8px; }
.heat-scale { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .72rem; color: var(--mist-dim); }
.heat-scale .s { width: 16px; height: 9px; border-radius: 2px; }
.gauge { margin-top: 6px; }

/* ── List-row button (mailbox inbox rows) ───────────────────────────────── */
button.list-row {
  display: block; width: 100%; text-align: left; padding: 12px 0;
  border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer;
  color: inherit; font: inherit;
}

/* comfortable tap targets on touch screens */
@media (max-width: 640px) {
  .btn { min-height: 44px; }
  button.linklike { padding: 6px 4px; }
}

/* ══ Landing help console (public index hero, Q154) ═════════════════════════ */
.help-hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: start;
  padding: 22px 0 10px;
}
.help-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.06; letter-spacing: -.02em;
  margin: .28em 0 .3em;
}
.help-hero h1 em {
  font-style: normal; background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.help-hero .lead { color: var(--mist); font-size: 1.02rem; max-width: 46ch; margin: 0 0 20px; }
.search { position: relative; max-width: 520px; }
.search input {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-2);
  color: var(--word); font: inherit; font-size: 1rem; padding: 16px 54px 16px 18px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(30, 227, 192, .15); }
.search input::placeholder { color: var(--mist-dim); }
.search .go {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 10px; border: 0;
  background: var(--aqua); color: var(--ink); font-size: 1.05rem; cursor: pointer;
}
.search .go:hover { filter: brightness(1.07); }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.quick a {
  font-size: .8rem; color: var(--mist); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 6px 13px; background: rgba(15, 47, 56, .4);
}
.quick a:hover { border-color: var(--aqua); color: var(--aqua); text-decoration: none; }
.path-cards { display: grid; gap: 12px; }
.path {
  display: flex; gap: 15px; align-items: flex-start; background: var(--ink-2);
  border: 1px solid var(--line); border-radius: 14px; padding: 17px 18px; color: inherit;
  transition: border-color .2s, transform .2s var(--ease);
}
.path:hover { border-color: rgba(30, 227, 192, .45); transform: translateY(-2px); text-decoration: none; }
.path .ic {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center;
  background: rgba(30, 227, 192, .1); color: var(--aqua);
}
.path .ic.e { background: rgba(255, 138, 76, .1); color: var(--ember); }
.path .ic svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.path h3 { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; margin: 0 0 3px; }
.path p { font-size: .82rem; color: var(--mist-dim); margin: 0; }
.status-line {
  display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--mist);
  border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 9px 18px;
  background: rgba(15, 47, 56, .35); width: fit-content;
}
.status-line .d { width: 8px; height: 8px; border-radius: 50%; background: var(--mist-dim); flex: none; }
.status-line.ok .d { background: var(--resolved); }
.status-line.down .d { background: var(--ember); }
.status-line a { color: var(--aqua); }
@media (prefers-reduced-motion: no-preference) {
  .status-line.ok .d { animation: pulse-dot 2.6s ease-in-out infinite; }
  @keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
}
@media (max-width: 880px) { .help-hero { grid-template-columns: 1fr; gap: 26px; } }

/* ══ Member dashboard: warm ledger (Q154) ══════════════════════════════════ */
.dash-sum { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.dash-sum .sum { color: var(--mist); font-size: 1rem; margin: 0; max-width: 56ch; }
.dash-sum .sum b { color: var(--word); }
.segbar .bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--ink-3); }
.segbar .bar > div { height: 100%; }
.segbar .legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: .82rem; color: var(--mist); }
.segbar .li { display: flex; align-items: center; gap: 7px; }
.segbar .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.timeline { border-left: 2px solid var(--line); padding-left: 22px; }
.tl-item { position: relative; padding: 0 0 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .d { position: absolute; left: -29px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--ink); }
.tl-item .when { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; color: var(--mist-dim); text-transform: uppercase; }
.tl-item h4 { font-size: .97rem; font-weight: 600; margin: 3px 0 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-item h4 a { color: var(--word); }
.tl-item h4 a:hover { color: var(--aqua); text-decoration: none; }
.tl-item p { font-size: .82rem; color: var(--mist-dim); margin: 0; }
.tl-item .ref { font-family: var(--font-mono); font-size: .72rem; color: var(--mist-dim); }
.spot {
  background: var(--ink-2); border: 1px solid rgba(255, 138, 76, .5); border-radius: 16px;
  padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  flex-wrap: wrap; box-shadow: 0 14px 40px rgba(255, 138, 76, .06);
}
.spot .k { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ember); }
.spot h3 { font-size: 1.1rem; font-weight: 700; margin: 6px 0 3px; }
.spot p { margin: 0; font-size: .84rem; color: var(--mist); }
.sub-card {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(15, 191, 163, .12), rgba(70, 200, 240, .07)), var(--ink-2);
  border: 1px solid rgba(30, 227, 192, .3); border-radius: 16px; padding: 18px 20px;
}
.sub-card .plan { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.sub-card .d { font-size: .82rem; color: var(--mist); margin-top: 3px; }
@media (max-width: 640px) {
  .spot, .sub-card { flex-direction: column; align-items: flex-start; }
}
