/* Shared editorial vertical system — derived from the validated Music/CDP visual language.
   Opt-in only: pages must add body.vertical-editorial and load this stylesheet.
   Vertical-specific exceptions belong in their own stylesheet, not here. */

body.vertical-editorial{
  --editorial-signal:#ff625c;
}

/* Chronology is navigation, not metadata. */
body.vertical-editorial .article-body > .chapter{
  padding-top:1px;
  border-top:1px solid rgba(255,255,255,.09);
  scroll-margin-top:100px;
}
body.vertical-editorial .article-body > .chapter > .phase-year{
  margin:46px 0 .58rem;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  color:var(--editorial-signal);
  font-size:1.18rem;
  line-height:1.1;
  letter-spacing:.075em;
  text-transform:uppercase;
  font-weight:900;
}
body.vertical-editorial .article-body > .chapter > .phase-year + h2{
  margin-top:0;
}

/* Documentary figures should read as editorial material, not nested cards. */
body.vertical-editorial .thread-media{
  margin:34px 0 42px;
  border:0;
  border-radius:0;
  overflow:visible;
  background:transparent;
}
body.vertical-editorial .thread-media>a{
  background:transparent;
}
body.vertical-editorial .thread-media:not(.thread-media--pair)>a>img{
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
}
body.vertical-editorial .thread-media figcaption{
  padding:10px 2px 0;
  font-size:.82rem;
  line-height:1.48;
}
body.vertical-editorial .thread-media figcaption strong{
  font-size:.88rem;
  margin-bottom:3px;
}
body.vertical-editorial .thread-media-open{
  margin-top:6px;
  font-size:.78rem;
  font-weight:680;
}

