


/* === Subtle scroll reveal & header shadow (elegant) === */
:root {
  --reveal-distance: 24px;
  --reveal-duration: 420ms;
  --reveal-timing: cubic-bezier(.22,.61,.36,1);
  --header-shadow: 0 10px 30px rgba(0,0,0,.12), 0 1px 0 rgba(255,255,255,.02) inset;
}

h3 a {
  color: inherit;
  text-decoration: none;
}


.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity var(--reveal-duration) var(--reveal-timing),
              transform var(--reveal-duration) var(--reveal-timing);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  /* removed reveal override to enable scroll-fade */
}

header.sticky-shadow, .site-header.sticky-shadow {
  box-shadow: var(--header-shadow);
  backdrop-filter: saturate(120%) blur(6px);
}

/* Slightly soften section cards so the effect feels cohesive */
.card.glass {
  transition: box-shadow 240ms ease, transform 240ms ease;
}
.card.glass:hover {
  transform: translateY(-1px);
}

/* === Centering video chooser section === */
.centered-video {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
}

/* === Decade nav links hover & active color === */
.decade-link,
.dropdown-item {
  color: white !important;
}
.decade-link:hover,
.dropdown-item:hover,
.decade-link:focus,
.dropdown-item:focus {
  color: #a7cfff !important; /* very light blue hover */
}
.decade-link.active,
.dropdown-item.active {
  color: white !important;
  font-weight: 600;
}

/* === Center sections to page width without centering text === */
.centered-section {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
  width: 100%;
}
#choose-background-video {
  max-width: 500px;
  padding: 1rem 1.5rem;
}
#choose-background-video h2,
#choose-background-video p {
  text-align: left;
}

/* remove subtitle text to keep it clean */

#choose-background-video ul.video-inline-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}
#choose-background-video ul.video-inline-list li {
  list-style: none;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  transition: background 0.2s ease;
}
#choose-background-video ul.video-inline-list li:hover {
  background: rgba(255,255,255,0.25);
}
#choose-background-video ul.video-inline-list li.active {
  background: rgba(255,255,255,0.4);
  font-weight: 600;
}

/* === Choose Background Video Banner Style === */
#choose-background-video {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  max-width: fit-content;
  margin: 0.5rem auto 1rem auto;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  backdrop-filter: blur(6px) saturate(120%);
}
#choose-background-video h2 {
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}
#choose-background-video p {
  display: none;
}
#choose-background-video ul.video-inline-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
#choose-background-video ul.video-inline-list li {
  list-style: none;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s ease;
}
#choose-background-video ul.video-inline-list li:hover {
  background: rgba(255,255,255,0.25);
}
#choose-background-video ul.video-inline-list li.active {
  background: rgba(255,255,255,0.4);
  font-weight: 600;
}

/* === Hero text enlargement === */
.hero-text {
  font-size: 2.2rem;
  line-height: 1.2;
}
@media (min-width: 768px) {
  .hero-text {
    font-size: 3.2rem;
  }
}


/* --- Injected to hide "tap to unmute" overlays/buttons globally --- */
.tap-to-unmute, #tap-to-unmute, .unmute-btn, .mute-overlay, .unmute, .unmute-button {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}



/* --- Shrink "Choose Background Video" section globally --- */
#choose-background-video, .choose-background-video, section.choose-background-video, .bg-video-chooser {
  padding: 8px 12px !important;
  max-height: 40vh !important;
}
#choose-background-video h1, #choose-background-video h2, #choose-background-video h3,
.choose-background-video h1, .choose-background-video h2, .choose-background-video h3,
.bg-video-chooser h1, .bg-video-chooser h2, .bg-video-chooser h3 {
  font-size: clamp(14px, 2vw, 20px) !important;
  margin: 6px 0 !important;
}
#choose-background-video .grid, .choose-background-video .grid, .bg-video-chooser .grid {
  gap: 8px !important;
}





