/* =====================================================================
   hub-content.css — the Knowledge Hub's content pages (redesign SPEC §5.1): the authors list and
   an author's page, topic pages, search, the "page not found" page and small notes on the article
   page. The shared pieces they are built from (cards, the page band, the author box, the article
   layout) are in hub.css. Every colour is a var(--ck-…) token.
   ===================================================================== */

/* A page ending in a coloured band meets the footer directly (the seal straddles the band) */
body.ck.hub-content main:has(> .ck-section:last-child) + .ck-footer{margin-top:0}

/* ---- Article page: the staff-only notes ---- */
.ck .hub-preview{margin:0 0 var(--ck-space-5)}
.ck .hub-preview a{margin-left:var(--ck-space-2);font-weight:600}
.ck .hub-staff-edit{margin:0 0 var(--ck-space-3);font-size:14px}
.ck .hub-related .hub-section-title{margin-bottom:var(--ck-space-5)}

/* ---- Topic pages: the sub-topics under the heading ---- */
.ck .hub-subtopics{margin:var(--ck-space-5) 0 0}
.ck .hub-subtopics__title{margin:0 0 var(--ck-space-2);color:var(--ck-navy);font:600 12px/1.4 var(--ck-font-body);letter-spacing:.12em;text-transform:uppercase}
.ck summary.hub-subtopics__title{display:inline-flex;align-items:center;gap:var(--ck-space-2);min-height:36px;margin:0;padding:0 var(--ck-space-4);
  border:1px solid var(--ck-line-strong);border-radius:var(--ck-radius-pill);background:var(--ck-white);cursor:pointer;list-style:none}
.ck summary.hub-subtopics__title::-webkit-details-marker{display:none}
.ck summary.hub-subtopics__title::after{content:"";width:7px;height:7px;margin-top:-3px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:rotate(45deg);transition:transform var(--ck-dur) ease}
.ck details.hub-subtopics[open] > summary::after{transform:rotate(-135deg);margin-top:3px}
.ck details.hub-subtopics[open] > summary{margin-bottom:var(--ck-space-3)}
.ck summary.hub-subtopics__title:hover{border-color:var(--ck-navy)}
.ck .hub-subtopics .ck-chip{background:var(--ck-white)}
.ck .hub-subtopics a.ck-chip:hover{background:var(--ck-navy);color:var(--ck-white)}
.ck .hub-chip-count{display:inline-block;min-width:1.5em;padding:0 6px;border-radius:var(--ck-radius-pill);background:var(--ck-light);
  color:var(--ck-navy);font-size:12px;font-weight:600;text-align:center}

/* ---- Authors list ---- */
.ck .hub-people{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:var(--ck-space-5);margin:0;padding:0;list-style:none}
.ck .hub-person{position:relative;display:flex;gap:var(--ck-space-4);align-items:flex-start;padding:var(--ck-space-5);background:var(--ck-white);
  border:1px solid var(--ck-line);border-radius:var(--ck-radius);box-shadow:var(--ck-shadow);transition:transform var(--ck-dur) ease,box-shadow var(--ck-dur) ease}
.ck .hub-person:hover{transform:translateY(-3px);box-shadow:var(--ck-shadow-lg)}
.ck .hub-person .hub-avatar{width:64px;height:64px;font-size:23px}
.ck .hub-person__text{min-width:0}
.ck .hub-person__name{margin:0 0 2px;font-size:1.25rem}
.ck .hub-person__name a{color:var(--ck-navy);text-decoration:none}
.ck .hub-person__name a::after{content:"";position:absolute;inset:0}
.ck .hub-person__name a:hover{text-decoration:underline}
.ck .hub-person:has(.hub-person__name a:focus-visible){outline:3px solid var(--ck-navy);outline-offset:2px}
.ck .hub-person:has(.hub-person__name a:focus-visible) .hub-person__name a:focus-visible{outline:none;box-shadow:none}
.ck .hub-person__title{margin:0 0 var(--ck-space-2);color:var(--ck-muted);font-size:14px}
.ck .hub-person__bio{margin:0 0 var(--ck-space-2);font-size:14.5px;line-height:1.55}
.ck .hub-person .ck-meta{margin:0}

/* ---- An author's page ---- */
.ck .hub-profile{display:flex;gap:var(--ck-space-6);align-items:flex-start}
.ck .hub-profile__text{min-width:0;max-width:65ch}
.ck .hub-profile__title{margin:0 0 var(--ck-space-3);color:var(--ck-muted);font-size:15.5px}
.ck .hub-profile__bio{font-size:16px;line-height:1.65}
.ck .hub-profile__bio p:last-child{margin-bottom:0}
.ck .hub-profile__links{display:flex;flex-wrap:wrap;gap:var(--ck-space-2) var(--ck-space-5);margin:var(--ck-space-4) 0 0}
.ck .hub-head--profile .hub-head__title{max-width:none}
@media (max-width:640px){
  .ck .hub-profile{flex-direction:column;gap:var(--ck-space-4)}
  .ck .hub-profile .hub-avatar--lg{width:88px;height:88px;font-size:32px}
}

