/* Article Detail Page - Dazed-inspired layout with 25-50-25 structure */

/* ─── Reading progress bar ──────────────────────────────────────────────────
   Fixed to the very top of the viewport. Width is driven by JS via the
   inline style `width: X%`. Using will-change: width promotes the element
   to its own compositor layer so the browser repaints only this strip,
   not the whole page, on each scroll tick.                               */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 0%;
  height: 3px;
  background-color: #ff4cfa; /* --accent-color */
  border-radius: 0;          /* flat edge-to-edge, no rounding */
  will-change: width;        /* GPU compositing hint */
  pointer-events: none;      /* never intercept clicks/taps */
}

/* ─── Scroll-to-top button ──────────────────────────────────────────────────
   44×44px circle (meets WCAG 2.5.5 touch target). Hidden by default;
   JS adds `.scroll-top--visible` once scrollY > 300px.

   The translate animation is suppressed via prefers-reduced-motion —
   opacity alone is safe (not vestibular-triggering). The hover scale is
   also suppressed so no motion occurs at all for that preference.        */
.scroll-top-btn {
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 9998;

  /* Size & shape */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;

  /* Brutalist palette: black bg, white icon */
  background-color: #000000;
  color: #ffffff;

  /* Flex-centre the SVG arrow */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Hidden state: invisible + inert, shifted down 10px */
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);

  /* Smooth reveal / hide — background-color + color included for footer-inversion transition */
  transition: opacity 200ms ease, transform 200ms ease, box-shadow 200ms ease,
              background-color 150ms ease, color 150ms ease;
}

/* Visible state — added by JS */
.scroll-top-btn.scroll-top--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Hover: slight scale + shadow for depth */
.scroll-top-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Combined selector: when visible AND hovered, override base translateY(0) */
.scroll-top-btn.scroll-top--visible:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Focus ring for keyboard users */
.scroll-top-btn:focus-visible {
  outline: 2px solid #ff4cfa;
  outline-offset: 3px;
}

/* Mobile: lift above any bottom nav bars (safe-area aware) */
@media (max-width: 768px) {
  .scroll-top-btn {
    bottom: 80px;
    right: 16px;
  }
}

/* Reduced-motion: drop the translate entirely, keep opacity */
@media (prefers-reduced-motion: reduce) {
  .scroll-top-btn {
    transform: none !important;
    transition: opacity 200ms ease;
  }
  .scroll-top-btn:hover {
    transform: none !important;
    box-shadow: none;
  }
}


/* Footer-inversion state — added/removed by JS scroll check.
   When the button overlaps the black footer, flip to white bg + black icon.
   The transition on background-color/color (declared above) makes this smooth. */
.scroll-top-btn.scroll-top--on-footer {
  background-color: #ffffff;
  color: #000000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.article-detail {
  width: 100%;
  background: #ffffff;
}

/* Main Content Wrapper: 25% | 50% | 25% Layout */
.article-wrapper {
  display: grid;
  /* Desktop: left sidebar (1fr) | main (2fr) | right sidebar (1fr) */
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-areas: "sidebar-left main sidebar-right";
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
  /* `stretch` (grid default) — every column shares the row height.
   * `.sidebar-left` then stretches to match the article body so the
   * sticky `.sidebar-left__center` child has scroll range to engage. */
  align-items: stretch;
  box-sizing: border-box;
}

/* Sidebars (25% each - empty for now) */
.sidebar-left {
  display: block;
  grid-area: sidebar-left;
  background: #ffffff;
}

.sidebar-right {
  display: block;
  grid-area: sidebar-right;
  background: #ffffff;
}

/* Center Content Column (50%) */
.article-content-column {
  grid-area: main;
  width: 100%;
  max-width: 100%;
  padding: 0 20px;
}

/* Hero section constrained to 70-80% width with proper margins */
.article-hero-split {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 900px;
  margin: 40px auto;
  border: 3px solid #000000;
  overflow: hidden;
  background: #ffffff;
  /* Allow section to grow based on content height */
}

/* Hero Image Container - dynamic height to match content */
.hero-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: stretch;
  justify-content: center;
  /* Remove min-height and height so it adapts to image */
}

.hero-image-aspect {
  width: 100%;
  display: block;
  aspect-ratio: 16/9; /* Default, will be overridden by image if possible */
  position: relative;
}

.hero-image-aspect img.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Category and tags positioned below image with black background */
/* Category and tags section below image */
.hero-labels-below {
  background: #000000;
  padding: 24px 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto 40px;
}

/* Force category to have black background with white text, matching reference */
/* Category label with black background and white text */
.label-primary {
  background: #000000 !important; /* Force black background regardless of inline styles */
  color: #ffffff;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #ffffff;
  border-radius: 4px; /* Small radius for rectangle shape */
}

.label-primary:hover {
  transform: translateY(-2px);
}

