
/* =========================================================
   AFRICA POLICY INSTITUTE — SPEECHES & POLICY CONTRIBUTIONS
   Editorial article and related-content card system
   ========================================================= */
body[data-page="speeches-article-html"],
body[data-page="speeches-library-html"]{
  --sp-navy:#101936;
  --sp-blue:#263d82;
  --sp-gold:#ddb640;
  --sp-ink:#182447;
  --sp-muted:#66718a;
  --sp-paper:#f4f5f9;
}
body[data-page="speeches-article-html"] .pub-page{
  background:#fff;
}
body[data-page="speeches-article-html"] .pub-detail-hero{
  position:relative;
  overflow:hidden;
  padding:clamp(3.5rem,7vw,6.5rem) 0 4.2rem;
  background:
    radial-gradient(circle at 85% 12%,rgba(221,182,64,.18),transparent 28%),
    linear-gradient(125deg,#111a3b 0%,#1d2b5d 54%,#263d82 100%);
  color:#fff;
  isolation:isolate;
}
body[data-page="speeches-article-html"] .pub-detail-hero:after{
  content:"";
  position:absolute;inset:auto 0 0;height:4px;
  background:linear-gradient(90deg,#dcb441,#fff0b7 48%,#dcb441);
  opacity:.95;
}
body[data-page="speeches-article-html"] .pub-detail-hero .pub-shell,
body[data-page="speeches-article-html"] .speech-related-shell{
  width:min(1220px,calc(100% - 48px));
  margin-inline:auto;
}
body[data-page="speeches-article-html"] .speech-breadcrumbs{
  display:flex;flex-wrap:wrap;gap:.65rem;align-items:center;
  margin-bottom:2.2rem;color:rgba(255,255,255,.62);
  font-size:.72rem;letter-spacing:.04em;
}
body[data-page="speeches-article-html"] .speech-breadcrumbs a:hover{color:#f2ce66}
body[data-page="speeches-article-html"] .pub-detail-hero .pub-eyebrow{
  color:#e2bd4b;font-size:.66rem;letter-spacing:.24em;font-weight:800;
  text-transform:uppercase;margin-bottom:1rem;
}
body[data-page="speeches-article-html"] .pub-detail-hero h1{
  max-width:960px;margin:0;
  color:#fff;font-family:"Playfair Display",Georgia,serif;
  font-size:clamp(2.1rem,4.5vw,3.6rem);
  line-height:1.08;letter-spacing:-.035em;font-weight:600;
  text-wrap:balance;
}
body[data-page="speeches-article-html"] .pub-detail-hero p{
  max-width:780px;margin:1.2rem 0 0;
  color:rgba(255,255,255,.76);font-size:1rem;line-height:1.8;
}
body[data-page="speeches-article-html"] .speech-hero-actions{
  display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1.8rem;
}
body[data-page="speeches-article-html"] .speech-hero-actions .pub-btn{
  min-height:44px;padding:.7rem 1.1rem;border:1px solid rgba(255,255,255,.3);
  background:rgba(255,255,255,.06);color:#fff;border-radius:2px;
  font-size:.78rem;font-weight:700;transition:.2s ease;
}
body[data-page="speeches-article-html"] .speech-hero-actions .pub-btn.primary{
  background:#dfb943;border-color:#dfb943;color:#111a35;
}
body[data-page="speeches-article-html"] .speech-hero-actions .pub-btn:hover{
  transform:translateY(-2px);background:#fff;color:#172348;border-color:#fff;
}
body[data-page="speeches-article-html"] .pub-detail-body{
  padding:3.8rem 0 4.5rem;background:#fff;
}
body[data-page="speeches-article-html"] .speech-editorial-grid{
  width:min(1220px,calc(100% - 48px));margin-inline:auto;
  display:grid;grid-template-columns:210px minmax(0,790px);
  justify-content:center;gap:clamp(2rem,5vw,5.2rem);align-items:start;
}
body[data-page="speeches-article-html"] .speech-side-meta{
  position:sticky;top:6.5rem;padding:1.2rem 0;
  border-top:2px solid #dfb943;color:#66718a;
}
body[data-page="speeches-article-html"] .speech-meta-item{
  display:flex;align-items:flex-start;gap:.65rem;
  padding:.75rem 0;border-bottom:1px solid #e8eaf0;
  font-size:.75rem;line-height:1.5;
}
body[data-page="speeches-article-html"] .speech-meta-mark{
  color:#b28b20;font-size:1rem;line-height:1.2;flex:0 0 16px;
}
body[data-page="speeches-article-html"] .speech-meta-item a{
  color:#263d82;font-weight:700;text-decoration:underline;text-underline-offset:3px;
}
body[data-page="speeches-article-html"] .speech-meta-note{
  padding-top:1rem;color:#8a93a7;font-size:.68rem;line-height:1.7;
}
body[data-page="speeches-article-html"] .pub-document{
  min-width:0;max-width:790px;color:#36415c;
  font-family:Arial,Helvetica,sans-serif;font-size:.96rem;line-height:1.9;
}
body[data-page="speeches-article-html"] .pub-document .doc-label{
  display:inline-flex;align-items:center;gap:.5rem;
  margin-bottom:1.35rem;padding:.4rem .65rem;
  background:#f0f2f8;color:#293e7e;
  font-size:.62rem;letter-spacing:.16em;font-weight:800;text-transform:uppercase;
}
body[data-page="speeches-article-html"] .pub-document p{
  margin:0 0 1.15rem;
}
body[data-page="speeches-article-html"] .pub-document p:first-of-type{
  margin-bottom:.7rem;color:#1a2851;
  font-family:"Playfair Display",Georgia,serif;
  font-size:1.55rem;line-height:1.35;font-weight:600;
}
body[data-page="speeches-article-html"] .pub-document p:nth-of-type(2){
  color:#7a849a;font-size:.83rem;font-weight:700;
  padding-bottom:1.2rem;border-bottom:1px solid #e6e9f0;
}
body[data-page="speeches-article-html"] .pub-document p:nth-of-type(3),
body[data-page="speeches-article-html"] .pub-document p:has(+ p){
  scroll-margin-top:7rem;
}
body[data-page="speeches-article-html"] .pub-document p strong,
body[data-page="speeches-article-html"] .pub-document p b{
  color:#1b2a56;
}
body[data-page="speeches-article-html"] .speech-article-end{
  width:min(790px,calc(100% - 48px));margin:0 auto 3.5rem;
  padding-top:1.5rem;border-top:1px solid #e7e9ef;
  display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;
}
body[data-page="speeches-article-html"] .speech-article-end a,
body[data-page="speeches-article-html"] .speech-article-end button{
  color:#263d82;font-size:.8rem;font-weight:700;
}
body[data-page="speeches-article-html"] .speech-article-end a:hover,
body[data-page="speeches-article-html"] .speech-article-end button:hover{color:#b28b20}

/* Related speech cards — reference-inspired image-led editorial layout */
body[data-page="speeches-article-html"] .speech-related-section{
  padding:4rem 0 4.5rem;background:#eaebf5;
  border-top:1px solid #e1e4ee;border-bottom:3px solid #ddb640;
}
body[data-page="speeches-article-html"] .speech-related-heading{
  display:flex;justify-content:space-between;align-items:flex-end;
  gap:2rem;margin-bottom:1.7rem;
}
body[data-page="speeches-article-html"] .speech-related-eyebrow{
  color:#263d82;font-size:.62rem;font-weight:800;
  letter-spacing:.23em;text-transform:uppercase;
}
body[data-page="speeches-article-html"] .speech-related-heading h2{
  max-width:700px;margin:.65rem 0 0;color:#1c2a55;
  font-family:"Playfair Display",Georgia,serif;
  font-size:clamp(1.8rem,3vw,2.5rem);line-height:1.16;
}
body[data-page="speeches-article-html"] .speech-related-heading p{
  margin:.65rem 0 0;color:#6e7890;font-size:.88rem;line-height:1.6;
}
body[data-page="speeches-article-html"] .speech-related-viewall{
  flex:0 0 auto;color:#263d82;font-size:.76rem;font-weight:800;
}
body[data-page="speeches-article-html"] .speech-related-viewall:hover{color:#a78017}
body[data-page="speeches-article-html"] .speech-related-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;
}
body[data-page="speeches-article-html"] .speech-related-card{
  display:flex;flex-direction:column;min-width:0;overflow:hidden;
  background:#fff;color:inherit;text-decoration:none;
  border:1px solid rgba(29,40,85,.05);
  transition:transform .25s ease,box-shadow .25s ease;
}
body[data-page="speeches-article-html"] .speech-related-card:hover{
  transform:translateY(-5px);box-shadow:0 16px 34px rgba(29,40,85,.14);
}
body[data-page="speeches-article-html"] .speech-related-media{
  position:relative;overflow:hidden;aspect-ratio:16/9;background:#dfe4ef;
}
body[data-page="speeches-article-html"] .speech-related-media:after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(0deg,rgba(12,22,52,.25),transparent 55%);
  pointer-events:none;
}
body[data-page="speeches-article-html"] .speech-related-media img{
  display:block;width:100%;height:100%;object-fit:cover;
  transition:transform .5s ease;
}
body[data-page="speeches-article-html"] .speech-related-card:hover .speech-related-media img{transform:scale(1.05)}
body[data-page="speeches-article-html"] .speech-related-arrow{
  position:absolute;z-index:2;right:.8rem;bottom:.8rem;
  display:grid;place-items:center;width:2rem;height:2rem;
  background:rgba(18,31,70,.82);color:#fff;opacity:0;transition:.2s ease;
}
body[data-page="speeches-article-html"] .speech-related-card:hover .speech-related-arrow,
body[data-page="speeches-article-html"] .speech-related-card:focus-visible .speech-related-arrow{opacity:1}
body[data-page="speeches-article-html"] .speech-related-content{
  display:flex;flex:1;flex-direction:column;padding:1rem 1.05rem 1.1rem;
}
body[data-page="speeches-article-html"] .speech-related-kicker{
  color:#bd9328;font-size:.55rem;letter-spacing:.18em;
  font-weight:800;text-transform:uppercase;
}
body[data-page="speeches-article-html"] .speech-related-content h3{
  margin:.55rem 0 0;color:#1d2c58;
  font-family:"Playfair Display",Georgia,serif;
  font-size:1.18rem;line-height:1.28;font-weight:600;
}
body[data-page="speeches-article-html"] .speech-related-content p{
  margin:.65rem 0 0;color:#758099;font-size:.73rem;line-height:1.55;
}
body[data-page="speeches-article-html"] .speech-related-meta{
  display:flex;justify-content:space-between;align-items:center;
  margin-top:auto;padding-top:1rem;color:#7e89a1;font-size:.66rem;font-weight:700;
}
body[data-page="speeches-article-html"] .speech-related-meta span:last-child{color:#263d82}

/* Speech archive listing */
body[data-page="speeches-library-html"] .pub-hero{
  padding:5.2rem 0 4rem;color:#fff;
  background:linear-gradient(125deg,#111a3b,#243a7a);
  border-bottom:4px solid #ddb640;
}
body[data-page="speeches-library-html"] .pub-hero .pub-shell,
body[data-page="speeches-library-html"] .pub-content{
  width:min(1220px,calc(100% - 48px));margin-inline:auto;
}
body[data-page="speeches-library-html"] .pub-hero .pub-eyebrow{color:#e2bd4b;letter-spacing:.2em}
body[data-page="speeches-library-html"] .pub-hero h1{
  max-width:900px;font-family:"Playfair Display",Georgia,serif;
  font-size:clamp(2.3rem,4.5vw,3.5rem);line-height:1.08;
}
body[data-page="speeches-library-html"] .pub-hero p{max-width:760px;color:rgba(255,255,255,.76);line-height:1.8}
body[data-page="speeches-library-html"] .pub-stats{display:flex;gap:2rem;flex-wrap:wrap;margin-top:2rem}
body[data-page="speeches-library-html"] .pub-stats div{color:rgba(255,255,255,.68);font-size:.72rem}
body[data-page="speeches-library-html"] .pub-stats strong{display:block;color:#fff;font-size:1.2rem}
body[data-page="speeches-library-html"] .pub-content{padding-top:3rem;padding-bottom:3.5rem}
body[data-page="speeches-library-html"] .pub-toolbar{display:flex;justify-content:space-between;gap:1.5rem;align-items:end;margin-bottom:1.5rem}
body[data-page="speeches-library-html"] .pub-heading{font-family:"Playfair Display",Georgia,serif;color:#1d2c58;font-size:2rem}
body[data-page="speeches-library-html"] .pub-search{width:min(360px,100%);height:46px;border:1px solid #dce0e9;padding:0 1rem;outline:none}
body[data-page="speeches-library-html"] .pub-search:focus{border-color:#263d82;box-shadow:0 0 0 3px rgba(38,61,130,.1)}
body[data-page="speeches-library-html"] .pub-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
body[data-page="speeches-library-html"] .pub-card{overflow:hidden;background:#fff;border:1px solid #e8eaf0;box-shadow:0 5px 18px rgba(18,31,70,.035);transition:.25s ease}
body[data-page="speeches-library-html"] .pub-card:hover{transform:translateY(-4px);box-shadow:0 14px 32px rgba(18,31,70,.1)}
body[data-page="speeches-library-html"] .pub-cover{aspect-ratio:16/9;overflow:hidden;background:#e5e8f1}
body[data-page="speeches-library-html"] .pub-cover img{width:100%;height:100%;object-fit:cover}
body[data-page="speeches-library-html"] .pub-card-body{padding:1.1rem}
body[data-page="speeches-library-html"] .pub-card h3{font-family:"Playfair Display",Georgia,serif;font-size:1.15rem;line-height:1.28;color:#1d2c58}
body[data-page="speeches-library-html"] .pub-card p{font-size:.78rem;line-height:1.6;color:#758099;margin-top:.6rem}
body[data-page="speeches-library-html"] .pub-card-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1rem}
body[data-page="speeches-library-html"] .pub-card-actions .pub-btn{font-size:.7rem;padding:.55rem .75rem}
@media(max-width:900px){
 body[data-page="speeches-article-html"] .speech-editorial-grid{grid-template-columns:170px minmax(0,1fr);gap:2rem}
 body[data-page="speeches-article-html"] .speech-related-grid,
 body[data-page="speeches-library-html"] .pub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
 body[data-page="speeches-article-html"] .pub-detail-hero .pub-shell,
 body[data-page="speeches-article-html"] .speech-related-shell,
 body[data-page="speeches-library-html"] .pub-hero .pub-shell,
 body[data-page="speeches-library-html"] .pub-content{width:calc(100% - 32px)}
 body[data-page="speeches-article-html"] .pub-detail-hero{padding:3.3rem 0 3rem}
 body[data-page="speeches-article-html"] .speech-editorial-grid{width:calc(100% - 32px);display:flex;flex-direction:column;gap:1.4rem}
 body[data-page="speeches-article-html"] .speech-side-meta{position:static;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;padding:.5rem 0}
 body[data-page="speeches-article-html"] .speech-meta-note{grid-column:1/-1}
 body[data-page="speeches-article-html"] .pub-document{font-size:.91rem;line-height:1.8}
 body[data-page="speeches-article-html"] .speech-related-section{padding:2.8rem 0 3rem}
 body[data-page="speeches-article-html"] .speech-related-heading{display:block}
 body[data-page="speeches-article-html"] .speech-related-viewall{display:inline-block;margin-top:1rem}
 body[data-page="speeches-article-html"] .speech-related-grid,
 body[data-page="speeches-library-html"] .pub-grid{grid-template-columns:1fr}
 body[data-page="speeches-library-html"] .pub-toolbar{display:block}
 body[data-page="speeches-library-html"] .pub-search{margin-top:1rem}
}
@media(prefers-reduced-motion:reduce){
 body[data-page="speeches-article-html"] .speech-related-card,
 body[data-page="speeches-article-html"] .speech-related-media img{transition:none}
}
