/**
 * Single story — editorial photography layout
 */

.page-main--single {
  --story-wide: min(960px, 100%);
  --story-text: min(42rem, 100%);
  --story-frame: #ffffff;
  --story-frame-line: rgba(20, 20, 20, 0.1);
  --story-frame-shadow: 0 10px 40px rgba(20, 20, 20, 0.08);
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) 0;
  background: transparent;
  overflow-x: clip;
}

.story-discover {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: 0 clamp(1rem, 3vw, 2rem) clamp(3rem, 6vw, 4.5rem);
  background: linear-gradient(180deg, rgba(243, 240, 234, 0.55), var(--bg-warm));
}

.story-discover-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}

.story-discover .story-social-feeds {
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 2.75rem) 0 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.story-discover .story-social-head {
  max-width: none;
  margin: 0 0 clamp(1.75rem, 3vw, 2.25rem);
}

.story-discover .related-stories {
  padding-top: 0;
  padding-bottom: clamp(2rem, 4vw, 2.75rem);
  border-top: 0;
}

.story-discover .related-stories .section-head {
  text-align: left;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.story-discover .related-stories .section-head p {
  margin-left: 0;
  margin-right: 0;
}

.single-post {
  overflow-x: clip;
}

.story-shell,
.content-wrap-wide {
  max-width: 960px;
  margin: 0 auto;
}

/* Reading progress */
.reading-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(20, 20, 20, 0.06);
  z-index: 90;
  pointer-events: none;
}

.reading-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #c49a2c);
  transition: width 0.12s linear;
}

/* Masthead */
.story-masthead {
  max-width: var(--story-text);
  margin: 0 auto clamp(1.75rem, 4vw, 2.5rem);
  text-align: left;
}

.story-masthead .dw-breadcrumbs {
  margin-bottom: 1rem;
}

.story-masthead .dw-breadcrumb-item:last-child {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-masthead-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-bottom: 1rem;
}

.story-meta-date,
.story-meta-read {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-soft);
}

.story-meta-dot {
  color: var(--ink-muted);
}

.story-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 1rem;
}

.story-masthead-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: -0.35rem 0 1rem;
}

.story-deck {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-muted);
  margin: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
}

.story-gallery-launch {
  margin: 1.25rem 0 0;
}

