/* =========================================================================
   Counselor CE Hub — self-contained design system
   -------------------------------------------------------------------------
   Tokens are COPIED from counselor-editorial's system (itself synced from
   counselor-divi-child v2.6.0), so the CE Hub and editorial dashboards read
   as one product. A theme change must not alter how this looks.

   THREE DASHBOARDS, ONE LANGUAGE. Member, employer and staff chrome share
   the masthead and tokens; each section carries its own accent so the eye
   always knows which world it is in:
     member    blue      (the magazine's working blue)
     employer  warm      (the print warm orange)
     admin     green     (operational)
   ========================================================================= */

:root,
.cchub {
  --cchub-navy-deep: #0a1624;
  --cchub-navy:      #16283a;
  --cchub-ink:       #17293b;
  --cchub-blue-dark: #17527f;
  --cchub-blue:      #2371b1;
  --cchub-blue-light:#3390d6;
  --cchub-body:      #33465a;
  --cchub-slate:     #46586b;
  --cchub-muted:     #5a6b7d;
  --cchub-line:      #d5dde6;
  --cchub-line-soft: #e6ecf3;
  --cchub-bg:        #f7f9fc;
  --cchub-card:      #ffffff;
  --cchub-warm:      #d97544;

  --cchub-r-sm: 10px;
  --cchub-r-md: 12px;
  --cchub-r-lg: 18px;

  --cchub-shadow-sm: 0 4px 14px rgba(6,18,32,.07);
  --cchub-shadow-md: 0 14px 34px rgba(6,18,32,.10), 0 2px 8px rgba(6,18,32,.06);
  --cchub-focus-ring: 0 0 0 4px rgba(35,113,177,.16);

  --cchub-sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --cchub-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;

  --cchub-ok:      #1c7c54;
  --cchub-ok-bg:   #e7f4ee;
  --cchub-warn:    #a86b16;
  --cchub-warn-bg: #fdf3e2;
  --cchub-late:    #b3261e;
  --cchub-late-bg: #fdecea;

  /* Section accent — member default; the body class overrides it. */
  --cchub-accent: var(--cchub-blue-light);
}
body.cchub-section-employer { --cchub-accent: var(--cchub-warm); }
body.cchub-section-admin    { --cchub-accent: #4f9e58; }

/* --- reset (the theme's normalize is not on these pages) ---------------- */
.cchub *, .cchub *::before, .cchub *::after { box-sizing: border-box; }
body.cchub {
  margin: 0;
  background: var(--cchub-bg);
  color: var(--cchub-body);
  font-family: var(--cchub-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.cchub img { max-width: 100%; height: auto; display: block; }
.cchub table { border-collapse: collapse; width: 100%; }
.cchub a { color: var(--cchub-blue-dark); text-decoration: none; }
.cchub a:hover { text-decoration: underline; }
.cchub h1, .cchub h2, .cchub h3, .cchub h4 {
  font-family: var(--cchub-serif);
  color: var(--cchub-ink);
  line-height: 1.2;
  margin: 0 0 .4em;
  font-weight: 600;
}
.cchub h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); }
.cchub h2 { font-size: clamp(1.15rem, 1.02rem + .5vw, 1.4rem); }
.cchub h3 { font-size: 1.05rem; }
.cchub p { margin: 0 0 1em; }
.cchub :focus-visible { outline: none; box-shadow: var(--cchub-focus-ring); border-radius: 6px; }
.cchub code { background: var(--cchub-line-soft); padding: .1em .4em; border-radius: 6px; font-size: .9em; }
.cchub-muted { color: var(--cchub-muted); }

/* The admin-bar stylesheet still forces html{margin-top:32px} even though
   the bar itself is hidden here — that left a white strip above the masthead. */
html { margin-top: 0 !important; }
body.cchub { padding-top: 0 !important; }

/* --- masthead ------------------------------------------------------------
   A quiet band above the nav: the magazine's logo, which dashboard this is,
   and a hairline of the twelve print section colours. Same band as the
   editorial dashboard — the two tools read as one product. */
.cchub-header { position: relative; z-index: 500; }
.cchub-masthead {
  background: linear-gradient(180deg, #0b1a2c 0%, var(--cchub-navy-deep) 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: #fff;
}
.cchub-masthead__in {
  /* Larry: slightly more breathing room above and below — not too much. */
  max-width: 1320px; margin: 0 auto; padding: 22px 20px 21px;
  display: flex; align-items: center; gap: 20px;
}
.cchub-brand { display: flex; align-items: center; gap: 14px; color: #fff; flex: none; }
.cchub-brand:hover { text-decoration: none; }
.cchub .cchub-brand__logo { height: 32px; width: auto; max-width: 300px; display: block; flex: none; }
.cchub-brand__rule { width: 1px; height: 20px; background: rgba(255,255,255,.22); display: block; }
.cchub-brand__sub {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .22em;
  color: #8fb4d6; font-weight: 600; white-space: nowrap;
}
.cchub-masthead__user {
  margin-left: auto; display: flex; align-items: center; gap: 14px;
  font-size: .82rem; color: #9fbdd8; flex-wrap: wrap; justify-content: flex-end;
}
.cchub-masthead__user a { color: #9fbdd8; }
.cchub-masthead__user a:hover { color: #fff; text-decoration: none; }
.cchub-masthead__switch {
  border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  padding: 3px 12px; font-weight: 600; white-space: nowrap;
}
.cchub-masthead__switch:hover { border-color: rgba(255,255,255,.5); }
.cchub-masthead__hello { color: #dbe8f4; }

/* The twelve print section colours, as a 3px rule. */
.cchub-spectrum { display: flex; height: 3px; }
.cchub-spectrum i { flex: 1 1 0; display: block; }

/* --- nav band ------------------------------------------------------------ */
.cchub-navbar {
  position: sticky; top: 0; z-index: 490;
  background: var(--cchub-navy);
  box-shadow: var(--cchub-shadow-sm);
}
.cchub-navbar__in {
  max-width: 1320px; margin: 0 auto; padding: 0 20px;
  min-height: 50px; display: flex; align-items: center; gap: 16px;
}
.cchub-nav { display: flex; gap: 2px; flex: 1 1 auto; flex-wrap: wrap; }
.cchub-nav a {
  color: #c9dcec; padding: 8px 13px; border-radius: 8px;
  font-size: .88rem; font-weight: 500; white-space: nowrap;
}
.cchub-nav a:hover { background: rgba(255,255,255,.09); color: #fff; text-decoration: none; }
.cchub-nav a[aria-current="page"] {
  background: rgba(255,255,255,.10); color: #fff;
  box-shadow: inset 0 -3px 0 var(--cchub-accent);
}
.cchub-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

/* --- layout ------------------------------------------------------------- */
.cchub-main { max-width: 1320px; margin: 0 auto; padding: 26px 20px 64px; }
.cchub-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-bottom: 18px;
}
.cchub-card {
  background: var(--cchub-card);
  border: 1px solid var(--cchub-line-soft);
  border-radius: var(--cchub-r-lg);
  box-shadow: var(--cchub-shadow-sm);
  padding: 20px 22px;
  margin-bottom: 20px;
  overflow-x: auto; /* a dense staff table scrolls inside its card rather than escaping it */
}
.cchub-footer { border-top: 1px solid var(--cchub-line-soft); background: #fff; }
.cchub-footer__inner {
  max-width: 1320px; margin: 0 auto; padding: 16px 20px;
  display: flex; justify-content: space-between; gap: 12px;
  color: var(--cchub-muted); font-size: .8rem;
}
.cchub-footer__version { font-variant-numeric: tabular-nums; }

/* --- page head ----------------------------------------------------------- */
.cchub-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 20px; }
.cchub-pagehead h1 { margin: 0; }
.cchub-pagehead__meta { color: var(--cchub-muted); font-size: .9rem; margin-left: auto; }
.cchub-eyebrow {
  text-transform: uppercase; letter-spacing: .13em; font-size: .68rem;
  font-weight: 700; color: var(--cchub-blue); margin: 0 0 4px;
}

/* --- stats -------------------------------------------------------------- */
.cchub-stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0 0 22px; }
.cchub-stat {
  background: var(--cchub-card); border: 1px solid var(--cchub-line-soft);
  border-radius: var(--cchub-r-md); box-shadow: var(--cchub-shadow-sm);
  padding: 15px 17px; display: flex; flex-direction: column; gap: 2px;
}
.cchub-stat__n { font-family: var(--cchub-serif); font-size: 1.9rem; color: var(--cchub-ink); line-height: 1.05; font-weight: 600; }
.cchub-stat__label { font-size: .76rem; color: var(--cchub-muted); text-transform: uppercase; letter-spacing: .07em; margin-top: 3px; }

/* --- tables ------------------------------------------------------------- */
.cchub-table th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--cchub-muted); font-weight: 700; padding: 11px 12px; background: #fbfdff;
  border-bottom: 1px solid var(--cchub-line);
}
.cchub-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--cchub-line-soft);
  font-size: .9rem; vertical-align: middle;
}
/* Dense control columns: keep each row's checkbox cluster on one tight line. */
.cchub-table .cchub-inline-form { flex-wrap: wrap; row-gap: 4px; }
.cchub-table input[type=text] { max-width: 190px; }
.cchub-table tr:last-child td { border-bottom: 0; }
.cchub-table tbody tr:hover { background: #fbfdff; }
.cchub-table tfoot th { border-top: 2px solid var(--cchub-line); border-bottom: none; }
.cchub-table--kv td:first-child { color: var(--cchub-muted); width: 38%; }
.cchub-t-title { font-weight: 600; color: var(--cchub-ink); }
.cchub-t-sub { color: var(--cchub-muted); font-size: .84rem; }
.cchub-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Course cell in the catalog: thumbnail beside the name, never above it. */
.cchub-course-cell { display: flex; align-items: flex-start; gap: 12px; min-width: 260px; }
.cchub-course-cell .cchub-course-thumb {
  flex: none; width: 64px; height: 40px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--cchub-line-soft); background: var(--cchub-line-soft);
}
.cchub-course-cell__body { min-width: 0; }
.cchub-course-cell__name { font-weight: 600; color: var(--cchub-ink); line-height: 1.35; }
.cchub-course-cell__sub { color: var(--cchub-muted); font-size: .8rem; margin-top: 2px; }

/* --- pills, notices ----------------------------------------------------- */
.cchub-pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  background: var(--cchub-line-soft); color: var(--cchub-slate);
  vertical-align: middle;
}
td .cchub-pill, h1 .cchub-pill { margin-left: 6px; }
.cchub-pill--ok   { background: var(--cchub-ok-bg);   color: var(--cchub-ok); }
.cchub-pill--warn { background: var(--cchub-warn-bg); color: var(--cchub-warn); }
.cchub-pill--late { background: var(--cchub-late-bg); color: var(--cchub-late); }
.cchub-pill--muted{ background: var(--cchub-line-soft); color: var(--cchub-muted); }
.cchub-pill--blue { background: #e8f1fa; color: var(--cchub-blue-dark); }
.cchub-pill--wcc    { background: #e3edf6; color: var(--cchub-blue-dark); }
.cchub-pill--intuto { background: #efe7f6; color: #6b3fa0; }
.cchub-notice {
  border-left: 4px solid var(--cchub-blue); background: #f0f6fc;
  padding: 13px 17px; border-radius: 0 var(--cchub-r-sm) var(--cchub-r-sm) 0;
  margin: 0 0 20px; font-size: .95rem;
}
.cchub-notice--ok   { border-left-color: var(--cchub-ok);   background: var(--cchub-ok-bg);   color: var(--cchub-ok); }
.cchub-notice--warn { border-left-color: var(--cchub-warn); background: var(--cchub-warn-bg); color: var(--cchub-warn); }

/* --- forms + buttons ---------------------------------------------------- */
.cchub-form { display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.cchub-form--row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; max-width: none; }
.cchub-form label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--cchub-muted); font-weight: 700;
}
.cchub-form input, .cchub-form select, .cchub-form textarea,
.cchub-inline-form input, .cchub-inline-form select {
  font: inherit; font-size: .92rem; text-transform: none; letter-spacing: normal;
  font-weight: 400; color: var(--cchub-ink);
  border: 1px solid var(--cchub-line); border-radius: var(--cchub-r-sm);
  padding: 8px 12px; background: #fff;
}
.cchub-form input:focus, .cchub-form select:focus, .cchub-form textarea:focus,
.cchub-inline-form input:focus, .cchub-inline-form select:focus {
  outline: none; border-color: var(--cchub-blue); box-shadow: var(--cchub-focus-ring);
}
.cchub-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--cchub-blue); color: #fff; border: 1px solid var(--cchub-blue);
  border-radius: 9px; padding: 8px 15px;
  font: inherit; font-size: .88rem; font-weight: 600;
  text-transform: none; letter-spacing: normal;
  align-self: flex-start; white-space: nowrap;
}
.cchub-btn:hover { background: var(--cchub-blue-dark); border-color: var(--cchub-blue-dark); color: #fff; text-decoration: none; }
/* Specificity fix: `.cchub a` is (0,1,1) and outranked `.cchub-btn` (0,1,0),
   so link-buttons rendered dark text on the dark blue background. */
.cchub a.cchub-btn { color: #fff; }
.cchub a.cchub-btn:hover { color: #fff; text-decoration: none; }
.cchub a.cchub-btn--ghost { color: var(--cchub-blue-dark); }
.cchub a.cchub-btn--ghost:hover { color: var(--cchub-blue-dark); }
.cchub a.cchub-btn--danger { color: var(--cchub-late); }
.cchub a.cchub-btn--danger:hover { color: var(--cchub-late); }
.cchub-btn:disabled { opacity: .6; cursor: default; }
.cchub-btn--sm { padding: 5px 12px; font-size: .8rem; border-radius: 7px; }
.cchub-btn--ghost { background: #fff; color: var(--cchub-blue-dark); border-color: var(--cchub-line); }
.cchub-btn--ghost:hover { background: #f2f7fc; color: var(--cchub-blue-dark); border-color: var(--cchub-line); }
.cchub-btn--danger { background: #fff; color: var(--cchub-late); border-color: var(--cchub-line); }
.cchub-btn--danger:hover { background: var(--cchub-late-bg); color: var(--cchub-late); border-color: var(--cchub-late); }
.cchub-inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.cchub-inline-form + .cchub-inline-form { margin-top: 6px; }
.cchub-list { margin: 0; padding-left: 1.2em; }
.cchub-list li { margin: .3em 0; }

/* Checkbox rows: normal-weight labels on one line. */
.cchub-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .88rem; color: var(--cchub-body); font-weight: 400;
  text-transform: none; letter-spacing: normal; white-space: nowrap;
}
.cchub-check input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--cchub-blue); margin: 0; }
.cchub-check-group { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .84rem; color: var(--cchub-muted); }

/* Stacked action cells: keep per-row control clusters tight and aligned. */
.cchub-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cchub-actions--col { flex-direction: column; align-items: flex-start; }

/* --- pager --------------------------------------------------------------- */
.cchub-pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 16px; font-size: .88rem; }
.cchub-pager a, .cchub-pager span {
  display: inline-block; min-width: 34px; text-align: center;
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--cchub-line);
  background: #fff; color: var(--cchub-blue-dark); font-variant-numeric: tabular-nums;
}
.cchub-pager a:hover { background: #f2f7fc; text-decoration: none; }
.cchub-pager .is-current, .cchub-pager span.is-current {
  background: var(--cchub-blue); border-color: var(--cchub-blue); color: #fff; font-weight: 700;
}

/* --- tabs (analytics views etc.) ----------------------------------------- */
.cchub-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.cchub-tabs a {
  padding: 7px 15px; border-radius: 999px; font-size: .86rem; font-weight: 600;
  border: 1px solid var(--cchub-line); background: #fff; color: var(--cchub-slate);
}
.cchub-tabs a:hover { border-color: var(--cchub-blue); color: var(--cchub-blue-dark); text-decoration: none; }
.cchub-tabs a.is-active, .cchub-tabs a[aria-current="page"] {
  background: var(--cchub-blue); border-color: var(--cchub-blue); color: #fff;
}

/* --- accordion: long logs collapse to one line --------------------------- */
.cchub-acc > summary {
  cursor: pointer; font-weight: 600; color: var(--cchub-blue-dark);
  padding: 6px 0; list-style-position: inside;
}
.cchub-acc > summary:hover { color: var(--cchub-blue); }
.cchub-acc[open] > summary { border-bottom: 1px solid var(--cchub-line-soft); margin-bottom: 6px; }

/* --- third-party profile section rendered inside a CE Hub card ----------- */
.cchub-certemy-embed table { width: 100%; }
.cchub-certemy-embed th, .cchub-certemy-embed td {
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--cchub-line-soft);
  font-size: .9rem; vertical-align: middle;
}
.cchub-certemy-embed h2, .cchub-certemy-embed h3 { font-family: var(--cchub-serif); color: var(--cchub-ink); }
.cchub-certemy-embed input[type=text], .cchub-certemy-embed select {
  font: inherit; border: 1px solid var(--cchub-line); border-radius: var(--cchub-r-sm); padding: 6px 10px;
}

/* --- picklist: the searchable replacement for long dropdowns ------------- */
.cchub-picklist {
  display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  max-height: 420px; overflow-y: auto; padding: 4px 2px;
  border-top: 1px solid var(--cchub-line-soft); margin-top: 8px;
}
.cchub-picklist .cchub-filter-item {
  display: block; padding: 7px 10px; border-radius: 8px;
  font-size: .9rem; color: var(--cchub-blue-dark);
}
.cchub-picklist .cchub-filter-item:hover { background: #f2f7fc; text-decoration: none; }

/* --- folder tabs: the wp-admin profile tab shape, in CE Hub colours ------ */
.cchub-tabs--folder { gap: 0; border-bottom: 1px solid var(--cchub-line); margin: 0 0 20px; flex-wrap: nowrap; overflow-x: auto; }
.cchub-tabs--folder a {
  border: 1px solid var(--cchub-line); border-bottom: none;
  border-radius: 10px 10px 0 0; background: #edf2f7; color: var(--cchub-slate);
  padding: 10px 20px; margin: 0 4px -1px 0; font-size: .9rem; font-weight: 600;
  position: relative; white-space: nowrap;
}
.cchub-tabs--folder a:hover { background: #f6f9fc; color: var(--cchub-blue-dark); text-decoration: none; border-color: var(--cchub-line); }
.cchub-tabs--folder a.is-active {
  background: #fff; color: var(--cchub-ink);
  border-bottom: 1px solid #fff;
  box-shadow: inset 0 3px 0 var(--cchub-accent);
}

/* Login-as button (rendered by the Login As User plugin's own hook). */
.cchub-loginas { display: inline-block; margin-left: 10px; vertical-align: middle; }
.cchub-loginas a, .cchub-loginas button {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
  background: #fff; color: var(--cchub-blue-dark);
  border: 1px solid var(--cchub-line); border-radius: 999px; padding: 4px 13px;
  text-decoration: none;
}
.cchub-loginas a:hover, .cchub-loginas button:hover { border-color: var(--cchub-blue); background: #f2f7fc; text-decoration: none; }
.cchub-loginas img, .cchub-loginas .dashicons { width: 14px; height: 14px; }

/* --- "in development" block --------------------------------------------- */
.cchub-soon {
  border: 1px dashed var(--cchub-line);
  border-radius: var(--cchub-r-md);
  background: linear-gradient(180deg, #fbfdff, var(--cchub-line-soft));
  padding: 14px 18px;
  margin: 0 0 18px;
}
.cchub-soon__title {
  margin: 0 0 4px;
  font-family: var(--cchub-serif);
  font-weight: 700; font-size: 1rem; color: var(--cchub-ink);
}
.cchub-soon__title::before { content: "🛠  "; font-family: var(--cchub-sans); }
.cchub-soon__list { margin: 0 0 6px; font-size: .9rem; color: var(--cchub-blue-dark); font-weight: 600; }
.cchub-soon__note { margin: 0; font-size: .85rem; color: var(--cchub-muted); }

/* --- empty state --------------------------------------------------------- */
.cchub-empty { padding: 36px 22px; text-align: center; color: var(--cchub-muted); }
.cchub-empty strong { display: block; color: var(--cchub-ink); font-family: var(--cchub-serif); font-size: 1.15rem; margin-bottom: 5px; }

/* --- transcript ---------------------------------------------------------- */
.cchub-transcript-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cchub-transcript { }
.cchub-transcript__head {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border-bottom: 2px solid var(--cchub-line); padding-bottom: 14px; margin-bottom: 16px;
}
.cchub-transcript__meta { text-align: right; font-size: .92rem; }
.cchub-transcript__foot { margin-top: 14px; font-size: .85rem; }

/* --- hide the site's Tawk.to chat widget on every dashboard screen ------- */
body.cchub #tawkchat-container,
body.cchub #tawkchat-minified-container,
body.cchub .tawk-min-container,
body.cchub [id^="tawk"],
body.cchub iframe[title*="chat" i] { display: none !important; visibility: hidden !important; }

/* --- responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .cchub-masthead__in { padding: 16px 16px 15px; flex-wrap: wrap; }
  .cchub .cchub-brand__logo { height: 24px; max-width: 210px; }
  .cchub-masthead__user { font-size: .78rem; gap: 10px; }
  .cchub-masthead__hello { display: none; }
  .cchub-toggle { display: block; }
  .cchub-nav { flex-basis: 100%; flex-direction: column; display: none; padding: 6px 0 12px; }
  .cchub-navbar.is-open .cchub-nav { display: flex; }
  .cchub-navbar__in { flex-wrap: wrap; padding: 4px 16px; }
  .cchub-main { padding: 20px 16px 56px; }
  .cchub-card { padding: 16px; border-radius: var(--cchub-r-md); }
  .cchub-table { display: block; overflow-x: auto; }
  .cchub-transcript__meta { text-align: left; }
}

/* --- print (transcript etc.) --------------------------------------------- */
@media print {
  .cchub-header, .cchub-masthead, .cchub-navbar, .cchub-spectrum, .cchub-footer,
  .cchub-noprint, .cchub-notice, .cchub-btn, .cchub-toggle { display: none !important; }
  body.cchub { background: #fff; font-size: 11pt; }
  .cchub-main { padding: 0; max-width: none; }
  .cchub-card { border: none; box-shadow: none; padding: 0; break-inside: avoid; }
  a[href]::after { content: ""; }
}

/* ---- Certemy membership card (Larry: "make it pop") ------------------- */
.cchub-certemy__hero {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(120deg, #0b1a2c 0%, #17527f 70%, #2371b1 100%);
  border-radius: 12px; padding: 22px 26px; margin: 0 0 18px; color: #fff;
}
.cchub-certemy__kicker {
  display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .2em;
  color: #8fb4d6; font-weight: 600; margin-bottom: 6px;
}
.cchub-certemy .cchub-certemy__name {
  margin: 0; color: #fff; font-family: Georgia, serif; font-size: 1.7rem; line-height: 1.15;
}
.cchub-certemy__memno {
  display: inline-block; margin-top: 8px; font-size: .85rem; color: #c8d9ea;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; padding: 3px 12px; letter-spacing: .04em;
}
.cchub-certemy__status {
  font-weight: 700; font-size: .95rem; letter-spacing: .14em; padding: 10px 22px;
  border-radius: 999px; border: 2px solid;
}
.cchub-certemy__status.is-ok   { color: #b8f0c3; border-color: #4f9e58; background: rgba(46,125,50,.25); }
.cchub-certemy__status.is-warn { color: #ffd9a0; border-color: #b26a00; background: rgba(178,106,0,.22); }
.cchub-certemy__tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px; margin: 0 0 18px;
}
.cchub-certemy__tile {
  background: #f4f7fa; border: 1px solid #e3e8ee; border-radius: 12px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}
.cchub-certemy__label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: #5a6b7d; font-weight: 700;
}
.cchub-certemy__big { font-family: Georgia, serif; font-size: 1.35rem; color: #17293b; line-height: 1.2; }

/* ------------------------------------------------------------------ *
 * SUPPORT TICKETS
 *
 * THE MAGAZINE'S PALETTE, NOT CCAPP'S. This hub belongs to Counselor
 * Magazine. Its language is the navy masthead, the working blue, and the
 * twelve print section colours in chrome-header.php — NOT the CCAPP
 * company colours. Do not reach for CCAPP's brand rules here.
 *
 * Every value below is an existing hub token or an existing hub pill
 * pairing: --blue-dark for new, the purple already used for the Intuto
 * pill (the magazine's own print purple, 95,36,159) for assigned, the
 * warn pair for in-progress, a darkened --cchub-warm for waiting, ok
 * for resolved, muted for closed. Nothing here was invented.
 *
 * Status carries colour because a queue is scanned, not read. The six
 * states map to the same ok/warn/late semantics used everywhere else,
 * so a pill means the same thing on this screen as on any other.
 * ------------------------------------------------------------------ */

.cchub-tstatus {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px 4px 9px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  white-space: nowrap; line-height: 1.4;
}
.cchub-tstatus::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none;
}
.cchub-tstatus--new       { background: #e8f1fa; color: var(--cchub-blue-dark); }
.cchub-tstatus--assigned  { background: #efe7f6; color: #6b3fa0; }
.cchub-tstatus--progress  { background: var(--cchub-warn-bg); color: var(--cchub-warn); }
.cchub-tstatus--waiting   { background: #fdf0e8; color: #9a4f1c; }
.cchub-tstatus--resolved  { background: var(--cchub-ok-bg); color: var(--cchub-ok); }
.cchub-tstatus--closed    { background: var(--cchub-line-soft); color: var(--cchub-muted); }

/* Ticket number — monospace so #CE-1042 is copyable at a glance. */
.cchub-tnum {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8rem; font-weight: 700; color: var(--cchub-blue-dark);
  background: #eef4fa; border: 1px solid #dce7f2;
  padding: 2px 7px; border-radius: 6px; white-space: nowrap;
}

/* Category chip + its icon. */
.cchub-tcat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--cchub-slate);
}
.cchub-tcat svg { width: 15px; height: 15px; flex: none; opacity: .8; }

/* ---- Conversation ------------------------------------------------ */
.cchub-thread { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.cchub-msg {
  border: 1px solid var(--cchub-line-soft);
  border-radius: var(--cchub-r-md);
  padding: 14px 16px; background: #fff; max-width: 82%;
  box-shadow: var(--cchub-shadow-sm);
}
.cchub-msg__meta {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--cchub-muted); margin-bottom: 7px; font-weight: 700;
}
.cchub-msg__body { color: var(--cchub-body); line-height: 1.65; }

/* Customer speaks from the left in the hub's blue; staff answer from the
   right in navy — so who said what is legible without reading names. */
.cchub-msg--customer { align-self: flex-start; border-left: 3px solid var(--cchub-blue); }
.cchub-msg--staff    { align-self: flex-end;   border-left: 3px solid var(--cchub-navy); background: #f9fbfd; }

/* Internal notes are amber and hatched — they must never be mistaken for
   something the customer can see. Same warn colour the hub uses for
   "staff only" everywhere else. */
.cchub-msg--note {
  align-self: flex-end; max-width: 82%;
  background: repeating-linear-gradient(135deg, #fdf3e2, #fdf3e2 10px, #fcefd8 10px, #fcefd8 20px);
  border-color: #f0dcb4; border-left: 3px solid var(--cchub-warn);
}
.cchub-msg--note .cchub-msg__meta { color: var(--cchub-warn); }

.cchub-ticket-empty { text-align: center; padding: 34px 18px; color: var(--cchub-muted); }
.cchub-ticket-empty svg { width: 42px; height: 42px; opacity: .35; margin-bottom: 10px; }

@media (max-width: 700px) {
  .cchub-msg, .cchub-msg--note { max-width: 100%; }
}

/* Tab counts. The unassigned pile turns amber the moment it is not empty —
   that queue existing at all is the thing a grantor needs to notice. */
.cchub-tabcount {
  display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 6px;
  border-radius: 999px; font-size: .72rem; font-weight: 700; line-height: 1.5;
  background: var(--cchub-line-soft); color: var(--cchub-muted);
}
.cchub-tabs a.is-active .cchub-tabcount { background: rgba(255,255,255,.22); color: #fff; }
.cchub-tabcount--alert { background: var(--cchub-warn-bg); color: var(--cchub-warn); }
.cchub-tabs a.is-active .cchub-tabcount--alert { background: rgba(255,255,255,.9); color: var(--cchub-warn); }

/* Nav badge — open tickets waiting on this person. Sits in the navy bar, so
   it is light-on-dark rather than the tab counts' dark-on-light. */
.cchub-navbadge {
  display: inline-block; min-width: 17px; margin-left: 7px; padding: 1px 6px;
  border-radius: 999px; background: var(--cchub-warn-bg); color: var(--cchub-warn);
  font-size: .7rem; font-weight: 700; line-height: 1.6; vertical-align: 1px;
}

/* ---------------------------------------------------------------------------
   THE FLAG — attention, and only when attention is needed.
   (Larry, 2026-08-06: "maybe a flag? one that waves?" and "flags for staff too")

   Three states, shared by members and staff. Colour NEVER carries the meaning
   alone: the word travels beside the flag, and a screen reader gets a full
   sentence. The wave is reserved for states that need a person to DO
   something — so motion always means "you", never merely "news".

     --late   red,   waving   staff: 7 days with no reply
     --action amber, waving   your turn: member owes us an answer / staff owe one
     --reply  blue,  still    a staff reply the member has not read yet

   Nothing pending renders no flag at all. A badge that is always lit is a
   badge nobody sees, which is exactly what the old open-ticket count became.
--------------------------------------------------------------------------- */
.cchub-navflag {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 7px; padding: 1px 7px 1px 5px;
  border-radius: 999px; font-size: .7rem; font-weight: 700;
  line-height: 1.65; vertical-align: 1px; letter-spacing: .01em;
}
.cchub-navflag svg { width: 12px; height: 12px; display: block; }
.cchub-navflag__pole { display: block; }
.cchub-navflag__txt { white-space: nowrap; }

.cchub-navflag--late   { background: #fdecec; color: #a62121; }
.cchub-navflag--action { background: var(--cchub-warn-bg); color: var(--cchub-warn); }
.cchub-navflag--reply  { background: #e8f1fa; color: var(--cchub-blue-dark); }

/* The wave. The cloth pivots at the pole, so it reads as fabric catching air
   rather than the whole icon rocking. Slow and shallow on purpose — this sits
   in a navigation bar a member looks at every visit, and anything faster
   becomes a distraction they learn to tune out. */
@keyframes cchub-wave {
  0%, 100% { transform: skewY(0deg)   scaleY(1);    }
  30%      { transform: skewY(-6deg)  scaleY(.94);  }
  65%      { transform: skewY(4.5deg) scaleY(1.04); }
}
.cchub-navflag--late .cchub-navflag__cloth,
.cchub-navflag--action .cchub-navflag__cloth {
  transform-origin: 5px 5px;
  animation: cchub-wave 2.4s ease-in-out infinite;
}
/* Reduced motion is a real accessibility need and also a vestibular one.
   The flag still flies — it simply stops moving. Nothing is lost, because
   the word beside it was always carrying the meaning. */
@media (prefers-reduced-motion: reduce) {
  .cchub-navflag__cloth { animation: none !important; }
}

/* On the dark navigation bar the pill needs its own footing rather than the
   pale backgrounds above, which would glow. */
.cchub-nav .cchub-navflag--late   { background: rgba(214,74,74,.22);  color: #ffd9d9; }
.cchub-nav .cchub-navflag--action { background: rgba(232,168,56,.24); color: #ffe6bd; }
.cchub-nav .cchub-navflag--reply  { background: rgba(90,160,225,.24); color: #d6e9fb; }

/* "We are waiting on you" — said in words at the top of the thread the flag
   sent them to. Arriving and having to work out why would waste the alert. */
.cchub-needsyou {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 0 0 16px; padding: 11px 13px;
  border: 1px solid #f0d9ac; border-left: 4px solid var(--cchub-warn);
  border-radius: 6px; background: var(--cchub-warn-bg); color: #6d4610;
  font-size: .92rem; line-height: 1.5;
}
.cchub-needsyou svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; }

/* An unread staff reply, marked in the thread itself. The rule down the edge
   does the work; the tag names it for anyone who cannot see the rule. */
.cchub-msg.is-unread { box-shadow: -3px 0 0 0 var(--cchub-blue); }
.cchub-newtag {
  display: inline-block; margin-left: 6px; padding: 0 6px;
  border-radius: 999px; background: var(--cchub-blue); color: #fff;
  font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}

/* WordPress core ships this class, but the hub renders inside themes that do
   not always define it, and the flag's meaning depends on it existing. */
.cchub .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Inline triage controls in the queue's Assigned column. Kept compact so the
   six-column table still fits a laptop screen without scrolling. */
.cchub-assign { display: flex; align-items: center; gap: 6px; margin: 0; flex-wrap: wrap; }
.cchub-assign select {
  padding: 3px 6px; font-size: .78rem; max-width: 150px;
  border: 1px solid var(--cchub-line); border-radius: 5px; background: #fff;
}

/* ---------------------------------------------------------------------------
   CUSTOMER CONTEXT PANEL — the right column of a staff ticket.

   Sticky on purpose: the whole value is seeing who you are talking to WHILE
   you write the reply. Stacks below 1100px with the panel FIRST, because on a
   phone the context is the part you cannot get any other way.
--------------------------------------------------------------------------- */
.cchub-ticket-split { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 20px; align-items: start; }
.cchub-ticket-main { min-width: 0; }
.cchub-ctx { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1100px) {
  .cchub-ticket-split { grid-template-columns: 1fr; }
  .cchub-ctx { position: static; order: -1; }
}

.cchub-ctx__card {
  background: #fff; border: 1px solid var(--cchub-line-soft);
  border-radius: 8px; padding: 14px 15px;
}
.cchub-ctx__h {
  margin: 0 0 10px; font-size: .7rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--cchub-blue);
}

.cchub-ctx__who { display: flex; gap: 10px; align-items: center; }
.cchub-ctx__avatar {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--cchub-navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; font-weight: 700;
}
.cchub-ctx__name { display: block; font-weight: 700; font-size: 1rem; line-height: 1.25; }
.cchub-ctx__sub  { display: block; font-size: .74rem; }
.cchub-ctx__email { margin: 10px 0 0; font-size: .84rem; word-break: break-all; }
.cchub-copy {
  margin-left: 6px; padding: 1px 7px; border: 1px solid var(--cchub-line);
  border-radius: 999px; background: #fff; cursor: pointer;
  font-size: .68rem; font-weight: 700; color: var(--cchub-blue-dark);
}
.cchub-copy:hover { background: #eef4fa; }

/* The caveat. Quiet when the snapshot is fresh, amber when it is not — the
   colour is the only thing that changes, so the sentence always reads the
   same and staff never learn to skip it. */
.cchub-ctx__stale {
  display: flex; gap: 7px; align-items: flex-start;
  margin: 12px 0 0; padding: 8px 9px; border-radius: 6px;
  background: #f2f5f8; color: #4a5a6b; font-size: .76rem; line-height: 1.45;
}
.cchub-ctx__stale svg { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 2px; }
.cchub-ctx__stale.is-stale { background: var(--cchub-warn-bg); color: #6d4610; }

.cchub-ctx__flagline { margin: 0 0 8px; font-size: .84rem; line-height: 1.45; padding-left: 15px; position: relative; }
.cchub-ctx__flagline::before {
  content: ''; position: absolute; left: 0; top: .45em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--cchub-line);
}
.cchub-ctx__flagline--ok::before   { background: #2e7d4f; }
.cchub-ctx__flagline--warn::before { background: #c2410c; }

.cchub-ctx__dl { margin: 0; font-size: .82rem; }
.cchub-ctx__dl dt { font-weight: 700; color: #52627a; margin-top: 8px; }
.cchub-ctx__dl dd { margin: 1px 0 0; line-height: 1.45; }
.cchub-ctx__pills { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 5px; }

.cchub-ctx__more summary { cursor: pointer; font-size: .78rem; color: var(--cchub-blue-dark); margin-top: 10px; }
.cchub-ctx__tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; }
.cchub-tag {
  padding: 1px 7px; border-radius: 4px; background: #f1f4f8;
  color: #4a5a6b; font-size: .69rem; line-height: 1.7;
}

.cchub-ctx__stats { display: flex; gap: 6px; text-align: center; }
.cchub-ctx__stats > div {
  flex: 1; padding: 8px 4px; border-radius: 6px; background: #f7f9fb;
  font-size: .68rem; color: #5a6a7d; line-height: 1.3;
}
.cchub-ctx__n { display: block; font-size: 1.2rem; font-weight: 700; color: var(--cchub-navy); }
.cchub-ctx__last { margin: 9px 0 0; font-size: .77rem; }

.cchub-ctx__courses { list-style: none; margin: 10px 0 0; padding: 0; font-size: .8rem; }
.cchub-ctx__courses li { padding: 6px 0 6px 15px; border-top: 1px solid var(--cchub-line-soft); position: relative; line-height: 1.4; }
.cchub-ctx__courses li:first-child { border-top: 0; }
.cchub-ctx__dot { position: absolute; left: 0; top: .85em; width: 8px; height: 8px; border-radius: 50%; }
.cchub-ctx__dot--done { background: #2e7d4f; }
.cchub-ctx__dot--open { background: var(--cchub-warn); }
.cchub-ctx__cname { display: block; font-weight: 600; }
.cchub-ctx__courses .cchub-muted { font-size: .72rem; }

.cchub-ctx__tickets { list-style: none; margin: 0; padding: 0; font-size: .8rem; }
.cchub-ctx__tickets li { padding: 7px 0; border-top: 1px solid var(--cchub-line-soft); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.cchub-ctx__tickets li:first-child { border-top: 0; }
.cchub-ctx__osub { flex: 1 1 100%; color: #52627a; line-height: 1.35; }

/* The doors out to WebcastCloud, Certemy, Ontraport and Intuto. Every one
   opens in a new tab so a half-written reply survives the trip. */
.cchub-ctx__hint { font-size: .76rem; margin: -4px 0 10px; line-height: 1.45; }
.cchub-extlinks { display: flex; flex-direction: column; gap: 6px; }
.cchub-extlink {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border: 1px solid var(--cchub-line-soft); border-radius: 6px;
  background: #fff; text-decoration: none; color: inherit;
}
.cchub-extlink:hover { border-color: var(--cchub-blue-light); background: #f7fbff; }
.cchub-extlink__t { flex: 1; min-width: 0; line-height: 1.25; }
.cchub-extlink__t strong { display: block; font-size: .84rem; }
.cchub-extlink__t .cchub-muted { font-size: .71rem; }
.cchub-extlink__out { width: 13px; height: 13px; color: #8fa1b5; flex: 0 0 13px; }
.cchub-extlogo { width: 18px; height: 18px; flex: 0 0 18px; object-fit: contain; border-radius: 3px; }
.cchub-extlogo--letter {
  display: flex; align-items: center; justify-content: center;
  background: var(--cchub-navy); color: #fff; border-radius: 4px;
  font-size: .7rem; font-weight: 700;
}

.cchub-ticket-origin { margin: 0 0 14px; font-size: .88rem; line-height: 1.5; }

/* Per-block freshness. Tags are written by AccessAlly as Ontraport fires them,
   so membership is current; the course figures are a WebcastCloud snapshot and
   are not. One blanket "may be stale" over both taught staff to distrust the
   half that is reliable — so each card states its own. */
.cchub-ctx__fresh {
  float: right; padding: 0 6px; border-radius: 999px;
  background: #eef2f6; color: #5c6b7d;
  font-size: .6rem; font-weight: 700; letter-spacing: .04em;
  text-transform: none; line-height: 1.75;
}
.cchub-ctx__fresh--live  { background: #e6f4ec; color: #1f6b45; }
.cchub-ctx__fresh--stale { background: var(--cchub-warn-bg); color: var(--cchub-warn); }
.cchub-ctx__note { margin: 11px 0 0; font-size: .74rem; line-height: 1.45; color: #5c6b7d; }
.cchub-ctx__card .cchub-ctx__stale { margin: 0 0 11px; }