/* Galleries are primary evidence: clear header, larger records, less box-within-box chrome. */
body.vertical-editorial .record-gallery{
  margin:34px 0 22px;
}
body.vertical-editorial .record-gallery__head{
  padding:0 0 10px;
  margin-bottom:13px;
  border:0;
  border-bottom:1px solid rgba(255,255,255,.11);
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
body.vertical-editorial .record-gallery__head strong{
  color:var(--editorial-signal);
  font-size:.94rem;
  line-height:1.25;
  letter-spacing:.085em;
  text-transform:uppercase;
  font-weight:900;
}
body.vertical-editorial .record-gallery__head::after{
  font-size:.8rem;
  color:var(--muted);
  font-weight:650;
}
body.vertical-editorial .record-gallery__item{
  flex-basis:180px;
  border-radius:8px;
}

/* Media-library language shared with Music and future Media & Culture rollout. */
body.vertical-editorial .video-library{
  margin:30px 0 14px;
  padding:14px 0 16px;
  border:0;
  border-top:1px solid rgba(255,255,255,.11);
  border-bottom:1px solid rgba(255,255,255,.11);
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
body.vertical-editorial .video-library__head{
  padding-bottom:8px;
  border-bottom:0;
}
body.vertical-editorial .video-library__head strong{
  color:var(--editorial-signal);
  font-size:.94rem;
  letter-spacing:.095em;
  text-transform:uppercase;
  font-weight:900;
}
body.vertical-editorial .video-library__head span{
  font-size:.78rem;
  color:var(--muted);
  font-weight:650;
}
body.vertical-editorial .video-library__label strong{
  color:var(--text);
  font-size:.94rem;
  line-height:1.35;
  letter-spacing:0;
  text-transform:none;
  font-weight:800;
}
body.vertical-editorial .video-library .video-library__description{
  margin:4px 0 9px!important;
  font-size:.84rem!important;
}
body.vertical-editorial .video-pill{
  min-height:36px;
  padding:6px 11px;
  border-radius:8px;
  background:rgba(243,239,231,.105);
  border-color:rgba(243,239,231,.56);
  color:rgba(255,252,246,.98)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 0 0 1px rgba(255,255,255,.018);
}
body.vertical-editorial .video-pill::before{
  color:var(--editorial-signal);
  opacity:.96;
}
body.vertical-editorial .video-pill:hover,
body.vertical-editorial .video-pill:focus-visible{
  background:rgba(243,239,231,.19);
  color:#fffdf8!important;
  border-color:rgba(255,255,255,.78);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 6px 18px rgba(0,0,0,.22);
}
body.vertical-editorial .video-pill:hover::before,
body.vertical-editorial .video-pill:focus-visible::before{
  color:var(--editorial-signal);
}

/* Evidence/status labels on research-oriented verticals can opt into the same signal language later. */
body.vertical-editorial .evidence .status{
  color:var(--editorial-signal);
  font-size:.76rem;
  font-weight:850;
}

@media(max-width:580px){
  body.vertical-editorial .fact-strip{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  body.vertical-editorial .fact{
    padding:13px 12px;
  }

  body.vertical-editorial .article-body > .chapter > .phase-year{
    margin-top:38px;
    font-size:1.08rem;
    letter-spacing:.065em;
  }

  body.vertical-editorial .thread-media{
    margin:26px 0 34px;
  }
  body.vertical-editorial .thread-media figcaption{
    padding:9px 1px 0;
  }

  body.vertical-editorial .record-gallery{
    margin-top:30px;
  }
  body.vertical-editorial .record-gallery__head{
    gap:1px;
    padding:0 0 8px;
  }
  body.vertical-editorial .record-gallery__head strong{
    font-size:.92rem;
  }
  body.vertical-editorial .record-gallery__head::after{
    font-size:.8rem;
  }
  body.vertical-editorial .record-gallery__item{
    flex-basis:72vw;
    max-width:330px;
  }

  body.vertical-editorial .video-library{
    padding:12px 0 14px;
    margin:26px 0 12px;
  }
  body.vertical-editorial .video-library__head{
    gap:2px;
  }
  body.vertical-editorial .video-library__head strong,
  body.vertical-editorial .video-library__label strong{
    font-size:.92rem;
  }
  body.vertical-editorial .video-pill{
    min-height:40px;
    padding:8px 11px;
    background:rgba(243,239,231,.12);
    border-color:rgba(243,239,231,.60);
  }
}


/* Final rollout — research, publications and archive variants */

/* Research / Publications: evidence is primary content, not accessory UI. */
body.vertical-research .article-body > .chapter,
body.vertical-publications .article-body > .chapter,
body.vertical-archive .article-body > .chapter{
  padding-top:1px;
  border-top:1px solid rgba(255,255,255,.09);
  scroll-margin-top:100px;
}

/* Existing dated research meta lines become chronology-like signposts without changing copy. */
body.vertical-research .article-body > .chapter > .meta:first-of-type{
  margin:42px 0 .72rem;
  color:var(--editorial-signal);
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:1.02rem;
  line-height:1.25;
  letter-spacing:.045em;
  font-weight:850;
}
body.vertical-research .article-body > .chapter > h2 + .meta:first-of-type{
  margin-top:0;
}

/* Evidence collections: flatter, editorial dossier treatment. */
body.vertical-research .evidence-list,
body.vertical-publications .evidence-list,
body.vertical-archive .evidence-list{
  gap:0;
  margin-top:24px;
  border-top:1px solid rgba(255,255,255,.11);
}
body.vertical-research .evidence,
body.vertical-publications .evidence,
body.vertical-archive .evidence{
  border:0;
  border-bottom:1px solid rgba(255,255,255,.10);
  border-radius:0;
  padding:18px 2px 19px;
  background:transparent;
}
body.vertical-research .evidence-top,
body.vertical-publications .evidence-top,
body.vertical-archive .evidence-top{
  align-items:baseline;
}
body.vertical-research .evidence-top > strong,
body.vertical-publications .evidence-top > strong,
body.vertical-archive .evidence-top > strong{
  font-size:1rem;
  line-height:1.35;
  color:var(--text);
  font-weight:800;
}
body.vertical-research .evidence .status,
body.vertical-publications .evidence .status,
body.vertical-archive .evidence .status{
  color:var(--editorial-signal);
  font-size:.78rem;
  line-height:1.25;
  letter-spacing:.085em;
  font-weight:900;
}
body.vertical-research .evidence p,
body.vertical-publications .evidence p,
body.vertical-archive .evidence p{
  font-size:.92rem;
  line-height:1.55;
}
body.vertical-research .evidence-links a,
body.vertical-publications .evidence-links a,
body.vertical-archive .evidence-links a{
  padding:6px 10px;
  border-color:rgba(243,239,231,.38);
  background:rgba(243,239,231,.055);
  color:var(--soft);
}

/* Publications should feel like a bibliography / research record rather than a card grid. */
body.vertical-publications .evidence-list{
  margin-bottom:34px;
}
body.vertical-publications .evidence{
  padding-top:20px;
  padding-bottom:22px;
}
body.vertical-publications .evidence-top > strong{
  font-size:1.04rem;
  max-width:64ch;
}
body.vertical-publications .evidence-links{
  margin-top:12px;
}

/* Archive timeline: years are navigational anchors and media controls are first-class content. */
body.vertical-archive .phase-list{
  gap:0;
  margin:28px 0 34px;
  border-top:1px solid rgba(255,255,255,.11);
}
body.vertical-archive .phase{
  grid-template-columns:150px 1fr;
  gap:26px;
  padding:24px 0;
  border-top:0;
  border-bottom:1px solid rgba(255,255,255,.10);
}
body.vertical-archive .phase:last-child{
  border-bottom:1px solid rgba(255,255,255,.10);
}
body.vertical-archive .phase-year{
  color:var(--editorial-signal);
  font-size:1.08rem;
  line-height:1.2;
  letter-spacing:.07em;
  font-weight:900;
}
body.vertical-archive .phase h3{
  font-size:1.08rem;
  line-height:1.35;
}
body.vertical-archive .phase p{
  font-size:.95rem;
  line-height:1.55;
}

/* Archive intro note: quieter container, stronger editorial rule. */
body.vertical-archive .note,
body.vertical-publications .note,
body.vertical-research .note{
  padding:15px 0 15px 16px;
  border-left:3px solid var(--editorial-signal);
  background:transparent;
}

/* Research imagery keeps the clean figure treatment from the shared system. */
body.vertical-research .thread-media{
  margin-top:30px;
  margin-bottom:38px;
}

@media(max-width:580px){
  body.vertical-research .article-body > .chapter > .meta:first-of-type{
    margin-top:34px;
    font-size:.96rem;
  }

  body.vertical-research .evidence-top,
  body.vertical-publications .evidence-top,
  body.vertical-archive .evidence-top{
    gap:8px;
  }
  body.vertical-research .evidence .status,
  body.vertical-publications .evidence .status,
  body.vertical-archive .evidence .status{
    font-size:.74rem;
  }

  body.vertical-archive .phase{
    grid-template-columns:1fr;
    gap:7px;
    padding:20px 0;
  }
  body.vertical-archive .phase-year{
    font-size:1.02rem;
  }
}


/* Topical vertical parity — Music editorial V5
   Communication, Internet and AI/HCI/HAI inherit the validated reading rhythm
   and media-control language from Music without importing music-only exceptions. */
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .article-hero .hero-lead{
  max-width:66ch;
}

:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .article-body > .chapter > p{
  max-width:72ch;
  line-height:1.75;
}

/* Paired documentary images should behave like one archival object. */
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .thread-media--pair .thread-media-pair__images{
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  overflow:hidden;
}

/* Media libraries use the same compact hierarchy and spacing validated in Music. */
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .video-library__group{
  padding-top:6px;
}
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .video-library__group + .video-library__group{
  margin-top:12px;
  padding-top:12px;
}
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .video-library__head span{
  font-size:.76rem;
}
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .video-library .video-library__description{
  font-size:.82rem!important;
}
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .video-pill{
  font-size:.8rem;
}
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .video-pill:focus-visible{
  outline:2px solid rgba(255,255,255,.82);
  outline-offset:3px;
}

/* Evidence inserted inside an episode stays attached to the narrative instead of
   reading as a visual ending. */
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .chapter > .video-library:has(+ p){
  margin-top:22px;
  margin-bottom:20px;
}
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .chapter > .video-library:has(+ p) + p{
  margin-top:20px;
}
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .chapter > .record-gallery:last-child,
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .chapter > .video-library:last-child,
:is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .chapter > .thread-media:last-child{
  margin-bottom:32px;
}

/* AI/HCI/HAI uses dated meta lines rather than phase-year blocks; give those
   dates the same stop-the-scroll weight as chronology in the other verticals. */
body.vertical-ai .article-body > .chapter > .meta:first-of-type{
  font-size:1.12rem;
  letter-spacing:.055em;
}

/* Mobile fact cards and editorial signals match the proportions proven in Music. */
@media(max-width:580px){
  :is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .fact span{
    font-size:.65rem;
  }
  :is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .fact strong{
    font-size:.88rem;
  }
  :is(body.vertical-media-culture, body.vertical-internet, body.vertical-ai) .chapter > .video-library:has(+ p){
    margin-top:20px;
    margin-bottom:18px;
  }
  body.vertical-ai .article-body > .chapter > .meta:first-of-type{
    font-size:1.04rem;
  }
}
