/* Alt Afrikaner | Department separation and homepage rail refinement
   Loaded after the general editorial shell. This only styles the homepage. */
body.aa-editorial-site:has(#aa-articles-title) .hero-rail {
  align-self: start;
  min-height: 0;
  padding: clamp(22px,2.4vw,32px);
  border: 1px solid #d0c2b0;
  background: #f1ebe1;
  box-shadow: 8px 8px 0 rgba(27,42,74,.045);
}
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-top,
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-bottom {
  font: 600 10px/1.5 'JetBrains Mono',monospace;
  letter-spacing: .055em;
  color: #666358;
}
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-count {
  margin: 27px 0 17px;
  align-items: center;
}
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-count strong {
  font: 700 clamp(78px,7vw,108px)/.9 'Playfair Display',Georgia,serif;
  letter-spacing: -.065em;
  color: #1b2a4a;
}
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-count span {
  font: 800 12px/1.45 'Source Sans 3',sans-serif;
  letter-spacing: .11em;
  color: #8b0000;
}
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-rule {
  margin: 17px 0 23px;
  border-top: 2px solid #1b2a4a;
}
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-label {
  margin: 0 0 13px;
  font: 700 10px 'JetBrains Mono',monospace;
  letter-spacing: .12em;
  color: #8b0000;
}
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-story {
  display: block;
  max-width: 17ch;
  font: 700 clamp(23px,2.2vw,31px)/1.17 'Playfair Display',Georgia,serif;
  letter-spacing: -.034em;
  color: #1b2a4a;
  text-decoration: none;
  border-bottom: 0;
  overflow-wrap: normal;
  transition: color .16s ease;
}
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-story span {
  display: inline-block;
  padding-left: 5px;
  font: 700 17px 'Source Sans 3',sans-serif;
  color: #8b0000;
}
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-story:hover,
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-story:focus-visible {
  color: #8b0000;
  text-decoration: none;
}
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-small {
  font: 400 15px/1.62 'Source Sans 3',sans-serif;
  color: #4b5560;
  margin: 15px 0 0;
}
body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-bottom {
  margin-top: 27px;
  border-top: 1px solid #c8baa8;
  padding-top: 14px;
}
/* The Articles & Opinion department stands apart from the 31-file research index. */
body.aa-editorial-site:has(#aa-articles-title) #articles.aa-articles-department {
  display: block;
  background: #172338 !important;
  color: #fff8ec;
  border-top: 4px solid #c5a258;
  padding: clamp(55px,6vw,92px) 24px;
}
.aa-articles-department-inner {
  max-width: 1216px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(245px,.8fr) minmax(0,1.65fr);
  gap: clamp(26px,4vw,64px);
  align-items: center;
}
.aa-articles-department-head .section-kicker {
  margin-bottom: 17px;
  color: #d9bb88;
}
.aa-articles-department-head h2 {
  font: 700 clamp(42px,4.8vw,65px)/1.05 'Playfair Display',Georgia,serif;
  letter-spacing: -.04em;
  margin: 0 0 20px;
  color: #fff8ec;
}
.aa-articles-department-head h2 em {
  font-weight: 400;
  font-style: italic;
  color: #e4c58e;
}
.aa-articles-department-head h2 span { color: #e4c58e; }
.aa-articles-department-head .aa-department-description {
  max-width: 40ch;
  color: #d8d6d0;
  font: 400 17px/1.7 'Source Sans 3',sans-serif;
  margin: 0 0 27px;
}
.aa-department-library-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: #f5e2bd;
  border-bottom: 1px solid #d6b579;
  padding: 0 0 7px;
  font: 700 13px 'Source Sans 3',sans-serif;
  text-transform: uppercase;
  letter-spacing: .07em;
  text-decoration: none;
}
.aa-department-library-link:hover { color: #fff; }
.aa-article-feature {
  display: grid;
  grid-template-columns: minmax(0,.85fr) minmax(0,1.2fr);
  min-height: 350px;
  color: #172338;
  background: #fbf8f1;
  text-decoration: none;
  border: 1px solid #d8c6a5;
  box-shadow: 0 19px 36px rgba(7,15,26,.18);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.aa-article-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 42px rgba(7,15,26,.22);
}
body.aa-editorial-site:has(#aa-articles-title) #articles .aa-article-feature img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 350px;
  object-fit: cover;
  background: #172338;
}
.aa-article-feature-copy {
  padding: clamp(23px,3.1vw,41px);
  display: flex;
  flex-direction: column;
}
.aa-article-feature-tag {
  margin: 0 0 16px;
  font: 700 10px 'JetBrains Mono',monospace;
  letter-spacing: .105em;
  color: #8b0000;
}
.aa-article-feature-tag span { color: #a99a86; }
.aa-article-feature-copy h3 {
  font: 700 clamp(24px,2.55vw,35px)/1.16 'Playfair Display',Georgia,serif;
  letter-spacing: -.026em;
  color: #1b2a4a;
  margin: 0 0 14px;
}
.aa-article-feature-copy > p:not(.aa-article-feature-tag) {
  font: 400 15px/1.65 'Source Sans 3',sans-serif;
  color: #4c5662;
  margin: 0 0 18px;
}
.aa-article-read {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #dcd1c3;
  padding-top: 15px;
  color: #8b0000;
  font: 700 12px 'Source Sans 3',sans-serif;
  text-transform: uppercase;
  letter-spacing: .075em;
}
.aa-article-feature:hover h3 { color: #8b0000; }
/* Extra signposting for the investigation archive remains within research. */
body.aa-editorial-site:has(#aa-articles-title) .archive-heading::after {
  content: "RESEARCH ARCHIVE · ARTICLES & OPINION ARE LISTED SEPARATELY";
  display: block;
  font: 600 10px/1.45 'JetBrains Mono',monospace;
  letter-spacing: .09em;
  color: #8b0000;
  margin-top: 19px;
}
@media(max-width:1020px){
  .aa-articles-department-inner { grid-template-columns:1fr; }
  .aa-articles-department-head .aa-department-description { max-width:66ch; }
}
@media(max-width:640px){
  body.aa-editorial-site:has(#aa-articles-title) .hero-rail {
    padding: 24px 20px;
    max-width: none;
  }
  body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-story {
    max-width: 22ch;
    font-size: clamp(24px,6vw,30px);
  }
  .aa-article-feature { grid-template-columns:1fr; }
  body.aa-editorial-site:has(#aa-articles-title) #articles .aa-article-feature img {
    height: auto;
    min-height:0;
    aspect-ratio:16 / 9;
  }
  .aa-article-feature-copy { padding:25px 23px; }
  body.aa-editorial-site:has(#aa-articles-title) #articles.aa-articles-department {
    padding: 53px 16px;
  }
}
@media(prefers-reduced-motion:reduce){
  .aa-article-feature,body.aa-editorial-site:has(#aa-articles-title) .hero-rail .rail-story {
    transition:none;
  }
  .aa-article-feature:hover { transform:none; }
}


/* 2026-10-23: research archive image-led card treatment.
   Use existing, repository-hosted editorial illustration assets; all artwork
   remains expressly illustrative and never substitutes for cited evidence. */
body.aa-editorial-site #investigation-grid>a.card{display:flex;flex-direction:column;overflow:hidden;min-width:0}
body.aa-editorial-site #investigation-grid>a.card::before{
 content:"";display:block;flex:none;width:calc(100% + 3.5rem);
 margin:-1.5rem -1.75rem 1.3rem;aspect-ratio:5/2;
 background-color:#182943;background-position:center;background-size:cover;
 border-bottom:3px solid #b28d4f;
}
body.aa-editorial-site #investigation-grid>a.card .card-foot{margin-top:auto}
body.aa-editorial-site #investigation-grid>a.card:hover::before{filter:brightness(1.05)}
body.aa-editorial-site #investigation-grid>a.card[href="osf.html"]::before{background-image:url("covers-2026/osf.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="sa_journalists.html"]::before{background-image:url("covers-2026/sa_journalists.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="africacheck.html"]::before{background-image:url("covers-2026/africacheck.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="ifcn.html"]::before{background-image:url("covers-2026/ifcn.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="sixstage.html"]::before{background-image:url("covers-2026/sixstage.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="metasuppression.html"]::before{background-image:url("covers-2026/metasuppression.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="iol.html"]::before{background-image:url("covers-2026/iol.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="usaid.html"]::before{background-image:url("covers-2026/usaid.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="usaidtonewsroom.html"]::before{background-image:url("covers-2026/usaidtonewsroom.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="mtn.html"]::before{background-image:url("covers-2026/mtn.jpg")}
@media(max-width:650px){body.aa-editorial-site #investigation-grid>a.card::before{margin-bottom:1rem}}
@media(forced-colors:active){body.aa-editorial-site #investigation-grid>a.card::before{border-bottom:2px solid CanvasText}}

/* Batch 2: evidence-labelled research covers, files 11–20. */
body.aa-editorial-site #investigation-grid>a.card[href="prototypenation.html"]::before{background-image:url("covers-2026/prototypenation.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="motsepe.html"]::before{background-image:url("covers-2026/motsepe.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="communists.html"]::before{background-image:url("covers-2026/communists.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="ancliberation.html"]::before{background-image:url("covers-2026/ancliberation.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="wef.html"]::before{background-image:url("covers-2026/wef.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="un.html"]::before{background-image:url("covers-2026/un.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="mbalula.html"]::before{background-image:url("covers-2026/mbalula.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="MTNrooivalkIRAN.html"]::before{background-image:url("covers-2026/rooivalk-homepage.jpg")}
body.aa-editorial-site #investigation-grid>a.card[href="44afrikaners.html"]::before{background-image:url("covers-2026/44afrikaners.webp")}
body.aa-editorial-site #investigation-grid>a.card[href="mbalula_network.html"]::before{background-image:url("covers-2026/mbalula_network.webp")}


/* 2026-10-24: above-the-fold editorial feature and unclipped artwork.
   The source illustration is landscape, so it must never be letterbox-cropped
   into a portrait-sized card that removes its title. */
body.aa-editorial-site:has(#aa-articles-title) #articles.aa-articles-department {
  border-top: 0;
  border-bottom: 4px solid #c5a258;
}
body.aa-editorial-site:has(#aa-articles-title) .aa-article-feature{
  grid-template-columns:minmax(0,1fr);
  align-self:stretch;
  min-width:0;
}
body.aa-editorial-site:has(#aa-articles-title) #articles .aa-article-feature img{
  display:block;
  width:100%;
  height:auto;
  min-height:0;
  max-height:none;
  aspect-ratio:1672 / 941;
  object-fit:contain;
  object-position:center;
  background:#172338;
}
body.aa-editorial-site:has(#aa-articles-title) .aa-article-feature-copy{
  gap:0;
  min-height:0;
}
body.aa-editorial-site:has(#aa-articles-title) .aa-article-feature-copy h3{
  font-size:clamp(22px,2.2vw,31px);
}
body.aa-editorial-site:has(#aa-articles-title) .aa-articles-department-head,
body.aa-editorial-site:has(#aa-articles-title) .aa-article-feature-copy{
  min-width:0;
}
@media(max-width:1020px){
  body.aa-editorial-site:has(#aa-articles-title) .aa-articles-department-inner{
    grid-template-columns:minmax(0,1fr);
  }
}
@media(max-width:640px){
  body.aa-editorial-site:has(#aa-articles-title) #articles .aa-article-feature img{
    min-height:0;
    height:auto;
    aspect-ratio:1672 / 941;
    object-fit:contain;
  }
}

body.aa-editorial-site #investigation-grid>a.card[href="splc.html"]::before{background-image:url("covers-2026/splc.webp")}
body.aa-editorial-site #investigation-grid>a.card[href="adl.html"]::before{background-image:url("covers-2026/adl.webp")}
body.aa-editorial-site #investigation-grid>a.card[href="wits.html"]::before{background-image:url("covers-2026/wits.webp")}
body.aa-editorial-site #investigation-grid>a.card[href="constitution.html"]::before{background-image:url("covers-2026/constitution.webp")}
body.aa-editorial-site #investigation-grid>a.card[href="fwdeklerk_foundation_investigation.html"]::before{background-image:url("covers-2026/fwdeklerk_foundation_investigation.webp")}
body.aa-editorial-site #investigation-grid>a.card[href="cws.html"]::before{background-image:url("covers-2026/cws.webp")}
body.aa-editorial-site #investigation-grid>a.card[href="omidyar.html"]::before{background-image:url("covers-2026/omidyar.webp")}
body.aa-editorial-site #investigation-grid>a.card[href="real411.html"]::before{background-image:url("covers-2026/real411.webp")}
body.aa-editorial-site #investigation-grid>a.card[href="osf-funded-orgs.html"]::before{background-image:url("covers-2026/osf-funded-orgs.jpg")}

/* Every homepage investigation remains correctly sized at tablet/mobile widths.
   The [hidden] rule preserves search and category filtering. */
body.aa-editorial-site #investigation-grid > a.card[hidden]{display:none!important}
body.aa-editorial-site #investigation-grid > a.card::before{
  width:calc(100% + 3.5rem);
  background-repeat:no-repeat;
  background-position:center center;
}
@media(max-width:760px){
  body.aa-editorial-site #investigation-grid > a.card::before{
    width:calc(100% + 42px);
    margin:-21px -21px 19px;
  }
}
@media(max-width:530px){
  body.aa-editorial-site #investigation-grid > a.card::before{
    aspect-ratio:5/2;
  }
}


/* Original premium conceptual artwork for the two externally hosted research tools.
   Keep source routes unchanged. The images illustrate their themes, not verified events. */
body.aa-editorial-site #investigation-grid>a.card[href="https://citizenintel.github.io/kalahari/"]::before,
body.aa-editorial-site #investigation-grid>a.card[href="https://citizenintel.github.io/AAIT/"]::before{
  content:"";
  display:block;
  padding:0;
  color:inherit;
  text-shadow:none;
  background-color:#12243a;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}
body.aa-editorial-site #investigation-grid>a.card[href="https://citizenintel.github.io/kalahari/"]::before{
  background-image:url("covers-2026/kalahari-external.jpg");
}
body.aa-editorial-site #investigation-grid>a.card[href="https://citizenintel.github.io/AAIT/"]::before{
  background-image:url("covers-2026/incident-tracker-external.jpg");
}