/* === Top-right controls container (replaces decade-select) === */
#top-right-controls{
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
}
#top-right-controls .menu-button{
  padding: 10px 14px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
}
/* Slide-in side menu panel */
.side-menu{
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: rgba(0,0,0,.9);
  color: #fff;
  padding: 24px 18px;
  transition: right .28s ease;
  z-index: 9998;
  box-shadow: -6px 0 18px rgba(0,0,0,.45);
  overflow-y: auto;
}
.side-menu.open{ right: 0; }
.side-menu h3{
  font-size: 14px;
  opacity: .8;
  margin: 14px 0 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.side-menu ul{ list-style: none; margin: 0 0 14px 0; padding: 0; }
.side-menu a{ color: #a7cfff; text-decoration: none; display: block; padding: 6px 0; }
.side-menu a:hover{ color: #d9b869; }
@media (max-width: 768px){
  #top-right-controls{ top: 10px; right: 10px; }
  .side-menu{ width: 100vw; right: -100vw; }
}


/* Footer brand color for zachs.tech link */
footer a[href*="zachs.tech"] { color: #d9b869 !important; }
footer a[href*="zachs.tech"]:visited { color: #d9b869 !important; }



/* Remove any residual enable-sound controls */
button[data-audio-toggle], .enable-sound, .btn-enable-sound { display: none !important; }



/* ensure summary source link is visible */
.summary-source{ text-decoration: underline; }
.summary .content .summary-source{ color: inherit; }

.source-meta{ margin-top: 0.5rem; }
.summary-source{ text-decoration: underline; color: inherit; }


/* Page transition overlay */
#page-transition-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 9999;
}
#page-transition-overlay.active{ opacity: 1; pointer-events: auto; }

/* Accessible text */
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* 3‑bar hamburger menu */
.menu-button{
  display:inline-flex;flex-direction:column;justify-content:center;align-items:center;
  gap:6px;width:42px;height:42px;border:1px solid rgba(255,255,255,.25);
  border-radius:10px;background:rgba(0,0,0,.35);backdrop-filter:blur(6px);
  cursor:pointer;transition:transform .18s ease, background .18s ease;
}
.menu-button:hover{ transform: translateY(-1px); background:rgba(255,255,255,.06); }
.menu-button .bar{ display:block;width:22px;height:2px;background:#fff;border-radius:2px;transition:transform .22s ease, opacity .22s ease; }
.menu-button.open .bar:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.menu-button.open .bar:nth-child(2){ opacity:0; }
.menu-button.open .bar:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* Side menu with subtle 3D slide */
.side-menu{
  position:fixed;top:0;right:-320px;width:300px;max-width:85vw;height:100vh;
  background:rgba(0,0,0,.9);color:#fff;padding:24px 18px;z-index:9998;overflow-y:auto;
  box-shadow:-6px 0 18px rgba(0,0,0,.45);
  transform: translateZ(0); transition: right .28s ease, transform .28s ease;
  transform-origin: right center; perspective: 800px;
}
.side-menu.open{ right:0; transform: rotateY(0deg); }
.side-menu nav a{ font-size:0.95rem; line-height:1.65; }

/* === Custom font for side menu links === */
@font-face {
  font-family: 'nostalgic-whispers';
  src: url('fonts/nostalgic-whispers-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Apply the nostalgic whispers typeface to items in the slide‑out side menu */
.side-menu a {
  font-family: 'nostalgic-whispers', sans-serif !important;
}

/* === Remove dark card styling from top headlines section === */
#top-headlines.card.glass {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* === Fade out other headlines when a summary is open === */
ul.headlines.fading li:not(.is-active) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* === Modal-style summary overlay for clicked headlines === */
.headline-summary {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  max-width: 800px;
  width: calc(100% - 40px);
  /*background: rgba(0, 0, 0, 0.6); */
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  backdrop-filter: blur(16px);
}
.headline-summary .actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.headline-summary button {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
.headline-summary button:hover {
  background: rgba(255,255,255,0.35);
}


/* === Force rm_typerighter_old for headline summary modal === */
@font-face {
  font-family: 'rmtyperighter';
  src: url('fonts/rm-typerighter-old/rm_typerighter_old.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

#article-summary-modal,
#article-summary-modal * {
  font-family: 'rmtyperighter', serif !important;
  line-height: 1.45;
  letter-spacing: 0.25px;
}

/* soft glow for readability 
#article-summary-modal .summary-content {
  text-shadow: 0 0 9px rgba(255,255,255,0.08);
    font-family: 'zai_RemingtonDeluxeTypewriter1938', serif !important;

}
*/
#article-summary-modal .summary-content {
  /* Preserve paragraph breaks in summaries by honouring newline characters. */
  white-space: pre-line;
  text-shadow: 0 0 9px rgba(255,255,255,0.08);
    font-family: 'arial', serif !important;

}

/* year accent inside summary text if wrapped in <strong> */
#article-summary-modal strong {
  color: #d7b46a;
  font-weight: 600;
}

/* big translucent year watermark 
#article-summary-modal::before {
  content: attr(data-year);
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  font-family: 'rmtyperighter', serif;
  font-size: clamp(64px, 18vw, 220px);
  line-height: 1;
  color: rgba(215,180,106,0.14);
  text-align: center;
  transform: translateY(-5%);
}
*/


/* === Soft vignette under modal content (subtle projection spill) === */
#article-summary-modal{
  overflow: hidden; /* keep vignette inside rounded corners */
}
#article-summary-modal::after{
  content: "";
  position: absolute;
  inset: -1px; /* bleed to edges */
  pointer-events: none;
  /* gentle center-clear radial with darker edges */
  background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0) 52%, rgba(0,0,0,0.06) 76%, rgba(0,0,0,0.10) 100%) 45%,
              rgba(0,0,0,0.07) 70%,
              rgba(0,0,0,0.12) 100%);
  opacity: 0;
  transition: opacity .6s ease;
}
#article-summary-modal.ready::after{
  opacity: 1;
}



/* === Mobile-safe sizing & scrolling for long summaries === */
#article-summary-modal{
  max-height: min(88dvh, 760px);
     overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(1rem + env(safe-area-inset-top, 0px));
}

