/* Every page except the homepage (scripts/pages/page.js). Built from the brand kit's pieces with the
   homepage's measurements: tight sections, label and headline on the left, copy on the right. */

/* hero */
.pg-hero { position: relative; overflow: hidden; }
.pg-hero__in { position: relative; padding-block: clamp(72px, 9vw, 128px) clamp(56px, 7vw, 104px); display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.pg-hero__label { color: var(--green-label); }
.pg-hero__label a { color: inherit; text-decoration: none; }
.pg-hero__label a:hover { text-decoration: underline; text-underline-offset: 4px; }
.pg-hero__h { --fs: clamp(52px, 7.6vw, 116px); --lh: .9; max-width: 1100px; }
.pg-hero__intro { max-width: 640px; display: flex; flex-direction: column; gap: 16px; font-size: 19px; line-height: 30px; }
.pg-hero__intro p { margin: 0; }
.pg-hero__intro a { color: inherit; }
.pg-hero__tag { font-size: 14px; line-height: 18px; padding: 6px 14px; }
.pg-hero__lockup { width: min(720px, 100%); height: auto; margin-bottom: 8px; }
.pg-hero--photo .pg-hero__in { min-height: 560px; justify-content: flex-end; }
.pg-hero--banner .pg-hero__in { min-height: 420px; }
.pg-hero--banner .pg-hero__label { color: var(--mint); }
.pg-hero--photo .pg-hero__label { color: var(--mint); }
.pg-hero__year { right: -2vw; top: -4vw; } /* up top, as on the list covers */

/* sections */
.pg-section { padding-block: clamp(64px, 7vw, 104px); }
.pg-white + .pg-white { padding-top: 0; }
.pg-stack { display: flex; flex-direction: column; gap: 40px; }
.pg-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.pg-cols__side { display: flex; flex-direction: column; gap: 16px; }
.pg-cols__side:empty { display: none; }
.pg-cols__side:empty + * { grid-column: 2; }
@media (max-width: 900px) { .pg-cols { grid-template-columns: minmax(0, 1fr); } .pg-cols__side:empty + * { grid-column: auto; } }

/* reading text */
.pg-prose { max-width: 720px; display: flex; flex-direction: column; gap: 18px; font-size: 17px; line-height: 27px; }
.pg-prose > * { margin: 0; }
.pg-prose h2, .pg-prose h3, .pg-prose h4 { font-family: var(--font-display); font-weight: 700; text-transform: lowercase; letter-spacing: -0.01em; color: var(--black); margin-top: 12px; }
.pg-prose h2 { font-size: 32px; line-height: 1.05; }
.pg-prose h3 { font-size: 24px; line-height: 1.1; }
.pg-prose h4 { font-size: 20px; line-height: 1.25; }
.pg-prose ul, .pg-prose ol { padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; }
.pg-prose li p { margin: 0; }
.pg-prose li::marker { color: var(--forest); }
.pg-prose strong { font-weight: 600; }
.pg-prose .nfh-btns { margin-top: 8px; }
.pg-prose--doc { max-width: 760px; }
.pg-photo { margin: 0; }
.pg-photo img { width: 100%; height: auto; display: block; }
.pg-h { margin-bottom: 4px; }

/* faq */
.pg-faq { border-top: 1px solid var(--rule); }
.pg-faq__item { border-bottom: 1px solid var(--rule); }
.pg-faq__item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 64px; padding: 16px 4px; cursor: pointer;
  font: 700 22px/1.15 var(--font-display); letter-spacing: -0.01em; text-transform: lowercase; }
.pg-faq__item summary::-webkit-details-marker { display: none; }
.pg-faq__item summary:hover { color: var(--forest); }
.pg-faq__item summary svg { flex: none; color: var(--forest); transition: transform .2s; }
.pg-faq__item[open] summary .v { display: none; }
.pg-faq__a { padding: 0 4px 24px; max-width: 680px; display: flex; flex-direction: column; gap: 14px; }
.pg-faq__a > * { margin: 0; }

/* contributors */
.pg-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, calc(50% - 6px)), 1fr)); gap: 12px; }
@media (max-width: 560px) { .pg-name { min-height: 96px; padding: 16px; } .pg-name__n { font-size: 20px; } }
.pg-name { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 120px; padding: 20px 22px; border: 1px solid var(--rule); border-radius: var(--radius-md);
  color: var(--black); text-decoration: none; transition: background-color .25s, color .25s, border-color .25s; }
.pg-name__n { font: 700 24px/1.05 var(--font-display); letter-spacing: -0.01em; text-transform: lowercase; }
.pg-name__site { font-size: 13px; line-height: 18px; color: var(--forest); }
.pg-name:hover, .pg-name:focus-visible { background: var(--gradient-green-text); color: var(--white); border-color: transparent; }
.pg-name:hover .pg-name__site, .pg-name:focus-visible .pg-name__site { color: var(--white); }