/* ---- Search ---- */
.ck .hub-searchform{display:grid;grid-template-columns:minmax(0,1fr) 13rem auto;gap:var(--ck-space-3) var(--ck-space-4);align-items:end;max-width:56rem;margin:var(--ck-space-4) 0 0}
.ck .hub-searchform .ck-label{color:var(--ck-navy)}
.ck .hub-searchform .ck-btn{min-height:46px}
@media (max-width:720px){ .ck .hub-searchform{grid-template-columns:minmax(0,1fr)} .ck .hub-searchform .ck-btn{justify-self:start} }
.ck .hub-search-hint p{margin:0 0 var(--ck-space-3);color:var(--ck-muted)}
.ck .hub-results__summary{margin:0 0 var(--ck-space-6);font-size:1.05rem}
.ck .hub-group{margin:0 0 var(--ck-space-7)}
.ck .hub-group .hub-section-title{padding-bottom:var(--ck-space-3);border-bottom:2px solid var(--ck-blue)}
.ck .hub-group__more{margin:var(--ck-space-4) 0 0}
.ck .hub-hits{display:grid;margin:0;padding:0;list-style:none}
.ck .hub-hit{padding:var(--ck-space-4) 0;border-bottom:1px solid var(--ck-line)}
.ck .hub-hit:first-child{padding-top:0}
.ck .hub-hit__title{margin:0 0 4px;font:600 1.15rem/1.35 var(--ck-font-head)}
.ck .hub-hit__title a{color:var(--ck-navy);text-decoration:none}
.ck .hub-hit__title a:hover{text-decoration:underline}
.ck .hub-hit__text{margin:0;max-width:75ch;font-size:15px;line-height:1.6}
.ck .hub-hit .ck-meta{margin:4px 0 0}

/* ---- Page not found ---- */
.ck .hub-404{padding-top:var(--ck-space-8);max-width:52rem}
.ck .hub-404 h1{margin:0 0 var(--ck-space-3)}
.ck .hub-404 .ck-lead{margin:0 0 var(--ck-space-6);max-width:60ch}
.ck .hub-404__search{display:flex;gap:var(--ck-space-2);max-width:36rem;margin:0 0 var(--ck-space-7)}
.ck .hub-404__search .ck-input{flex:1 1 auto;min-width:0}
.ck .hub-404__links ul{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,13rem),1fr));gap:var(--ck-space-3);margin:0 0 var(--ck-space-6);padding:0;list-style:none}
.ck .hub-404__links a{display:flex;justify-content:space-between;align-items:center;gap:var(--ck-space-2);padding:14px 16px;border:1px solid var(--ck-line);
  border-radius:var(--ck-radius);background:var(--ck-neutral);color:var(--ck-navy);font-weight:600;text-decoration:none;
  transition:background-color var(--ck-dur) ease,border-color var(--ck-dur) ease}
.ck .hub-404__links a::after{content:"→"}
.ck .hub-404__links a:hover{background:var(--ck-light);border-color:var(--ck-blue)}

/* Touch screens: 44px tap targets (review R3-07) */
@media (pointer:coarse){
  .ck summary.hub-subtopics__title{min-height:44px}
}

@media (prefers-reduced-motion:reduce){
  .ck .hub-person,.ck .hub-404__links a,.ck summary.hub-subtopics__title::after{transition:none}
  .ck .hub-person:hover{transform:none}
}

/* ---------- Team and authors 2026-10-24 ---------- */
/* An author's page (hub/content/author.php): under the designation, small figures of their live posts by type
   (owner, 2026-10-24: "12 Knowledge Articles · 3 Case Studies …"; only the types they have). */
.ck .hub-profile__counts{display:flex;flex-wrap:wrap;gap:var(--ck-space-2) var(--ck-space-3);margin:0 0 var(--ck-space-4);padding:0;list-style:none}
.ck .hub-profile__count{display:inline-flex;align-items:baseline;gap:6px;padding:6px 12px;border:1px solid var(--ck-line);border-radius:var(--ck-radius-pill);
  background:var(--ck-white);color:var(--ck-muted);font-size:14px;line-height:1.3}
.ck .hub-profile__num{color:var(--ck-navy);font:700 1.15rem/1 var(--ck-font-head)}

/* ---------- Team and author link 2026-10-24 ---------- */
/* An author's page (hub/content/author.php; owner, 2026-10-24, migration hub/012): a small "CRCGS team" mark under the
   eyebrow, linking to the Our Team page, while the author is linked to a published team member; LinkedIn and the other
   links as the Our Team page's pills (hub/partials/_profile_links: .hub-tm__links in hub-forms.css), "All authors" under them. */
.ck .hub-profile__team{margin:0 0 var(--ck-space-2)}
.ck .hub-profile__team a{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 12px;border:1px solid var(--ck-navy);
  border-radius:var(--ck-radius-pill);background:var(--ck-white);color:var(--ck-navy);font-size:14px;font-weight:600;line-height:1.3;text-decoration:none}
.ck .hub-profile__team a:hover{background:var(--ck-light)}
.ck .hub-profile__team a:focus-visible{outline:3px solid var(--ck-orange);outline-offset:2px}
.ck .hub-profile__plinks{margin:var(--ck-space-4) 0 0}
.ck .hub-profile__plinks + .hub-profile__links{margin-top:var(--ck-space-3)}
@media (forced-colors:active){
  .ck .hub-profile__team a{border-color:CanvasText}
}