/* --- Custom overlay menu (inspired by CodePen push‑right menu) --- */
/* The menu overlay slides in from the left when the menu button is clicked.
   It contains navigation links to each decade page and the home page. */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 80vw;
  max-width: 260px;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1100;
  padding: 2rem 1.25rem;
}
.menu-overlay nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu-overlay nav li {
  margin-bottom: 0.75rem;
}
.menu-overlay nav a {
  color: #a7cfff;
  text-decoration: none;
  font-family: 'nostalgic-whispers', sans-serif;
  font-size: 1.25rem;
}
.menu-overlay nav a:hover {
  color: #d9b869;
}
body.menu-open .menu-overlay {
  transform: translateX(0);
}

/* Position the menu button at the top‑right of the viewport. Use !important to ensure this overrides
   styles defined in later stylesheets (e.g. assets/style-shared.css). */
#top-right-controls {
  position: fixed !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 1200 !important;
}
.menu-button {
  display: inline-flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 5px !important;
  width: 42px !important;
  height: 42px !important;
  /* Remove border and rely on border-radius for shape */
  border: none !important;
  /* Lighten the menu button background so it stands out against the dark header */
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(6px) !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
  /* Remove debug border; if debugging is needed, comment back in */
  /* border: 1px solid rgba(255,255,255,0.4) !important; */
}
.menu-button .bar {
  display: block !important;
  width: 24px !important;
  height: 2px !important;
  background: #fff !important;
  border-radius: 2px !important;
  transition: transform 0.25s ease, opacity 0.25s ease !important;
}
.menu-button:hover {
  background: rgba(255, 255, 255, 0.06);
}
.menu-button.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-button.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-button.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* When the menu is open, shift the content to reveal the overlay */
.content-wrapper {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
body.menu-open .content-wrapper {
  transform: translateX(260px);
}

/* Fix the site header to the top of the page so it lines up with the menu */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.5rem 1rem;
}

