/* CHIRATTER EDITORIAL v1.3.5 — hierarchy / mobile usability only.
 * Preserve desktop fixed video detail, WATCH scroll-snap and rankings behavior.
 * Intentionally target single video pages only for scroll restoration.
 */
/* Smaller, content-first headings across directory routes */
.content-main .chtr-directory-heading {
  padding-bottom:15px;
  margin-bottom:clamp(15px,2vw,24px);
}
.content-main .chtr-directory-heading .eyebrow {margin-bottom:7px;letter-spacing:.1em;font-size:9px;}
.content-main .chtr-directory-heading h1,
.content-main .chtr-directory-heading .chtr-category-intro h1 {
  font-size:clamp(23px,2.45vw,33px)!important;
  line-height:1.32;
  letter-spacing:-.035em;
}
.content-main .chtr-directory-heading .chtr-directory-description {
  margin-top:6px!important;
  font-size:12px!important;
  line-height:1.5;
}
.content-main .chtr-directory-heading::after {width:46px;}
.content-main .listing-section {margin-top:clamp(24px,3vw,40px)}
.content-main .section-heading {margin-bottom:16px;padding-bottom:9px;}
.content-main .section-heading h2,
.content-main.chtr-rankings .section-heading h2 {font-size:clamp(18px,1.8vw,24px)!important;line-height:1.35;}
.content-main.chtr-rankings .chtr-rankings-header {margin-bottom:22px;}
.content-main.chtr-rankings .chtr-directory-heading .chtr-ranking-periods {margin-top:11px;}
/* Creator identity: avatar and name only in the first row; bio is full width below. */
.content-main .chtr-creator-heading .chtr-category-creator {gap:12px;align-items:center;}
.content-main .chtr-creator-heading .chtr-creator-avatar {
  width:clamp(52px,5vw,70px);height:clamp(52px,5vw,70px);
  min-width:0;flex:0 0 auto;
}
.content-main .chtr-creator-heading .chtr-category-bio {
  margin:10px 0 0;font-size:12px;line-height:1.55;
  max-width:72ch;overflow-wrap:anywhere;
}
.content-main .chtr-creator-heading .chtr-creator-more {margin:9px 0 0;}
.content-main .chtr-creator-heading .chtr-creator-more .pill-link {padding:8px 12px;font-size:11px;}
@media (max-width:760px) {
  /* Replace the old mobile two-panel fixed layout with normal page scroll.
   * Keep the mobile nav fixed and reserve enough scroll room beneath it.
   * Desktop / WATCH are entirely unaffected. */
  html:has(body.chtr-detail-fixed) {
    height:auto!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
  }
  body.chtr-detail-fixed {
    height:auto!important;
    min-height:100dvh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  body.chtr-detail-fixed .chtr-story-detail {
    position:relative!important;
    top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;
    width:auto!important;height:auto!important;min-height:0!important;
    max-width:none!important;
    display:block!important;
    margin:var(--header-height) 0 0!important;
    padding:10px 12px calc(var(--nav-height) + 42px + env(safe-area-inset-bottom))!important;
    overflow:visible!important;
    overscroll-behavior-y:auto!important;
  }
  body.chtr-detail-fixed .chtr-story-detail .detail-breadcrumb {margin:0 0 8px;font-size:10px;line-height:1.4;}
  body.chtr-detail-fixed .chtr-story-detail .story-detail-grid {
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  body.chtr-detail-fixed .chtr-story-detail .story-player {
    display:flex!important;
    flex:0 0 auto!important;
    position:relative!important;
    top:auto!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    margin:0!important;
    overflow:hidden!important;
    border-radius:10px;
    background:#070709;
  }
  body.chtr-detail-fixed .chtr-story-detail .story-player video {
    display:block;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:68dvh!important;
    object-fit:contain!important;
    background:#070709;
  }
  /* Allow the description and links to be read naturally by scrolling down. */
  body.chtr-detail-fixed .chtr-story-detail .story-copy {
    flex:none!important;
    display:block!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
    overscroll-behavior-y:auto!important;
    padding:15px!important;
    border-radius:10px;
    scrollbar-gutter:auto!important;
  }
  body.chtr-detail-fixed .chtr-story-detail .story-copy h1 {
    font-size:17px!important;line-height:1.45!important;
    margin:7px 0 9px!important;
  }
  body.chtr-detail-fixed .chtr-story-detail .story-byline {margin-bottom:12px;}
  body.chtr-detail-fixed .chtr-story-detail .chtr-creator-panel {margin:12px 0;padding:11px 0;}
  body.chtr-detail-fixed .chtr-story-detail .chtr-more-videos {margin-top:15px;}
  /* Fullscreen can still occupy the entire screen even in flow layout. */
  body.chtr-detail-fixed .story-player:fullscreen,
  body.chtr-detail-fixed .story-player:-webkit-full-screen {
    position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;
    max-height:none!important;border-radius:0!important;
  }
  body.chtr-detail-fixed .story-player:fullscreen video,
  body.chtr-detail-fixed .story-player:-webkit-full-screen video {
    width:100%!important;height:100%!important;max-height:none!important;
  }
  /* Compact directories: get cards into view sooner, without changing H1 text. */
  .content-main .chtr-directory-heading {margin-bottom:15px;padding-bottom:12px;}
  .content-main .chtr-directory-heading .eyebrow {font-size:8px;margin-bottom:5px;}
  .content-main .chtr-directory-heading h1,
  .content-main .chtr-directory-heading .chtr-category-intro h1 {
    font-size:clamp(20px,5.1vw,25px)!important;
    line-height:1.3;
    letter-spacing:-.03em;
  }
  .content-main .chtr-directory-heading .chtr-directory-description {font-size:11px!important;margin-top:5px!important;line-height:1.5;}
  .content-main .listing-section {margin-top:23px;}
  .content-main .section-heading {margin-bottom:12px;}
  .content-main .section-heading h2,
  .content-main.chtr-rankings .section-heading h2 {font-size:18px!important;}
  .content-main .chtr-creator-heading .chtr-category-creator {gap:11px;align-items:center;}
  .content-main .chtr-creator-heading .chtr-creator-avatar {
    width:52px;height:52px;min-width:52px;flex:0 0 52px;
  }
  .content-main .chtr-creator-heading .chtr-category-intro {min-width:0;flex:1;}
  .content-main .chtr-creator-heading .chtr-category-intro h1 {overflow-wrap:anywhere;}
  .content-main .chtr-creator-heading .chtr-category-bio {font-size:11px;line-height:1.65;margin-top:9px;}
  .content-main .chtr-creator-heading .chtr-creator-more {margin-top:10px;}
  .content-main .chtr-creator-heading .chtr-creator-more .pill-link {font-size:10px;padding:8px 10px;}
  .content-main.chtr-discover-directory .discover-search {margin-bottom:16px;min-height:48px;}
  .content-main.chtr-discover-directory .discover-search input {padding:10px 6px;min-height:44px;}
  .content-main.chtr-discover-directory .discover-search button {min-height:40px;padding:10px 12px;}
  .content-main.chtr-discover-directory .chtr-discover-ranking-link {margin-bottom:16px;}
  .content-main.chtr-rankings .chtr-directory-heading .chtr-ranking-periods {margin-top:10px;}
}