/* Update tags to match reference with white background and black border */
/* Tags with outlined pill style */
.label-tag {
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 50px; /* High radius for oval/pill shape */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.label-tag:hover {
  background: #000000; /* Black background on hover */
  color: #ffffff; /* White text on hover */
  border-color: #000000;
  transform: translateY(-2px);
}

/* Remove old hero-labels positioning (was absolute on image) */
.hero-labels {
  display: none;
}

.label-secondary {
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.label-secondary:hover {
  transform: translateY(-2px);
  background: #000000;
  color: #ffffff;
}

/* Improved vertical date positioning - centered on right edge */
.hero-date {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #000000;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px 8px;
  border-radius: 3px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-date:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-50%) translateX(-2px);
}

/* Slip-in entrance: the date plate slides 18px in from outside the right
 * edge and fades up — like a paper tab sliding into place. The full
 * transform is written at each keyframe so the existing `translateY(-50%)`
 * centring is composed (not fought). 250ms delay lets the cover image
 * paint first so the date doesn't pop in before its backdrop. */
@keyframes hero-date-slip {
  0%   { opacity: 0; transform: translate(18px, -50%); }
  100% { opacity: 1; transform: translate(0, -50%); }
}

.hero-date--enter {
  opacity: 0;
  animation: hero-date-slip 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .hero-date--enter {
    animation: none;
    opacity: 1;
    transform: translateY(-50%);
  }
}

/* Enhanced info icon with better animations */
.hero-info-icon {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-info-icon:hover {
  background: #000000;
  border-color: #000000;
  transform: scale(1.1) rotate(180deg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero-info-icon:hover svg {
  stroke: #ffffff;
}

.hero-info-icon:active {
  transform: scale(0.95) rotate(180deg);
}

.hero-info-icon svg {
  width: 18px;
  height: 18px;
  stroke: #000000;
  transition: stroke 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* New slide-up description panel */
.image-description-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  color: #ffffff;
  padding: 30px 25px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  backdrop-filter: blur(10px);
}

.image-description-panel.active {
  transform: translateY(0);
}

.description-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 2px solid #ffffff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.description-close:hover {
  background: #ffffff;
  transform: rotate(90deg);
}

.description-close:hover::before,
.description-close:hover::after {
  background: #000000;
}

.description-close::before,
.description-close::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  background: #ffffff;
  transition: background 0.3s ease;
}

.description-close::before {
  transform: rotate(45deg);
}

.description-close::after {
  transform: rotate(-45deg);
}

.description-content h3 {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 12px 0;
  color: #ffffff;
}

.description-content p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 10px 0;
  color: rgba(255, 255, 255, 0.9);
}

.description-content .credit {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hero Text Panel (right side) */
.hero-text-panel {
  background: #ffffff;
  padding: 35px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-title-hero {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
  color: #000000;
}

.article-excerpt-hero {
  font-size: 14px;
  line-height: 1.6;
  color: #333333;
  margin: 0 0 30px 0;
  padding-top: 20px;
  border-top: 1px solid #000000;
}

/* Enhanced share button with smooth animations */
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border: 2px solid #000000;
  border-radius: 25px;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  align-self: flex-start;
  color: #000000;
  position: relative;
  overflow: hidden;
}

.share-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: #000000;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.share-button:hover::before {
  width: 300px;
  height: 300px;
}

.share-button:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.share-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.share-button:hover svg {
  stroke: #ffffff;
  transform: translateY(-3px) rotate(-5deg);
}

.share-button svg {
  width: 16px;
  height: 16px;
  stroke: #000000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

/* Author Credit */
.article-author {
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.15em;
  margin: 40px 0 60px 0;
  padding: 0;
  color: #000000;
}

.media-description {
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #555;
  margin-top: 8px;
  max-width: 100%;
}

.media-credit {
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-style: normal;
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
  text-align: right;
}

/* Article Body */
.article-body {
  margin-bottom: 60px;
}

.article-segment {
  margin-bottom: 40px;
}

.segment-text {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 30px;
  color: #000000;
}

.segment-text p {
  margin-bottom: 20px;
}

.segment-text a {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.segment-text a:hover {
  opacity: 0.7;
}

.segment-media {
  margin: 40px 0;
}

.segment-media img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #e0e0e0;
}

.article-content {
  font-size: 16px;
  line-height: 1.8;
  color: #000000;
}

.article-content p {
  margin-bottom: 20px;
}

/* Article Gallery */
.article-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 60px;
}

.gallery-item {
  width: 100%;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Tablet Layout */
@media (min-width: 768px) {
  .article-content-column {
    padding: 0 40px;
  }

  /* Split hero layout with auto-sized image column to match image proportions */
  .article-hero-split {
    grid-template-columns: 3fr 2fr;
    margin: 60px auto 0;
    max-width: 950px;
    border: 3px solid #000000;
  }

  /* Labels section spans full width below image on tablet */
  .hero-labels-below {
    max-width: 950px;
    padding: 28px 40px;
    gap: 14px;
    margin: 0 auto 60px;
  }

  .label-primary {
    padding: 12px 20px;
    font-size: 13px;
  }

  .label-tag {
    padding: 10px 18px;
    font-size: 12px;
  }

  /* Keep 50vh minimum height on tablet */
  .hero-image-container {
    /* Use min-height to allow dynamic growth */
    /* Set max-width to prevent image from being too wide */
    border-right: 3px solid #000000;
  }

  .hero-text-panel {
    padding: 50px 40px;
    /* Ensure text panel can grow vertically */
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .article-title-hero {
    font-size: 40px;
    margin-bottom: 25px;
  }

  .article-excerpt-hero {
    font-size: 15px;
    margin-bottom: 35px;
    padding-top: 25px;
  }

  .article-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  /* Better date positioning on larger screens */
  .hero-date {
    right: 25px;
    padding: 16px 10px;
    font-size: 12px;
  }

  .hero-info-icon {
    width: 40px;
    height: 40px;
    bottom: 25px;
    right: 25px;
  }

  .hero-info-icon svg {
    width: 20px;
    height: 20px;
  }

  .image-description-panel {
    padding: 40px 35px;
  }

  /* Category + Tags row below hero (rectangle category + oval tags */
  .category-tags-row {
    /* match the hero's max-width on tablet and center it */
    max-width: 950px;
    margin: 18px auto 32px; /* centered like .article-hero-split */
    padding: 0 20px;
    justify-content: flex-start; /* left-align items inside the centered container */
    gap: 12px;
    flex-wrap: wrap;
  }
}

/* Mobile (max-width: 767px): center text/content and remove hero border */
@media (max-width: 767px) {
  /* Make hero visually lighter on mobile by removing the heavy border */
  .article-hero-split {
    border: none;
    max-width: 100%;
    box-shadow: none;
    padding: 0; /* ensure no extra internal spacing */
  }
  .article-text-panel {
    padding: 10px 10px; !important;
  }

  /* Hide the hero (top) share button on mobile; use the below-article share button instead */
  .article-hero-split .share-button { display: none !important; }

  /* Center main textual content for better mobile readability */
  .article-content-column,
  .hero-text-panel,
  .article-body,
  .segment-text,
  .article-author,
  .read-also-section,
  .category-tags-row {
    text-align: center;
    align-items: center;
    justify-content: center;
  }

  /* Make the hero text panel center its children */
  .hero-text-panel {
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Center headings and excerpt */
  .article-title-hero,
  .article-excerpt-hero,
  .read-also-title {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  /* Center images inside segments/galleries and make hero image properly centered */
  .segment-media img,
  .gallery-item img,
  .hero-image {
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: 100% !important; /* ensure the hero image fills the container */
    max-width: 100% !important;
    height: auto !important;
    object-position: center center !important; /* center crop focus */
  }

  /* Narrower content padding on mobile */
  .article-content-column {
    padding: 0 16px;
  }

  /* Ensure read-also grid stacks nicely and centers its cards */
  .read-also-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
  }

  /* Category tags row: center and stack if needed */
  .category-tags-row {
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
  }

  /* Show sidebars after the article on mobile and center their contents.
     ORDER: article content (1), right sidebar (2), left sidebar (3) so Read-Also appears after both. */
  .article-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .article-content-column {
    order: 1;
    width: 100%;
    max-width: 900px;
  }

  .sidebar-right,
  .sidebar-left {
    display: block;
    width: 100%;
    max-width: 900px;
    padding: 12px 16px;
    box-sizing: border-box;
    background: transparent; /* keep background consistent */
  }

  /* Ensure right sidebar appears first, then left sidebar, then Read-Also */
  .sidebar-right { order: 2; !important; }
  .sidebar-left { order: 3; }

  /* Center contents inside sidebars */
  .sidebar-left .sticky-bottom,
  .sidebar-right .editors-pick-list {
    margin: 0 auto;
    text-align: center;
  }

  /* Ensure editors pick descriptions are centered on mobile */
  .editors-pick-list .editors-pick-content {
    text-align: center;
    display: block;
  }

  /* Add quick animation class used before delayed navigation */
  .delayed-nav-anim {
    transition: transform 1.8s ease, opacity 1.8s ease;
    transform-origin: center;
    transform: scale(0.97) translateY(-6px);
    opacity: 0.65;
  }

  /* Ensure read-also elements stack and are centered on mobile (existing rules) */
  .read-also-section {
    padding: 40px 20px 60px;
  }

  /* Fix: make the publish date visible and properly sized on mobile */
  .read-also-date {
    display: block;
    font-size: 13px; /* legible size on small screens */
    font-weight: 700;
    margin-top: 8px; /* space between title/subtitle and date */
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
}

/* Desktop Layout: 25% | 50% | 25% */
@media (min-width: 1200px) {
  .article-wrapper {
    grid-template-columns: 1fr 2fr 1fr;
    gap: 0;
    padding: 0;
  }

  /* Left sidebar — plain block so the sticky-centred `.sidebar-left__center`
   * child can engage. The previous `flex; justify-content: flex-end`
   * pushed the widget below the viewport, where sticky never engaged.
   * Plain block flow + sticky child is the canonical pattern. */
  .sidebar-left {
    display: block;
    padding: var(--space-xl) var(--space-lg);
    margin-top: var(--space-xl);
    position: relative;
  }

  /* Hot Right Now follows the reader as they scroll the article body —
   * pinned just under the fixed header for the duration of the read.
   *
   * Pattern: a sticky full-viewport-height wrapper with flex-centred
   * content. The widget always sits at the visible vertical middle.
   * Works in every browser (no `top: 50%` + transform fragility).  */
  .sidebar-left__center {
    position: sticky;
    top: calc(var(--header-main-height, 80px)
            + var(--header-nav-height, 52px));
    height: calc(100vh
               - var(--header-main-height, 80px)
               - var(--header-nav-height, 52px));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
    z-index: 3;
  }

  .sidebar-left__center::-webkit-scrollbar {
    width: 6px;
  }
  .sidebar-left__center::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 3px;
  }

  .sidebar-left__center > * {
    width: 100%;
  }

  .sidebar-right {
    display: block;
    min-height: 100vh;
    padding: var(--space-xl) var(--space-lg);
    margin-top: var(--space-xl);
    position: relative;
  }

  /* Only the hot-right-now wrapper becomes sticky to the bottom of the sidebar.
     Keep it simple: standard sticky, no overflow forcing, small bottom gap, and a z-index. */
  .sidebar-left .hot-right-now.sticky-bottom {
    position: sticky;
    bottom: calc(var(--space-lg) + 12px); /* small gap from viewport bottom */
    display: block;
    width: 100%;
    max-height: none; /* do not force internal scroll here */
    padding: 6px 0;
    z-index: 3;
  }

  /* Ensure inner hot widget fills wrapper width */
  .sidebar-left .hot-right-now.sticky-bottom > * {
    width: 100%;
  }

  /* Enhanced behavior when JS toggles fixed positioning for "stick from bottom" UX. */
  /* Apply only on desktop (matching layout rules above). */
  @media (min-width: 1200px) {
    /* Fixed to viewport bottom (left & width set by JS to match sidebar) */
    .sidebar-left .hot-right-now.fixed-bottom {
      position: fixed;
      bottom: calc(var(--space-lg) + 12px);
      z-index: 1000;
      /* left/width set inline by JS to avoid layout jumps */
      box-shadow: 0 6px 18px rgba(0,0,0,0.08);
      background: var(--color-background);
      transition: transform 200ms var(--transition-normal);
    }

    /* When widget should be pinned to the bottom of the sidebar container */
    .sidebar-left .hot-right-now.absolute-bottom {
      position: absolute;
      bottom: calc(var(--space-lg) + 12px);
      left: 0;
      width: 100%;
      z-index: 3;
    }
  }

  .article-content-column {
    padding: 0 var(--space-2xl);
  }

  /* Hero section at 75% width with proper spacing */
  .article-hero-split {
    margin: 80px auto 0;
    max-width: 75%;
    border: 3px solid #000000;
  }

  /* Labels section for desktop - independent section below hero */
  .hero-labels-below {
    max-width: 75%;
    padding: 32px 50px;
    gap: 16px;
    margin: 0 auto 80px;
  }

  .label-primary {
    font-size: 13px;
  }

  .label-tag {
    font-size: 12px;
  }

  .segment-text,
  .article-content {
    font-size: 17px;
    line-height: 1.9;
  }

  /* Category + Tags row below hero (rectangle category + oval tags */
  .category-tags-row {
    /* match the hero's width (75%) and center it so left edges line up */
    width: 75%;
    max-width: none;
    margin: 18px auto 32px;
    padding: 0 20px;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }
}

/* Large Desktop */
@media (min-width: 1400px) {
  .hero-text-panel {
    padding: 60px 50px;
  }

  .article-title-hero {
    font-size: 48px;
  }

  .article-excerpt-hero {
    font-size: 16px;
  }

  .article-content-column {
    padding: 0 80px;
  }

  /* Maintain 70-80% width on very large screens */
  .article-hero-split {
    max-width: 1100px;
    border: 3px solid #000000;
  }
}

/* Print Styles */
@media print {
  .share-button,
  .hero-info-icon,
  .sidebar-left,
  .sidebar-right,
  .image-description-panel {
    display: none;
  }

  .article-wrapper {
    grid-template-columns: 1fr;
  }

  .article-hero-split {
    border: 1px solid #000000;
  }
}

/* READ ALSO Section - unified title/subtitle style and hover underline */
.read-also-category {
  /* change category color to black and keep background neutral */
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000000;              /* changed from white to black */
  background: transparent;     /* neutral background */
  padding: 8px 16px;
  margin-bottom: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure category doesn't shift color on hover - keep stable */
.read-also-card:hover .read-also-category,
.read-also-card:focus .read-also-category {
  transform: translateX(4px);
  color: #000000;
  background: transparent;
}

/* Title & subtitle: same visual style (color/weight), no fade on hover */
.read-also-article-title,
.read-also-subtitle {
  color: #000000;             /* same color for title & subtitle */
  font-weight: 700;           /* matching weight (adjust if you prefer bolder) */
  margin: 0;
  transition: text-decoration 160ms ease, transform 160ms ease;
  text-decoration: none;      /* no default underline */
}

/* Underline title and subtitle on card hover/focus without changing color */
.read-also-card:hover .read-also-article-title,
.read-also-card:focus .read-also-article-title,
.read-also-card:focus-visible .read-also-article-title,
.read-also-card:hover .read-also-subtitle,
.read-also-card:focus .read-also-subtitle,
.read-also-card:focus-visible .read-also-subtitle {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: currentColor; /* preserve text color */
  opacity: 1; /* ensure no fade */
}

/* Keep image scale / card translate if desired, but do not fade title/subtitle */
.read-also-card:hover .read-also-image img {
  transform: scale(1.08);
}

/* Ensure focus/visited states don't leave title faded */
.read-also-card:focus .read-also-article-title,
.read-also-card:focus-visible .read-also-article-title,
.read-also-card:visited .read-also-article-title,
.read-also-card:focus .read-also-subtitle,
.read-also-card:focus-visible .read-also-subtitle,
.read-also-card:visited .read-also-subtitle {
  opacity: 1 !important;
  text-decoration: none;
}

/* READ ALSO Section - horizontal grid matching reference design */
.read-also-section {
  width: 100%;
  background: #ffffff;
  margin-top: 60px;
}

.read-also-container {
  max-width: 1400px;
  margin: 0 auto;
}

.read-also-title {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 60px 0;
  color: #000000;
  text-align: left;
}

.read-also-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.read-also-card {
  text-decoration: none;
  display: block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.read-also-card:hover {
  transform: translateY(-8px);
}

/* Category label positioned above image with white text */
.read-also-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  padding: 8px 16px;
  margin-bottom: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.read-also-card:hover .read-also-category {
  transform: translateX(4px);
}

.read-also-image {
  width: 100%;
  height: 450px;
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 20px;
  position: relative;
  /* Collapse the line box so the inline <img> baseline can't leave
   * a 4-5px gap inside the slot. */
  line-height: 0;
  font-size: 0;
}

/* The picture tag wraps every cover image in a <picture> element.
 * Without these rules the wrapper would shrink to the image's natural
 * height (the global `picture > img { height: auto }` cascades), so
 * the img's `height: 100%` resolves against that natural height
 * instead of the card's fixed 450px slot — the image renders at the
 * wrong size and overflow:hidden clips weirdly. Mirror the slot
 * dimensions on the picture wrapper, then let the img cover-fill. */
.read-also-image picture,
.read-also-image > picture {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
  font-size: 0;
  margin: 0;
  padding: 0;
}

.read-also-image img,
.read-also-image picture > img {
  display: block;            /* prevent inline baseline space */
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  padding: 0;
  vertical-align: top;       /* belt-and-braces: no baseline alignment */
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.read-also-card:hover .read-also-image img {
  transform: scale(1.08);
}

/* Content restructured with title first, then subtitle, then date */
.read-also-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.read-also-article-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #000000;
  margin: 0;
  transition: opacity 0.2s ease;
}

.read-also-card:hover .read-also-article-title {
  opacity: 0.6;
}

/* New subtitle styling */
.read-also-subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: #666666;
  margin: 0;
}

.read-also-date {
  font-size: 13px;
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Tablet responsive */
@media (min-width: 768px) {
  .read-also-section {
    padding: 100px 40px 120px;
  }

  .read-also-title {
    font-size: 48px;
    margin-bottom: 70px;
  }

  .read-also-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
  }

  .read-also-category {
    font-size: 13px;
    padding: 10px 18px;
    margin-bottom: 18px;
  }

  .read-also-image {
    height: 500px;
  }

  .read-also-article-title {
    font-size: 20px;
  }

  .read-also-subtitle {
    font-size: 15px;
  }

  .read-also-date {
    font-size: 14px;
  }
}

/* Desktop responsive */
@media (min-width: 1200px) {
  .read-also-section {
    padding: 120px 60px 140px;
  }

  .read-also-title {
    font-size: 52px;
    margin-bottom: 80px;
  }

  .read-also-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
  }

  .read-also-image {
    height: 450px;
  }

  .read-also-category {
    font-size: 13px;
    padding: 10px 18px;
    margin-bottom: 20px;
  }

  .read-also-article-title {
    font-size: 22px;
  }

  .read-also-subtitle {
    font-size: 15px;
  }

  .read-also-date {
    font-size: 14px;
  }
}

/* Large desktop */
@media (min-width: 1600px) {
  .read-also-container {
    max-width: 1600px;
  }

  .read-also-image {
    height: 500px;
  }
}

/* Category + Tags row below hero (rectangle category + oval tags */
.category-tags-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center; /* center on small screens */
  max-width: 900px;
  margin: 18px auto 32px;
  padding: 0 20px;
  flex-wrap: wrap;
}

/* Category: black rectangle with white text */
.category-tags-row .category-link {
  display: inline-block;
  background: #000000;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 18px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

/* Tags: white oval pills with black border/text */
.category-tags-row .tags-list {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Tags — original white pill style restored. */
.category-tags-row .tag-badge {
  display: inline-block;
  padding: 7px 7px;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.category-tags-row .tag-badge:hover,
.category-tags-row .tag-badge:focus {
  background: #000000;
  color: #ffffff;
  transform: translateY(-3px);
  outline: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.category-tags-row .category-link:hover,
.category-tags-row .category-link:focus {
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  color: #ffffff; /* ensure color stays white */
}

/* Keep underline/text-decoration disabled on hover */
.category-tags-row .category-link,
.category-tags-row .tag-badge {
  text-decoration: none;
}

.article-view-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #888888;
  margin-top: 14px;
}

/* Accessibility: visible focus state for keyboard users */
.category-tags-row .category-link:focus,
.category-tags-row .tag-badge:focus {
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12), 0 6px 18px rgba(0,0,0,0.12);
}

/* Responsive tweaks */
@media (max-width: 767px) {
  .category-tags-row {
    justify-content: center;
    gap: 8px;
    margin: 12px auto 20px; /* centered via auto left/right */
  }
}

@media (min-width: 768px) {
  /* Tablet: align left edge of the category row with the hero's left edge (hero max-width: 950px) */
  .category-tags-row {
    /* match the hero's max-width on tablet and center it */
    max-width: 950px;
    margin: 18px auto 32px; /* centered like .article-hero-split */
    padding: 0 20px;
    justify-content: flex-start; /* left-align items inside the centered container */
    gap: 12px;
    flex-wrap: wrap;
  }
}

@media (min-width: 1200px) {
  /* Desktop: hero uses max-width: 75% — align category row to that left edge */
  .category-tags-row {
    /* match the hero's width (75%) and center it so left edges line up */
    width: 75%;
    max-width: none;
    margin: 18px auto 32px;
    padding: 0 20px;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }
}

/* Prevent "stuck hover" when navigating back or when links remain focused.
   1) Only apply the hover/scale effects on devices that actually support a pointer hover
      (this prevents touch devices / restored focus from showing hover effects).
   2) Reset transforms/opacity for focused/visited cards so browser-back focus doesn't
      leave a card visually in the hovered state.
*/
@media (hover: hover) {
  .read-also-card:hover { transform: translateY(-8px); }
  .read-also-card:hover .read-also-image img { transform: scale(1.08); }
  .read-also-card:hover .read-also-article-title { transform: scale(1.02); }
}

/* When a card is focused (e.g. after clicking and returning) or visited, explicitly
   reset the visual hover transforms. Use !important to ensure we override any
   existing transition/transform left by the browser restore. */
.read-also-card:focus,
.read-also-card:focus-visible,
.read-also-card:visited {
  transform: none !important;
}

.read-also-card:focus .read-also-image img,
.read-also-card:focus-visible .read-also-image img,
.read-also-card:visited .read-also-image img {
  transform: none !important;
}

.read-also-card:focus .read-also-article-title,
.read-also-card:focus-visible .read-also-article-title,
.read-also-card:visited .read-also-article-title {
  opacity: 1 !important;
}

/* Keep keyboard accessibility — show a subtle focus ring only when appropriate */
.read-also-card:focus {
  outline: none;
}

.read-also-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}

/* ---------- CHANGES: remove scale/fade on read-also hover, ensure category is black ---------- */

/* Ensure read-also category is black (override previous white rule) */
.read-also-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000000;           /* force black */
  background: transparent;
  padding: 8px 16px;
  margin-bottom: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Title & subtitle unified style already present; keep color and weight stable */
.read-also-article-title {
  color: #000000;
  font-weight: 700;
  margin: 0;
  text-decoration: none;
}

/* Remove any fading on hover: ensure opacity stays 1 */
.read-also-card .read-also-article-title,
.read-also-card .read-also-subtitle {
  opacity: 1 !important;
}

/* Remove transform and image scaling on hover: keep cards static visually */
.read-also-card:hover,
.read-also-card:focus,
.read-also-card:focus-visible,
.read-also-card:visited {
  transform: none !important;
}

/* Prevent image scale on hover */
.read-also-card .read-also-image img {
  transition: transform 0.3s ease; /* keep transition but do not change transform on hover */
  transform: none;
}

/* Explicitly disable hover image transform */
.read-also-card:hover .read-also-image img,
.read-also-card:focus .read-also-image img,
.read-also-card:focus-visible .read-also-image img {
  transform: none !important;
}

/* =============================================================
   Reveal-on-scroll — lazy fade + lift as items enter the viewport.
   The IntersectionObserver in article_detail.js toggles `.is-revealed`
   on every `.reveal-on-scroll` element. Per-parent stagger is set
   via a `--reveal-i` custom property on each item; CSS reads it as
   a transition delay so cascading lists reveal one-by-one.
   ============================================================= */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--reveal-i, 0) * 60ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =============================================================
   Poster — download button + size/template picker modal
   ============================================================= */
.share-button,
.poster-button {
  text-transform: uppercase;
}

.poster-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border: 2px solid #000000;
  border-radius: 25px;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  align-self: flex-start;
  color: #000000;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.poster-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: #000000;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.poster-button:hover::before,
.poster-button:focus-visible::before {
  width: 300px;
  height: 300px;
}

.poster-button:hover,
.poster-button:focus-visible {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  outline: none;
}

.poster-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.poster-button svg {
  width: 16px;
  height: 16px;
  stroke: #000000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.poster-button:hover svg,
.poster-button:focus-visible svg {
  stroke: #ffffff;
  transform: translateY(-3px) rotate(-5deg);
}

/* ─── Disabled / coming-soon state ───────────────────────────── */

/* Wrapper carries the tooltip so pointer events still register on the span
   even though the <button> itself is disabled. */
.poster-button-wrap {
  position: relative;
  display: inline-flex;
}

/* Tooltip shown above the button on hover/focus-within */
.poster-button-wrap::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: #000000;
  color: #ffffff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.poster-button-wrap:hover::after,
.poster-button-wrap:focus-within::after {
  opacity: 1;
}

/* Disabled button — muted, non-interactive */
.poster-button:disabled,
.poster-button[aria-disabled="true"] {
  opacity: 0.38;
  cursor: not-allowed;
  border-color: #888888;
  color: #888888;
}

/* Kill ALL hover / focus-visible effects when disabled */
.poster-button:disabled::before,
.poster-button[aria-disabled="true"]::before {
  display: none;
}

.poster-button:disabled:hover,
.poster-button:disabled:focus-visible,
.poster-button[aria-disabled="true"]:hover,
.poster-button[aria-disabled="true"]:focus-visible {
  color: #888888;
  transform: none;
  box-shadow: none;
  outline: none;
}

.poster-button:disabled:active,
.poster-button[aria-disabled="true"]:active {
  transform: none;
  box-shadow: none;
}

.poster-button:disabled svg,
.poster-button[aria-disabled="true"] svg {
  stroke: #888888;
}

.poster-button:disabled:hover svg,
.poster-button:disabled:focus-visible svg,
.poster-button[aria-disabled="true"]:hover svg,
.poster-button[aria-disabled="true"]:focus-visible svg {
  stroke: #888888;
  transform: none;
}


/* ─── Modal ───────────────────────────────────────────────────── */
.poster-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.poster-modal[aria-hidden="false"] {
  display: flex;
}

.poster-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 22, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.poster-modal__dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 10px;
  padding: 36px 32px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: poster-modal-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes poster-modal-in {
  0%   { opacity: 0; transform: translateY(18px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.poster-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000;
  transition: background 0.18s ease, border-color 0.18s ease;
  min-height: 0;
}

.poster-modal__close:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

.poster-modal__title {
  font-family: inherit;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: #000;
}

.poster-modal__lead {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.6);
}

.poster-modal__group {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}

.poster-modal__group legend {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
  margin-bottom: 10px;
  padding: 0;
}

.poster-modal__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.poster-modal__options--templates {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 480px) {
  .poster-modal__options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .poster-modal__options--templates {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.poster-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  background: #f6f6f6;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.poster-opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.poster-opt__name {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000;
}

.poster-opt__meta {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.55);
  margin-top: 2px;
}

.poster-opt:hover {
  background: #ededed;
}

.poster-opt:has(input:checked) {
  background: #000;
  border-color: #000;
}

.poster-opt:has(input:checked) .poster-opt__name {
  color: #fff;
}

.poster-opt:has(input:checked) .poster-opt__meta {
  color: rgba(255, 255, 255, 0.7);
}

.poster-opt input:focus-visible + .poster-opt__name,
.poster-opt:focus-within {
  outline: 2px solid var(--accent-color, #ff4cfa);
  outline-offset: 3px;
}

.poster-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.poster-modal__cancel,
.poster-modal__download {
  flex: 1;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  min-height: 0;
}

.poster-modal__cancel {
  background: transparent;
  color: #000;
  border: 2px solid rgba(0, 0, 0, 0.18);
}

.poster-modal__cancel:hover {
  border-color: #000;
}

.poster-modal__download {
  background: #000;
  color: #fff;
  border: 2px solid #000;
}

.poster-modal__download:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.poster-modal__download[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

.poster-modal__hint {
  margin: 14px 0 0;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
  text-align: center;
}

/* Lock background scroll while modal is open. */
html.poster-modal-open,
body.poster-modal-open {
  overflow: hidden;
}

/* =============================================================
   SEGMENT TYPES — visual differentiation per block type
   Each segment has two classes:
     .article-segment         — shared structural wrapper
     .segment--{type}         — type-specific layout hook
     .segment--{variant}      — optional variant modifier
   ============================================================= */

/* ── Shared segment wrapper reset ─────────────────────────── */
.article-segment {
  /* Editorial rhythm — tighter than the legacy 40px flat value */
  margin-bottom: 1.25rem;
}

/* ── Text / Mixed ──────────────────────────────────────────── */
.segment--text {
  /* already handled by .segment-text; no extra chrome needed */
}

/* ── Heading H2 — major section break ─────────────────────── */
.segment--heading {
  margin-top: 2rem;
  margin-bottom: 1.25rem;
}

.segment-heading {
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #000;
  margin: 0;
}

.segment-heading--h2 {
  font-size: clamp(1.1rem, 2.8vw, 1.45rem);
}

.segment-heading--h3 {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 800;
}

/* ── Pull Quote ────────────────────────────────────────────── */
.segment--quote {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

/* Shared blockquote reset */
.segment-quote {
  margin: 0;
  padding: 0;
  border: none;
}

/* Large pull quote — full-width dramatic treatment */
.segment-quote--large {
  padding: 2.5rem 0;
  text-align: center;
}

.segment-quote--large .segment-quote__body {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #000;
  margin: 0 0 1rem;
  /* Opening quotation mark as decorative pseudo-element */
  position: relative;
}

.segment-quote--large .segment-quote__body::before {
  content: "\201C"; /* left double quote */
  display: block;
  font-size: 2.5rem;
  line-height: 1;
  font-style: normal;
  margin-bottom: -0.5rem;
  color: #000;
  font-weight: 900;
}

.segment-quote--large .segment-quote__attribution {
  margin-top: 1rem;
}

.segment-quote--large .segment-quote__attribution cite {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-style: normal;
  color: #555;
}

.segment-quote--large .segment-quote__attribution cite::before {
  content: "— ";
}

/* Inline pull quote — compact left-border accent */
.segment-quote--inline {
  padding: 1rem 1.5rem;
  border-left: 4px solid #000;
  background: #f8f8f8;
}

.segment-quote--inline .segment-quote__body {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.5;
  color: #111;
  margin: 0 0 0.5rem;
}

.segment-quote--inline .segment-quote__attribution {
  margin-top: 0.5rem;
}

.segment-quote--inline .segment-quote__attribution cite {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-style: normal;
  color: #666;
}

.segment-quote--inline .segment-quote__attribution cite::before {
  content: "— ";
}

/* ── Callout / Aside ───────────────────────────────────────── */
.segment--callout {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Shared callout chrome — brutalist b&w, no rounded corners */
.segment-callout {
  padding: 1.25rem 1.5rem;
  background: #f5f5f5;
  border-left: 4px solid #000;
  position: relative;
  color: #111;
}

/* Icon prefixes via ::before pseudo-element */
.segment-callout::before {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1;
  color: #111;
}

/* info — solid black left border (default shared style) */
.segment-callout--info {
  border-left: 4px solid #000;
}

.segment-callout--info::before {
  content: "ℹ";
}

/* warning — dashed left border signals caution without colour */
.segment-callout--warning {
  border-left: 4px dashed #000;
}

.segment-callout--warning::before {
  content: "⚠";
}

/* danger — full perimeter border with thicker left accent */
.segment-callout--danger {
  border: 2px solid #000;
  border-left-width: 4px;
}

.segment-callout--danger::before {
  content: "✕";
}

/* success — left accent + hairline top rule */
.segment-callout--success {
  border-left: 4px solid #000;
  border-top: 1px solid #000;
}

.segment-callout--success::before {
  content: "✓";
}

.segment-callout__body {
  font-size: 0.95rem;
  line-height: 1.65;
}

.segment-callout__body p:last-child {
  margin-bottom: 0;
}

/* ── Image with caption (standalone) ──────────────────────── */
.segment--image {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

/* Override the generic .segment-media rules for standalone images */
.segment-media--standalone {
  margin: 0;
}

/* Standalone image segments render at their natural proportions —
   no crop, no forced height. Container width is the only constraint. */
.segment-media--standalone img,
.segment-media--standalone picture > img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Embed (YouTube / Spotify / etc.) ─────────────────────── */
.segment--embed {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.segment-embed {
  /* Center the iframe within the column */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Responsive iframe wrapper — 16:9 for video embeds */
.segment-embed__wrapper {
  width: 100%;
  max-width: 640px;
  position: relative;
}

/* Standard YouTube / Vimeo iframes need the aspect-ratio container trick */
.segment-embed__wrapper iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto; /* override height="..." attribute via CSS */
  border: none;
  border-radius: 4px;
}

/* Spotify / SoundCloud / Apple Podcasts use a shorter aspect ratio */
.segment-embed--spotify .segment-embed__wrapper,
.segment-embed--soundcloud .segment-embed__wrapper,
.segment-embed--apple_podcasts .segment-embed__wrapper {
  max-width: 100%;
}

.segment-embed--spotify .segment-embed__wrapper iframe,
.segment-embed--soundcloud .segment-embed__wrapper iframe,
.segment-embed--apple_podcasts .segment-embed__wrapper iframe {
  aspect-ratio: unset;
  height: 152px; /* standard Spotify compact widget height */
}

.segment-embed__caption {
  font-size: 0.825rem;
  color: #666;
  font-style: italic;
  text-align: center;
  max-width: 640px;
  margin: 0;
}

.segment-embed__fallback {
  font-size: 0.9rem;
  color: #555;
  word-break: break-all;
}

.segment-embed__fallback a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Section Divider ───────────────────────────────────────── */
.segment--divider {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.segment-divider {
  border: none;
  /* Three dots — classic editorial section break */
  border-top: none;
  height: auto;
  text-align: center;
  overflow: visible;
  color: inherit;
}

.segment-divider::after {
  content: "· · ·";
  display: inline-block;
  font-size: 1.4rem;
  letter-spacing: 0.5em;
  color: #999;
  font-weight: 400;
  line-height: 1;
}

/* ── Gallery ───────────────────────────────────────────────── */
.segment--gallery {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* =============================================================
   IMAGE SIZING — hero cover + inline segment images
   ============================================================= */

/* Hero cover image: constrain to a sensible viewport fraction.
   The .hero-image-container is a flex child that currently has no
   explicit height, so the image renders at its full natural height.
   We add a max-height that looks editorial without cropping dramatically. */
.hero-image-container {
}

/* The <picture> wrapper inside the hero container */
.hero-image-container picture {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0; /* kill inline-block baseline gap */
}

.hero-image-container .hero-image,
.hero-image-container picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Inline segment images (.segment-media — generic wrapper used by
   text+media segments): scale to container width at natural height */
.segment-media img,
.segment-media picture > img {
  display: block;
  width: 100%;
  height: auto;
}

/* Gallery items in the separate article gallery block at the
   end of the article: fixed aspect-ratio slot, cover crop */
.article-gallery .gallery-item {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f0f0f0;
}

.article-gallery .gallery-item picture {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.article-gallery .gallery-item img,
.article-gallery .gallery-item picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 767px) {

  .segment--divider {
    margin-top: 2rem;
    margin-bottom: 2rem;
  }

  .segment-quote--large .segment-quote__body {
    font-size: 1.4rem;
  }

  .segment-quote--large .segment-quote__body::before {
    font-size: 2.8rem;
  }
}