/* Add top padding to the content to prevent it from being hidden under the fixed header */
.content-wrapper {
  padding-top: 70px;
}

/* Style the custom play/pause icon used for the video controls */
.ctrl-icon {
  width: 20px;
  height: 20px;
  pointer-events: none;
  display: none;
  /* Invert the play/pause icon so the dark PNG appears as light on the dark control button */
  filter: brightness(0) invert(1);
}

/* === Off‑canvas navigation menu (static markup) === */
/* Override the default side menu styles to behave like a left‑side overlay. When closed it is
   translated off‑screen to the left; when open (body.menu-open), it slides into view. */
/*
 * Removed custom styles for the built‑in `.side-menu`. The original menu is hidden
 * entirely via `#side-menu { display: none !important; }` because a new overlay
 * navigation is provided. Retaining this comment for context.
 */
/* Ensure the toggle button appears fixed in the top‑right */
#top-right-controls {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1200;
}
/* Hamburger button styling */
.menu-button {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  /* Remove any debugging border */
  border: none;

  /* Remove any temporary debug styling on the menu button */
  /* The menu button uses a subtle translucent background so it stands out on a dark header */
  background: rgba(255, 255, 255, 0.15) !important;
  border: none !important;
}
.menu-button .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-button:hover {
  background: rgba(255, 255, 255, 0.06);
}
.menu-button.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-button.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-button.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px){
  #article-summary-modal{
    top: 6dvh;
    left: 50%;
    transform: translateX(-50%); /* drop the vertical centering on small screens */
    width: calc(100% - 24px);
    max-height: calc(88dvh - env(safe-area-inset-bottom, 0px));
    border-radius: 10px;
     overflow: auto !important;
  }
}

/* === Custom overlay navigation === */
/* Hide the original slide‑out side menu completely */
#side-menu {
  display: none !important;
}

/* Overlay container that slides in from the left when open */
.menu-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  /* Set a fixed width for the overlay menu so it mirrors the CodePen demo. */
  width: 260px !important;
  max-width: 80vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.95) !important;
  color: #fff !important;
  overflow-y: auto !important;
  transform: translateX(-100%) !important;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 1200 !important;
  padding: 2rem 1.25rem !important;
  box-shadow: 6px 0 12px rgba(0,0,0,0.5) !important;
}

.menu-overlay.open {
  transform: translateX(0) !important;
}

/* Styling for the overlay heading */
.menu-overlay h3 {
  font-size: 1rem !important;
  margin: 0 0 1rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #d9b869 !important;
}

/* Unordered list and list items inside the overlay */
.menu-overlay .menu-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.menu-overlay .menu-list li {
  margin: 0.75rem 0 !important;
}

.menu-overlay .menu-list a {
  color: #a7cfff !important;
  text-decoration: none !important;
  font-family: 'nostalgic-whispers', sans-serif !important;
  font-size: 1.15rem !important;
  line-height: 1.4 !important;
}

.menu-overlay .menu-list a:hover {
  color: #d9b869 !important;
}

/* 2026-11-11: lightweight, accessible playback control (replaces PNG) */
#pauseBtn.ctrl {
  display: inline-grid !important;
  place-items: center;
  width: 46px !important;
  height: 46px !important;
  min-width: 46px;
  padding: 0 !important;
  margin: 0;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,.25) !important;
  background: rgba(15,20,29,.76) !important;
  color: #fff !important;
  font-size: 0 !important;
  line-height: 1 !important;
  box-shadow: 0 6px 22px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