.story-gallery-launch__btn {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  min-height: 2.6rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.story-gallery-launch__btn:hover,
.story-gallery-launch__btn:focus-visible {
  border-color: var(--ink);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.story-gallery-launch__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-gallery-launch__meta {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

/* Cover image */
.story-cover {
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  max-width: var(--story-wide);
}

.story-cover .story-frame {
  width: 100%;
}

.story-frame-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.35rem 0.65rem;
  background: rgba(20, 20, 20, 0.78);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Print-style frame for all story photos */
.story-frame {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid var(--story-frame-line);
  border-radius: 2px;
  background: var(--story-frame);
  box-shadow: var(--story-frame-shadow);
  cursor: zoom-in;
  font: inherit;
  text-align: left;
  color: inherit;
}

.story-frame img,
.story-content figure img,
.story-content .wp-block-image img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  margin: 0;
  border-radius: 1px;
  vertical-align: middle;
}

.story-frame:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Layout: optional side nav + body */
.story-layout {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.story-layout--with-nav {
  grid-template-columns: minmax(0, 1fr);
}

.story-nav {
  display: none;
}

.story-nav-label {
  margin: 0 0 0.75rem;
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.story-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-nav-list a {
  display: block;
  padding: 0.4rem 0 0.4rem 0.75rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--ink-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.story-nav-list a:hover,
.story-nav-list a.is-active {
  color: var(--ink);
  border-left-color: var(--accent);
}

.story-nav-comments {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.story-nav-comments-count {
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.story-nav-mobile {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.story-nav-mobile summary {
  cursor: pointer;
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-soft);
}

.story-nav-mobile .post-toc-list {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.story-nav-mobile .post-toc-list a {
  display: block;
  padding: 0.45rem 0;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.story-nav-mobile .post-toc-list li:last-child a {
  border-bottom: 0;
}

.story-nav-mobile .story-nav-comments {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.story-body {
  min-width: 0;
}

/*
 * Content grid: text in centre column, photos span full story width.
 * Avoids transform breakouts that cause misalignment.
 */
.story-content {
  display: grid;
  grid-template-columns: 1fr min(var(--story-text), 100%) 1fr;
  column-gap: 0;
  row-gap: 0;
  font-size: clamp(1.0625rem, 2vw, 1.125rem);
  line-height: 1.82;
  color: var(--ink-soft);
  counter-reset: story-section;
}

.story-content > * {
  grid-column: 2;
  min-width: 0;
}

.story-content > figure,
.story-content > .post-photo-grid,
.story-content > .wp-block-gallery,
.story-content > figure.story-inline-photo {
  grid-column: 1 / -1;
  width: 100%;
  max-width: var(--story-wide);
  justify-self: center;
  margin-left: auto;
  margin-right: auto;
}

/* Prose */
.story-content p,
.story-content .wp-block-paragraph {
  margin: 0 0 1.45rem;
}

.story-content p:last-child {
  margin-bottom: 0;
}

.story-content h2 + p,
.story-content h2.post-section-heading + p {
  font-size: 1.125rem;
  line-height: 1.78;
  color: var(--ink);
}

/* Section headings — contact-sheet frame numbers */
.story-content h2.post-section-heading,
.story-content h2.wp-block-heading {
  counter-increment: story-section;
  position: relative;
  grid-column: 2;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 500;
  line-height: 1.22;
  color: var(--ink);
  margin: 2.75rem 0 1.1rem;
  padding: 1.75rem 0 0 3rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}

.story-content h2.post-section-heading::before,
.story-content h2.wp-block-heading::before {
  content: counter(story-section, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.85rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.story-content h2.post-section-heading:first-child,
.story-content h2.wp-block-heading:first-child,
.story-content > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.story-content h2.post-section-heading:first-child::before,
.story-content h2.wp-block-heading:first-child::before,
.story-content > h2:first-child::before {
  top: 0.1rem;
}

.story-content h3 {
  grid-column: 2;
  font-size: 1.08rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}

.story-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.story-content a:hover {
  color: var(--ink);
}

.story-content strong {
  color: var(--ink);
  font-weight: 600;
}

.story-content ul,
.story-content ol {
  margin: 0 0 1.45rem 1.2rem;
  padding: 0;
}

.story-content li {
  margin-bottom: 0.45rem;
}

.story-content li::marker {
  color: var(--accent);
}

.story-content blockquote {
  margin: 1.75rem 0;
  padding: 1.15rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink);
}

/* Individual photos */
.story-content figure.wp-block-image,
.story-content .wp-block-image {
  margin: 1.75rem 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.story-content figure.wp-block-image .story-frame,
.story-content .wp-block-image .story-frame {
  margin: 0;
}

.story-content figcaption,
.story-content .wp-element-caption {
  max-width: var(--story-text);
  margin: 0.65rem auto 0;
  padding: 0 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  font-style: normal;
  text-align: left;
}

/* Photo sequences */
.post-photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.75rem 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.post-photo-grid figure,
.post-photo-grid .wp-block-image {
  margin: 0;
}

.post-photo-grid figure::before,
.post-photo-grid .wp-block-image::before {
  content: none;
  display: none;
}

.post-photo-grid figure img,
.post-photo-grid .wp-block-image img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: auto;
  object-fit: contain;
}

.post-photo-grid figcaption,
.post-photo-grid .wp-element-caption {
  margin-top: 0.5rem;
  max-width: none;
}

.story-content .wp-block-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.75rem 0;
  padding: 0;
}

.story-content .wp-block-gallery .wp-block-image {
  margin: 0;
}

/* Footer */
.story-footer {
  max-width: var(--story-text);
  margin: 2.75rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.story-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

.story-license {
  margin-top: 1.5rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.story-license__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.story-license__title {
  margin: 0.3rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.story-license__copy {
  margin: 0 0 0.9rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.story-license__action {
  margin: 0;
}

.story-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.story-tags-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.story-tag-link {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.story-tag-link:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.story-pill-inline {
  font-size: 0.72rem;
}

.story-share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.story-share-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-right: 0.25rem;
}

.story-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.story-share-btn:hover,
.story-share-btn.is-copied {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.story-share-btn--copy {
  cursor: pointer;
  background: transparent;
}

.story-adjacent {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.story-adjacent__eyebrow {
  margin: 0 0 0.85rem;
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.story-adjacent__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.story-adjacent-link {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.story-adjacent-link:hover,
.story-adjacent-link:focus-visible {
  border-color: rgba(20, 20, 20, 0.28);
  background: var(--bg-soft);
}

.story-adjacent-link:only-child {
  grid-column: 1 / -1;
}

.story-adjacent-link__media {
  display: block;
  width: 5.5rem;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-warm);
}

.story-adjacent-link__media img,
.story-adjacent-link__media-fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-adjacent-link__media-fallback {
  background:
    linear-gradient(135deg, rgba(20, 20, 20, 0.08), rgba(20, 20, 20, 0.02));
}

.story-adjacent-link__body {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.story-adjacent-link__direction {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
}

.story-adjacent-link__arrow {
  font-size: 0.95em;
  line-height: 1;
}

.story-adjacent-link__title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.story-adjacent-link__date {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.story-adjacent-link:hover .story-adjacent-link__title,
.story-adjacent-link:focus-visible .story-adjacent-link__title {
  color: var(--accent);
}

@media (max-width: 639px) {
  .story-adjacent__grid {
    grid-template-columns: 1fr;
  }

  .story-adjacent-link {
    grid-template-columns: 4.75rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .story-adjacent-link__media {
    width: 4.75rem;
  }
}

.lightbox-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.lightbox-hint {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: 0.4rem 0.75rem;
  background: rgba(20, 20, 20, 0.72);
  color: var(--white);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.lightbox-trigger:hover .lightbox-hint,
.lightbox-trigger:focus-visible .lightbox-hint {
  opacity: 1;
}

@media (min-width: 640px) {
  .post-photo-grid,
  .post-photo-grid--many,
  .story-content .wp-block-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 960px) {
  .story-layout--with-nav {
    grid-template-columns: 11rem minmax(0, 1fr);
    align-items: start;
  }

  .story-nav {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    padding: 1rem 0.85rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .story-nav-mobile {
    display: none;
  }
}

@media (max-width: 639px) {
  .story-content h2.post-section-heading,
  .story-content h2.wp-block-heading {
    padding-left: 2.5rem;
  }

  .story-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .story-share {
    flex-wrap: wrap;
  }

  .story-share-btn {
    min-width: 2.5rem;
  }
}

/* Latest social posts */
.story-social-feeds {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(1rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(243, 240, 234, 0.9));
}

.story-social-head {
  max-width: 42rem;
  margin: 0 auto clamp(1.75rem, 3vw, 2.25rem);
  text-align: left;
}

.story-social-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  margin: 0.35rem 0 0.75rem;
}

.story-social-lede {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.65;
}

.story-social-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
}

.story-social-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(20, 20, 20, 0.05);
}

.story-social-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.story-social-platform {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink);
}

.story-social-profile {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.story-social-profile:hover {
  color: var(--ink);
}

.story-social-media {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-warm);
  overflow: hidden;
}

.story-social-grid--cards .story-social-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.story-social-grid--cards .story-social-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.story-social-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.08), rgba(10, 10, 10, 0.45));
  color: #fff;
  pointer-events: none;
}

.story-social-play svg {
  width: 3.5rem;
  height: 3.5rem;
  padding: 0.85rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.story-social-card--instagram .story-social-media {
  background: linear-gradient(135deg, #f09433 0%, #bc1888 100%);
}

.story-social-card--tiktok .story-social-media {
  background: linear-gradient(135deg, #25f4ee 0%, #fe2c55 100%);
}

.story-social-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-social-media img.is-fallback {
  object-fit: contain;
  background: var(--bg-warm);
  padding: 1.25rem;
}

.story-social-media--placeholder {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.story-social-card--instagram .story-social-media--placeholder {
  background: linear-gradient(135deg, #f09433, #bc1888);
}

.story-social-card--tiktok .story-social-media--placeholder {
  background: linear-gradient(135deg, #25f4ee, #fe2c55);
}

.story-social-card--youtube .story-social-media--placeholder {
  background: linear-gradient(135deg, #ff0000, #282828);
}

.story-social-placeholder-label {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--white);
}

.story-social-embed {
  min-height: 420px;
  background: var(--bg-warm);
}

.story-social-embed--tiktok {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
}

.story-social-copy {
  padding: 1rem 1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.story-social-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 500;
}

.story-social-title a {
  color: var(--ink);
  text-decoration: none;
}

.story-social-title a:hover {
  color: var(--accent);
}

.story-social-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  margin-top: auto;
}

.story-social-date,
.story-social-open {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.story-social-open {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.story-social-open:hover,
.story-social-open:focus-visible {
  color: var(--ink);
}

@media (min-width: 768px) {
  .story-social-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .story-social-media {
    aspect-ratio: 4 / 5;
  }
}

/* Hosted Instagram/TikTok cards from minimal-ig-aggregator */
.story-social-grid--hosted {
  align-items: stretch;
}

.story-social-card--hosted {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.story-social-grid--hosted .min-ig-feed,
.story-social-grid--hosted .dwyt-lv-shortcode,
.story-social-grid--hosted .story-social-card--youtube .dwyt-lv {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
}

.story-social-grid--hosted .min-ig-feed {
  max-width: none;
}

.story-social-grid--hosted .story-social-card--instagram .min-ig-feed__item,
.story-social-grid--hosted .story-social-card--tiktok .min-ig-feed__item {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(20, 20, 20, 0.05);
  background: var(--white);
}

.story-social-grid--hosted .min-ig-feed__link:not(.min-ig-feed__link--tiktok-video),
.story-social-grid--hosted .min-ig-feed__link--tiktok-video,
.story-social-grid--hosted .story-social-card--youtube .dwyt-lv__stage {
  aspect-ratio: 16 / 9;
  width: 100%;
  min-height: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.story-social-grid--hosted .min-ig-feed__link:not(.min-ig-feed__link--tiktok-video) {
  position: relative;
  display: block;
  background: var(--bg-warm);
}

.story-social-grid--hosted .min-ig-feed__link:not(.min-ig-feed__link--tiktok-video) .min-ig-feed__img,
.story-social-grid--hosted .min-ig-feed__link:not(.min-ig-feed__link--tiktok-video) .min-ig-feed__badge {
  position: absolute;
}

.story-social-grid--hosted .min-ig-feed__link:not(.min-ig-feed__link--tiktok-video) .min-ig-feed__img {
  inset: 0;
}

.story-social-grid--hosted .min-ig-feed__link:not(.min-ig-feed__link--tiktok-video) .min-ig-feed__badge {
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
}

.story-social-grid--hosted .min-ig-feed__img:not(.min-ig-feed__img--tiktok) {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  max-height: none !important;
}

.story-social-grid--hosted .min-ig-feed__link--tiktok-video {
  position: relative;
  display: block;
  background: #0a0a0a;
}

.story-social-grid--hosted .min-ig-feed__link--tiktok-video .min-ig-feed__video-stage {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  line-height: 0;
}

.story-social-grid--hosted .min-ig-feed__img--tiktok {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center;
  display: block !important;
}

/* Hosted YouTube card from dwyt-latest-video */
.story-social-grid--hosted .dwyt-lv-shortcode {
  max-width: none;
}

.story-social-grid--hosted .story-social-card--youtube .dwyt-lv {
  --dwyt-ink: var(--ink);
  --dwyt-muted: var(--ink-muted);
  --dwyt-paper: var(--bg-warm);
  --dwyt-accent: #ff0000;
  --dwyt-accent-deep: #cc0000;
  --dwyt-glow: rgba(255, 0, 0, 0.28);
  --dwyt-radius: 10px;
  --dwyt-font-display: var(--font-display);
  --dwyt-font-body: var(--font-body);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.story-social-grid--hosted .story-social-card--youtube .dwyt-lv__stage {
  aspect-ratio: 16 / 9;
  width: 100%;
  min-height: 0;
  box-shadow: none;
}

.story-social-grid--hosted .story-social-card--youtube .dwyt-lv__play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.story-social-grid--hosted .min-ig-feed__footer,
.story-social-grid--hosted .story-social-card--youtube .dwyt-lv__meta {
  flex: 1;
  min-height: 6.75rem;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.story-social-grid--hosted .min-ig-feed__footer {
  margin-top: auto;
}

.story-social-grid--hosted .min-ig-feed__profile {
  font-size: 0.95rem;
}

.story-social-grid--hosted .min-ig-feed__cta {
  font-size: 0.85rem;
}

.story-social-grid--hosted .story-social-card--youtube .dwyt-lv__channel {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
}

.story-social-grid--hosted .story-social-card--youtube .dwyt-lv__title {
  font-size: 1.05rem;
}

@media (min-width: 768px) {
  .story-social-grid--hosted .story-social-card--youtube .dwyt-lv__stage {
    aspect-ratio: 16 / 9;
  }

  .story-social-grid--hosted .story-social-card--youtube .dwyt-lv__thumb {
    object-fit: cover;
  }
}

/* YouTube widget nested inside the shared social card */
.story-social-grid--cards .story-social-card--youtube .dwyt-lv-shortcode,
.story-social-grid--cards .story-social-card--youtube .dwyt-lv {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 100%;
}

.story-social-grid--cards .story-social-card--youtube .dwyt-lv {
  --dwyt-ink: var(--ink);
  --dwyt-muted: var(--ink-muted);
  --dwyt-paper: var(--bg-warm);
  --dwyt-accent: #ff0000;
  --dwyt-accent-deep: #cc0000;
  --dwyt-glow: rgba(255, 0, 0, 0.28);
  --dwyt-radius: 0;
  --dwyt-font-display: var(--font-display);
  --dwyt-font-body: var(--font-body);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  background: transparent;
}

.story-social-grid--cards .story-social-card--youtube .dwyt-lv__stage {
  aspect-ratio: 4 / 5;
  width: 100%;
  min-height: 0;
  flex-shrink: 0;
  border-radius: 0;
  box-shadow: none;
  background: #111;
}

.story-social-grid--cards .story-social-card--youtube .dwyt-lv__play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.story-social-grid--cards .story-social-card--youtube .dwyt-lv__thumb {
  object-fit: cover;
  object-position: center;
  transform: none;
}

.story-social-grid--cards .story-social-card--youtube .dwyt-lv__channel {
  display: none;
}

.story-social-grid--cards .story-social-card--youtube .dwyt-lv__meta {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 1rem 1rem 1.15rem;
  border-top: 0;
  background: var(--white);
}

.story-social-grid--cards .story-social-card--youtube .dwyt-lv__title {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 500;
}

.story-social-grid--cards .story-social-card--youtube .dwyt-lv__title a {
  color: var(--ink);
  text-decoration: none;
  background-image: none;
}

.story-social-grid--cards .story-social-card--youtube .dwyt-lv__title a:hover,
.story-social-grid--cards .story-social-card--youtube .dwyt-lv__title a:focus-visible {
  color: var(--accent);
  background-size: 0;
}

.story-social-grid--cards .story-social-card--youtube .dwyt-lv__date {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.story-social-grid--cards .story-social-copy {
  flex: 0 0 auto;
  margin-top: auto;
}

/* Legacy WordPress galleries in older posts */
.story-content .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}

.story-content .gallery-item {
  margin: 0;
}

.story-content .gallery-icon img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
}

.story-content .gallery-caption,
.story-content .wp-caption-text {
  margin-top: 0.45rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.story-content .alignleft,
.story-content .alignright {
  float: none;
  display: block;
  max-width: 100%;
  margin: 1.25rem auto;
}

.story-content p img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 2px;
}

.story-content figure.story-inline-photo {
  margin: 1.75rem 0;
}

.story-content .ultp-post-grid-block,
.story-content .ultp-loading,
.story-content .pagination-block-html,
.story-content iframe.wp-embedded-content,
.story-content blockquote.wp-embedded-content,
.story-content .wp-block-embed.is-type-wp-embed,
.story-content .wp-block-embed__wrapper:not(:has(iframe:not(.wp-embedded-content))) {
  display: none !important;
}

.story-content .wp-block-jetpack-tiled-gallery,
.story-content .tiled-gallery__gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.75rem 0;
}

.story-content .tiled-gallery__row,
.story-content .tiled-gallery__col {
  display: contents;
}

.story-content .tiled-gallery__item {
  margin: 0;
}

.story-content .tiled-gallery__item img {
  width: 100%;
  height: auto;
}

.story-also {
  grid-column: 2;
  margin: 2rem 0 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.story-also-label {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.story-also ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-also li {
  margin: 0 0 0.4rem;
}

.story-also li:last-child {
  margin-bottom: 0;
}

.story-content .wp-block-embed__wrapper {
  position: relative;
  width: 100%;
}

.story-content .wp-block-embed iframe:not(.wp-embedded-content) {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.story-card .story-image:not(:has(img)) {
  display: none;
}

.story-card:not(:has(.story-image img)) .story-body {
  padding-top: 0;
}

.story-comments {
  grid-column: 2;
  margin: 2.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.story-comments__title,
.story-comments__form-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.2;
}

.story-comments__notes {
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.story-comment-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.story-comment-list .comment {
  margin: 0 0 1.25rem;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.story-comment-list .comment:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.story-comment-list .comment-body {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.85rem;
  align-items: start;
}

.story-comment-list .avatar {
  border-radius: 50%;
}

.story-comment-list .comment-author {
  font-weight: 600;
}

.story-comment-list .comment-metadata {
  margin: 0.15rem 0 0.5rem;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.story-comment-list .comment-content {
  font-size: 0.98rem;
  line-height: 1.6;
}

.story-comment-list .reply {
  margin-top: 0.65rem;
  font-size: 0.88rem;
}

.story-comment-form .form-row {
  margin-bottom: 1rem;
}

.story-comment-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.story-comment-form input[type="text"],
.story-comment-form input[type="email"],
.story-comment-form input[type="url"],
.story-comment-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
}

.story-comment-form .form-submit {
  margin-top: 0.5rem;
}

.story-comments__closed {
  margin: 0 0 1rem;
  color: var(--ink-muted);
}

/* ------------------------------------------------------------------ */
/* Gallery mode — immersive photo + caption viewing with comments     */
/* ------------------------------------------------------------------ */

.story-gallery {
  position: fixed;
  inset: 0;
  z-index: 280;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(90, 72, 40, 0.22), transparent 55%),
    linear-gradient(180deg, #141311 0%, #1c1a17 45%, #121110 100%);
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s var(--ease), visibility 0.28s var(--ease);
}

.story-gallery.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.story-gallery[hidden] {
  display: none;
}

.story-gallery.is-open[hidden] {
  display: grid;
}

body.story-gallery-open {
  overflow: hidden;
}

body.story-gallery-open .a11y-tools,
body.story-gallery-open .cookie-consent {
  visibility: hidden;
  pointer-events: none;
}

.story-gallery__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: max(0.85rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.75rem max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.story-gallery__brand {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.story-gallery__story {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 500;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-gallery__counter {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

.story-gallery__counter-sep {
  margin: 0 0.2rem;
  opacity: 0.5;
}

.story-gallery__exit {
  min-height: 2.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.story-gallery__exit:hover,
.story-gallery__exit:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.story-gallery__stage {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  min-height: 0;
  padding: 0.75rem max(0.35rem, env(safe-area-inset-right)) 0.5rem max(0.35rem, env(safe-area-inset-left));
}

.story-gallery__frame {
  margin: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  max-height: 100%;
}

.story-gallery__frame:focus {
  outline: none;
}

.story-gallery__frame:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.story-gallery__mat {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0.35rem;
}

.story-gallery__image {
  display: block;
  max-width: min(1100px, 100%);
  max-height: min(68vh, calc(100dvh - 14rem));
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  background: #0c0b0a;
  opacity: 1;
  transition: opacity 0.22s var(--ease);
}

.story-gallery.is-switching .story-gallery__image {
  opacity: 0.35;
}

.story-gallery__caption {
  max-width: min(40rem, 92vw);
  margin: 0.85rem auto 0;
  padding: 0 0.5rem;
  text-align: center;
}

.story-gallery__caption-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.88rem, 1.8vw, 1rem);
  line-height: 1.55;
}

.story-gallery__caption-text:empty {
  display: none;
}

.story-gallery__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(20, 18, 16, 0.45);
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.story-gallery__nav:hover,
.story-gallery__nav:focus-visible {
  border-color: rgba(255, 255, 255, 0.45);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.story-gallery__nav[hidden] {
  visibility: hidden;
  pointer-events: none;
}

.story-gallery__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.85rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 9, 8, 0.55);
}

.story-gallery__bar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
}

.story-gallery__action {
  min-height: 2.4rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.story-gallery__action--primary {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.92);
  color: #141311;
}

.story-gallery__action:hover,
.story-gallery__action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.story-gallery__comments {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-items: end;
  justify-items: stretch;
  background: rgba(8, 7, 6, 0.55);
}

.story-gallery__comments[hidden] {
  display: none;
}

.story-gallery__comments-panel {
  max-height: min(78vh, 40rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1.15rem 1.15rem max(1.25rem, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #f7f4ef;
  color: var(--ink);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.35);
}

.story-gallery__comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.story-gallery__comments-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.story-gallery__comments-close {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.story-gallery__comments-close:hover,
.story-gallery__comments-close:focus-visible {
  color: var(--ink);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.story-gallery__comments-lede {
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.story-gallery__comments-host .story-comments {
  margin: 0;
  padding: 0;
  border: 0;
}

@media (max-width: 720px) {
  .story-gallery__top {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity exit"
      "counter counter";
  }

  .story-gallery__identity {
    grid-area: identity;
    min-width: 0;
  }

  .story-gallery__exit {
    grid-area: exit;
  }

  .story-gallery__counter {
    grid-area: counter;
  }

  .story-gallery__nav {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.35rem;
  }

  .story-gallery__image {
    max-height: min(58vh, calc(100dvh - 16rem));
  }

  .story-gallery__bar {
    flex-direction: column;
    align-items: stretch;
  }

  .story-gallery__bar-nav {
    margin-left: 0;
  }

  .story-gallery__bar-nav .story-gallery__action {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-gallery,
  .story-gallery__image {
    transition: none;
  }
}