/* photos */
.pg-gallery { display: grid; gap: 12px; }
.pg-gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-gallery--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pg-gallery .pg-photo { aspect-ratio: 4 / 5; }
.pg-gallery .pg-photo img { height: 100%; object-fit: cover; }
.pg-gallery__h { max-width: 1000px; }
@media (max-width: 760px) { .pg-gallery--3, .pg-gallery--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* format chips */
.pg-chips__list { gap: 12px; }
.pg-chips .nfh-chip { min-height: 48px; padding: 0 24px; font-size: 20px; }

/* call to action band */
.pg-cta__in { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.pg-cta__text { max-width: 760px; display: flex; flex-direction: column; gap: 18px; font-size: 19px; line-height: 30px; }
.pg-cta__text > * { margin: 0; }
.pg-cta__text a:not(.nfh-btn) { color: inherit; }

/* embedded apps */
.pg-embed { background: var(--white); border: 1px solid var(--rule); }
.pg-embed iframe { display: block; width: 100%; height: 1200px; border: 0; }
.pg-embed__out { font-size: 15px; }
@media (max-width: 760px) { .pg-embed iframe { height: 900px; } }

/* news */
.pg-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 40px 32px; }
.pg-news__card { display: flex; flex-direction: column; gap: 14px; color: var(--black); text-decoration: none; }
.pg-news__img { aspect-ratio: 16 / 10; background: var(--gradient-forest); }
.pg-news__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.pg-news__card p { font-size: 16px; line-height: 25px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pg-news__card:hover h2 { color: var(--forest); text-decoration: underline; text-underline-offset: 5px; }
.pg-news__card:hover img { transform: scale(1.02); }
.pg-article { gap: 20px; }
.pg-article .pg-photo { margin-bottom: 8px; }

/* forms on pages */
.pg-textarea { min-height: 140px; padding: 14px 18px; border-radius: var(--radius-md); resize: vertical; }
.pg-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; }
.pg-check input { width: 20px; height: 20px; accent-color: var(--forest); }

/* ---------- Yahoo x NFH: the purples from the Yahoo artwork on the current site ---------- */
.nfh-theme-yahoo {
  --forest: #5400bc;            /* buttons, links, headlines on white (white on it: 9.6:1) */
  --pine-deep: #410094;         /* hover */
  --green-label: #c4a6ff;       /* labels on black */
  --green: #9546f3;             /* outlined numerals */
  --green-glow: #9546f3;
  --mint: #e2d4ff;
  --gradient-green: linear-gradient(135deg, #7008ef 0%, #5400bc 100%);
  --gradient-green-text: linear-gradient(135deg, #7008ef 0%, #5400bc 100%); /* white text 7:1 or better */
  --focus-light: #5400bc;
  --photo-overlay: linear-gradient(135deg, rgba(112,8,239,.88) 0%, rgba(84,0,188,.92) 60%, rgba(65,0,148,.95) 100%);
}
.nfh-theme-yahoo .pg-hero__lockup { width: min(820px, 100%); }
/* The bar and footer stay Nonfiction Hotlist green: the site around the partnership. */
.nfh-theme-yahoo .nfh-bar, .nfh-theme-yahoo .nfh-footer { --forest: #3a5a40; --pine-deep: #1a2821; --focus-light: #3a5a40; }

/* ---------- Yahoo x NFH films ---------- */
.yf-intro__text { flex: 0 1 440px; font-size: 19px; line-height: 29px; }
.yf-jump { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.yf-cat { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-pill); background: var(--cat); color: var(--black);
  font: 700 17px/1 var(--font-display); text-transform: lowercase; text-decoration: none; }
.yf-cat span { font-size: 13px; opacity: .75; }
a.yf-cat:hover { color: var(--black); box-shadow: inset 0 0 0 2px var(--black); }
.yf-cat--tag { align-self: flex-start; min-height: 0; padding: 6px 14px; font-size: 13px; line-height: 18px; }
.yf-section { scroll-margin-top: 16px; }
.yf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1040px) { .yf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .yf-grid { grid-template-columns: minmax(0, 1fr); } }
.yf-card { display: flex; flex-direction: column; gap: 14px; padding: 12px 12px 22px; border: 1px solid var(--rule); border-radius: var(--radius-md); color: inherit; text-decoration: none;
  transition: background-color .25s, color .25s, border-color .25s; }
.nfh-dark .yf-card { border-color: #333333; }
/* The still sits in a clipping frame so it can drift inside it as the card passes up the screen (nfh.js). */
.yf-card__frame { display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--gradient-forest); }
.yf-card__img { display: block; width: 100%; height: 100%; object-fit: cover; transform: translate3d(0, var(--py, 0px), 0) scale(1.14); will-change: transform; }
.yf-card__body { display: flex; flex-direction: column; gap: 10px; padding: 0 8px; flex: 1; }
.yf-card__title { font-size: 21px; line-height: 1.2; }
.yf-card__line { font-size: 16px; line-height: 25px; }
.yf-card__watch { margin-top: auto; padding-top: 6px; font: 700 16px/1 var(--font-display); color: var(--forest); }
.nfh-dark .yf-card__watch { color: var(--green-label); }
.yf-card:hover, .yf-card:focus-visible { background: var(--gradient-green-text); color: var(--white); border-color: transparent; }
.yf-card:hover .yf-card__watch, .yf-card:focus-visible .yf-card__watch { color: var(--white); }

/* ---------- Yahoo x NFH hero ---------- */
.yh { position: relative; isolation: isolate; overflow: hidden; background: #05010f; color: var(--white); }
.yh__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 35%; transform: translateX(30%) translateY(var(--py, 0px)) scale(1.1); transform-origin: 100% 30%; z-index: -2; }
@media (max-width: 760px) { .yh__bg { transform: none; } }
.yh::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(5,1,15,.97) 0%, rgba(5,1,15,.93) 52%, rgba(30,0,90,.6) 76%, rgba(84,0,188,.25) 100%),
              linear-gradient(0deg, rgba(5,1,15,.95) 0%, rgba(5,1,15,0) 40%); }
.yh__in { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding-block: clamp(48px, 5vw, 80px) 32px; }
.yh__lockup { width: min(320px, 70vw); height: auto; }
.yh__label { color: #c4a6ff; }
.yh__h { --fs: clamp(48px, 6.4vw, 104px); --lh: .88; --ls: -0.035em; max-width: 1050px; }
.yh__h span { color: #9546f3; }
.yh__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px 48px; flex-wrap: wrap; width: 100%; }
.yh__intro { max-width: 600px; font-size: 19px; line-height: 30px; }
.yh__intro p { margin: 0; }
.yh__intro strong { color: #e2d4ff; }
.yh__watch { background: #7008ef; color: var(--white); }
.yh__watch:hover { background: #9546f3; color: var(--white); }
.yh__stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; }
.yh__stats div { min-width: 150px; padding: 16px 20px; border: 1px solid rgba(196,166,255,.35); border-radius: var(--radius-md); background: rgba(5,1,15,.4); }
.yh__stats dt { font: 700 13px/18px var(--font-display); letter-spacing: .12em; color: #c4a6ff; }
.yh__stats dd { margin: 6px 0 0; font: 700 44px/1 var(--font-display); letter-spacing: -0.02em; }
/* The films, drifting past along the bottom (paused on hover; still for visitors who ask for less motion). */
.yh__strip { position: relative; padding: 8px 0 28px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.yh__track { display: flex; gap: 12px; width: max-content; animation: yh-drift 90s linear infinite; }
.yh__strip:hover .yh__track { animation-play-state: paused; }
@keyframes yh-drift { to { transform: translateX(-50%); } }
.yh-still { position: relative; flex: none; width: 240px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; display: block; background: #1a0b3a; }
.yh-still img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.yh-still span { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 12px 10px; background: linear-gradient(transparent, rgba(5,1,15,.85)); color: var(--white); font: italic 600 14px/1.2 var(--font-body); opacity: 0; transition: opacity .25s; }
.yh-still:hover img { transform: scale(1.05); }
.yh-still:hover span { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .yh__track { animation: none; } .yh__strip { overflow-x: auto; } }
@media (max-width: 760px) {
  .yh::before { background: linear-gradient(0deg, rgba(5,1,15,.97) 0%, rgba(5,1,15,.88) 60%, rgba(5,1,15,.8) 100%); }
  .yh__stats div { min-width: 0; flex: 1 1 40%; padding: 12px 14px; }
  .yh__stats dd { font-size: 28px; }
  .yh-still { width: 180px; }
}

/* Each section casts a shadow up onto the one above as it slides over it (nfh.js sets the shadow's
   length and strength). White sections take none. Same as the homepage. */
.nfh-shadows main > section { position: relative; }
.nfh-wash { position: absolute; left: 0; right: 0; bottom: 0; height: 0; z-index: 3; pointer-events: none; visibility: hidden;
  background: linear-gradient(to top, rgba(6, 12, 9, .86) 0%, rgba(6, 12, 9, .62) 14%, rgba(6, 12, 9, .36) 38%, rgba(6, 12, 9, .14) 68%, rgba(6, 12, 9, 0) 100%); }