#pauseBtn.ctrl:hover {
  background: rgba(38,53,72,.9) !important;
  border-color: rgba(255,255,255,.65) !important;
  transform: translateY(-1px);
}
#pauseBtn.ctrl:focus-visible {
  outline: 3px solid #d4e8ff;
  outline-offset: 3px;
}
#pauseBtn .video-control-icon {
  display: block;
  width: 21px;
  height: 21px;
  fill: currentColor;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #pauseBtn.ctrl { transition: none; }
}

/* === 2026-11-11: Consistent headline header spacing + clearer video on open === */
/* The headline section is the first content block on the decade pages.
   Use actual padding rather than a collapsing heading margin (which was
   being reset to zero on mobile in styles.css). */
#top-headlines {
  padding-top: clamp(105px, 12vh, 150px) !important;
}
#top-headlines > h2 {
  margin-top: 0 !important;
}
@media (max-width: 720px) {
  #top-headlines {
    padding-top: 76px !important;
  }
}

/* During an opened headline summary, let more of the moving footage show.
   The text's own shadow and a very light translucent panel preserve contrast. */
body.headline-open .bg-video {
  filter: saturate(1.12) contrast(1.03) brightness(1.02);
}
body.headline-open .video-overlay {
  background:
    radial-gradient(1200px 600px at 10% 0%, rgba(154,230,255,0.08), transparent 60%),
    radial-gradient(1000px 600px at 90% 100%, rgba(255,139,211,0.07), transparent 60%),
    rgba(0,0,0,0.17);
}
body.headline-open .vignette {
  box-shadow: inset 0 0 170px 30px rgba(0,0,0,0.50);
}
#article-summary-modal {
  background: linear-gradient(110deg, rgba(4,7,11,0.36), rgba(4,7,11,0.19));
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.38);
  border: 1px solid rgba(255,255,255,0.10);
}
#article-summary-modal .summary-content {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.96), 0 2px 10px rgba(0,0,0,0.85);
}


/* 2026-11-11: floating, seekable video timeline. Sits above the headline
   summary while leaving its text readable and clickable. */
#videoTimeline.video-timeline {
  position: fixed;
  z-index: 10030;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 13px;
  width: min(630px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 13px 18px;
  border: 1px solid rgba(255,255,255,0.23);
  border-radius: 16px;
  background: rgba(9,15,24,0.78);
  box-shadow: 0 9px 30px rgba(0,0,0,.38);
  -webkit-backdrop-filter: blur(13px);
  backdrop-filter: blur(13px);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: #fff;
  pointer-events: auto;
}
#videoTimeline.video-timeline[hidden] { display: none !important; }
#videoTimeline .video-timeline__time {
  flex: 0 0 auto;
  min-width: 36px;
  color: #fff;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
#videoTimeline .video-timeline__seek {
  --video-seek-percent: 0%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 7px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 100px;
  background: linear-gradient(to right, #d4e8ff 0%, #d4e8ff var(--video-seek-percent), rgba(255,255,255,.28) var(--video-seek-percent), rgba(255,255,255,.28) 100%);
  cursor: pointer;
  touch-action: none;
}
#videoTimeline .video-timeline__seek::-webkit-slider-runnable-track {
  height: 7px;
  border: 0;
  border-radius: 100px;
  background: transparent;
}
#videoTimeline .video-timeline__seek::-moz-range-track {
  height: 7px;
  border: 0;
  border-radius: 100px;
  background: transparent;
}
#videoTimeline .video-timeline__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 3px solid #edf6ff;
  border-radius: 50%;
  margin-top: -5.5px;
  background: #559bc8;
  box-shadow: 0 1px 7px rgba(0,0,0,.6);
}
#videoTimeline .video-timeline__seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid #edf6ff;
  border-radius: 50%;
  background: #559bc8;
  box-shadow: 0 1px 7px rgba(0,0,0,.6);
}
#videoTimeline .video-timeline__seek:focus-visible {
  outline: 3px solid #d4e8ff;
  outline-offset: 7px;
}
#videoTimeline .video-timeline__seek:disabled {
  opacity: .55;
  cursor: default;
}
@media (max-width: 600px) {
  #videoTimeline.video-timeline {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 12px 11px;
    gap: 8px;
    border-radius: 12px;
  }
  #videoTimeline .video-timeline__time { min-width: 32px; font-size: 11px; }
  #videoTimeline .video-timeline__seek { height: 8px; }
}

/* Reserve space beneath an open article for the fixed playback timeline. */
body.video-timeline-ready.headline-open #article-summary-modal {
  max-height: min(76dvh, 680px);
}
@media (max-width: 640px) {
  body.video-timeline-ready.headline-open #article-summary-modal {
    max-height: calc(88dvh - 70px - env(safe-area-inset-bottom, 0px));
  }
}


/* Mobile: keep the seek controls above Safari / Chrome bottom browser chrome.
   The bar remains visible while video metadata is loading. */
@media (max-width: 720px) {
  #videoTimeline.video-timeline:not([hidden]) {
    display: flex !important;
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    transform: none !important;
    z-index: 10050 !important;
    box-sizing: border-box !important;
  }
  #videoTimeline .video-timeline__time {
    min-width: 30px;
  }
  body.video-timeline-ready.headline-open #article-summary-modal {
    max-height: calc(86dvh - 124px - env(safe-area-inset-bottom, 0px));
  }
}


/* === Decade headline videos: fullscreen playback with seamless return === */
#videoTimeline .video-timeline__fullscreen {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 7px;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease;
}
#videoTimeline .video-timeline__fullscreen svg {
  width: 19px;
  height: 19px;
  display: block;
  pointer-events: none;
}
#videoTimeline .video-timeline__fullscreen:hover,
#videoTimeline .video-timeline__fullscreen:focus-visible {
  background: rgba(255,255,255,.28);
}
#videoTimeline .video-timeline__fullscreen:focus-visible,
.video-viewer-back:focus-visible {
  outline: 3px solid #d4e8ff;
  outline-offset: 3px;
}
.video-viewer-controls, .video-viewer-back { display: none; }

/* Fullscreen API (where available) or CSS fullscreen overlay (notably iPhone).
   The same video element remains in its original position in the DOM. */
body.video-viewer-open { overflow: hidden !important; }
body.video-viewer-open .video-wrap,
body.video-viewer-open .video-wrap:fullscreen {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  z-index: 2147483000 !important;
  overflow: hidden !important;
  background: #000 !important;
  isolation: isolate;
}
body.video-viewer-open .video-wrap .bg-video {
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  transform: none !important;
  object-fit: contain !important;
  filter: none !important;
}
body.video-viewer-open .video-wrap .video-overlay,
body.video-viewer-open .video-wrap .scanlines,
body.video-viewer-open .video-wrap .vignette { display: none !important; }
body.video-viewer-open .video-viewer-controls { display: block; }
body.video-viewer-open .video-viewer-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  position: fixed;
  z-index: 50;
  top: calc(18px + env(safe-area-inset-top, 0px));
  right: calc(20px + env(safe-area-inset-right, 0px));
  padding: 11px 15px;
  color: #fff;
  font: 600 14px/1.3 Inter, system-ui, sans-serif;
  border-radius: 12px;
  background: rgba(5,10,20,.78);
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 4px 20px rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
body.video-viewer-open .video-viewer-back svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}
body.video-viewer-open .video-viewer-back:hover { background: rgba(32,44,61,.95); }
body.video-viewer-open #videoTimeline.video-timeline {
  display: flex !important;
  position: fixed !important;
  z-index: 51 !important;
  left: 50% !important;
  right: auto !important;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(-50%) !important;
  width: min(720px, calc(100vw - 148px)) !important;
  max-width: none !important;
  box-sizing: border-box !important;
}
@media (max-width: 720px) {
  body.video-viewer-open .video-viewer-back {
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    padding: 10px 12px;
    font-size: 13px;
  }
  body.video-viewer-open #videoTimeline.video-timeline {
    bottom: calc(17px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px !important;
    right: 12px !important;
    transform: none !important;
    width: calc(100vw - 24px) !important;
  }
  #videoTimeline .video-timeline__fullscreen {
    width: 34px;
    height: 34px;
    padding: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #videoTimeline .video-timeline__fullscreen { transition: none; }
}


/* 2026-11-11: Audio controls integrated into the headline video timeline.
   The same timeline moves into fullscreen, so volume and mute stay accessible. */
#videoTimeline.video-timeline {
  width: min(795px, calc(100vw - 32px));
  gap: 10px;
}
#videoTimeline .video-timeline__audio {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 0;
}
#videoTimeline .video-timeline__mute {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 9px;
  background: rgba(255,255,255,.11);
  color: #fff;
  padding: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#videoTimeline .video-timeline__mute svg {
  display: block;
  width: 19px;
  height: 19px;
  pointer-events: none;
}
#videoTimeline .video-timeline__mute:hover {
  background: rgba(255,255,255,.24);
}
#videoTimeline .video-timeline__mute:focus-visible,
#videoTimeline .video-timeline__volume-range:focus-visible {
  outline: 3px solid #d4e8ff;
  outline-offset: 3px;
}
#videoTimeline .video-timeline__volume-range {
  --video-volume-percent: 75%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  flex: 0 0 84px;
  width: 84px;
  min-width: 0;
  height: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 100px;
  background: linear-gradient(to right, #d4e8ff 0%, #d4e8ff var(--video-volume-percent), rgba(255,255,255,.28) var(--video-volume-percent), rgba(255,255,255,.28) 100%);
  cursor: pointer;
  touch-action: manipulation;
}
#videoTimeline .video-timeline__volume-range::-webkit-slider-runnable-track {
  border: none;
  border-radius: 100px;
  height: 7px;
  background: transparent;
}
#videoTimeline .video-timeline__volume-range::-moz-range-track {
  border: none;
  border-radius: 100px;
  height: 7px;
  background: transparent;
}
#videoTimeline .video-timeline__volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -3.5px;
  border-radius: 50%;
  border: 2px solid #e9f4ff;
  background: #559bc8;
  box-shadow: 0 1px 6px rgba(0,0,0,.5);
}
#videoTimeline .video-timeline__volume-range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 2px solid #e9f4ff;
  border-radius: 50%;
  background: #559bc8;
}
body.video-ios-volume #videoTimeline .video-timeline__volume-range { display: none; }

/* A second row on narrow screens keeps the SEEK bar easy to use,
   instead of squeezing it between small volume/time controls. */
@media (max-width: 600px) {
  #videoTimeline.video-timeline:not([hidden]) {
    display: grid !important;
    grid-template-columns: auto minmax(0,1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 7px 9px;
    padding: 10px 12px;
  }
  #videoTimeline #videoCurrentTime { grid-column: 1; grid-row: 1; }
  #videoTimeline #videoSeekBar { grid-column: 2; grid-row: 1; min-width: 0; }
  #videoTimeline #videoTotalTime { grid-column: 3; grid-row: 1; }
  #videoTimeline .video-timeline__audio { grid-column: 1 / 3; grid-row: 2; }
  #videoTimeline .video-timeline__fullscreen { grid-column: 3; grid-row: 2; justify-self: end; }
  #videoTimeline .video-timeline__volume-range {
    flex-basis: min(145px, 45vw);
    width: min(145px, 45vw);
  }
  body.video-timeline-ready.headline-open #article-summary-modal {
    max-height: calc(86dvh - 180px - env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 350px) {
  #videoTimeline.video-timeline { gap: 5px 6px; padding: 8px 9px; }
  #videoTimeline .video-timeline__volume-range { flex-basis: 96px; width: 96px; }
}
/* Preserve the two-row layout while the timeline is relocated into fullscreen. */
@media (max-width: 600px) {
  body.video-viewer-open #videoTimeline.video-timeline:not([hidden]) { display: grid !important; }
}


/* === 2026-11-11: Mobile modal actions + integrated timeline play/pause === */
/* A fixed-size action row prevents Close/Learn more from scrolling below the
   visible viewport, even when long summaries or mobile browser bars are present. */
#article-summary-modal {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 0;
  overflow: hidden !important;
}
#article-summary-modal .summary-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
#article-summary-modal .actions {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.22);
  background: rgba(7,11,19,.42);
  border-radius: 0 0 6px 6px;
}
#article-summary-modal .actions a,
#article-summary-modal .actions button {
  min-height: 44px;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 10px 15px !important;
  line-height: 1.25 !important;
  font-size: 15px !important;
  white-space: nowrap;
  touch-action: manipulation;
}
#article-summary-modal .actions :is(a,button):focus-visible {
  outline: 3px solid #d4e8ff;
  outline-offset: 2px;
}
/* Pause/play is now part of the timeline, not a separate footer button. */
#videoTimeline #pauseBtn.ctrl {
  flex: 0 0 38px;
  display: inline-grid !important;
  position: static !important;
  z-index: auto !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  padding: 8px !important;
  margin: 0 !important;
  border-radius: 10px !important;
  transform: none !important;
  box-shadow: none !important;
}
#videoTimeline #pauseBtn .video-control-icon {
  width: 19px;
  height: 19px;
}
/* Keep modal entirely above the two-row video controls on small devices. */
@media (max-width: 720px) {
  #article-summary-modal {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top, 0px));
    bottom: calc(170px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    height: auto;
    max-height: none !important;
    padding: 12px 14px;
  }
  #article-summary-modal .actions {
    justify-content: stretch;
    gap: 8px;
    padding-top: 10px;
    margin-top: 10px;
  }
  #article-summary-modal .actions a,
  #article-summary-modal .actions button {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px !important;
  }
  /* The video controls' first row is for seeking; second is playback/audio/fullscreen. */
  #videoTimeline.video-timeline:not([hidden]) {
    display: grid !important;
    grid-template-columns: auto minmax(0,1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px 9px;
  }
  #videoTimeline #videoCurrentTime { grid-column: 1; grid-row: 1; }
  #videoTimeline #videoSeekBar { grid-column: 2; grid-row: 1; }
  #videoTimeline #videoTotalTime { grid-column: 3; grid-row: 1; }
  #videoTimeline #pauseBtn.ctrl { grid-column: 1; grid-row: 2; justify-self: start; }
  #videoTimeline .video-timeline__audio { grid-column: 2; grid-row: 2; min-width: 0; }
  #videoTimeline .video-timeline__fullscreen { grid-column: 3; grid-row: 2; justify-self: end; }
  #videoTimeline .video-timeline__volume-range { flex: 1 1 auto; width: min(130px, 30vw); }
  body.video-viewer-open #videoTimeline.video-timeline:not([hidden]) { display: grid !important; }
}
@media (max-width: 360px) {
  #article-summary-modal .actions a,
  #article-summary-modal .actions button { font-size: 13px !important; padding-inline: 8px !important; }
  #videoTimeline .video-timeline__audio { gap: 4px; }
  #videoTimeline .video-timeline__volume-range { width: min(80px, 23vw); }
}
/* Short landscape viewports: reserve enough room for the action row and
   keep the summary text scrollable. */
@media (max-height: 460px) and (max-width: 920px) {
  #article-summary-modal {
    top: calc(4px + env(safe-area-inset-top, 0px));
    bottom: calc(140px + env(safe-area-inset-bottom, 0px));
  }
  #article-summary-modal {
    left: 50%;
    transform: translateX(-50%);
    height: auto;
    max-height: none !important;
  }
  #article-summary-modal .actions { margin-top: 5px; padding-top: 5px; }
}
