/* Webstory page: hide horizontal scrollbars */
.webstory-row::-webkit-scrollbar,
.webstory-categories::-webkit-scrollbar {
  display: none;
}
.webstory-row,
.webstory-categories {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Webstory two-column: sidebar below on small screens */
@media (max-width: 1024px) {
  .webstory-layout {
    flex-wrap: wrap;
    padding: 16px 14px 0;
    gap: 20px;
  }
  .webstory-sidebar {
    width: 100% !important;
    max-width: 100%;
  }
  .webstory-scroll-btn-left {
    display: none !important;
  }
  .webstory-row-section > div {
    padding-left: 0 !important;
    padding-right: 40px !important;
  }
}
@media (max-width: 768px) {
  .webstory-layout {
    padding: 10px 0px 0;
    gap: 14px;
  }
  .webstory-row-section > div {
    padding-left: 0 !important;
    padding-right: 12px !important;
  }
  .webstory-header {
    padding: 10px 10px 0 !important;
  }
  .webstory-layout {
    padding: 10px 10px 0 !important;
  }

}
.webstory-latest-strip::-webkit-scrollbar {
  display: none;
}
.webstory-latest-strip {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Webstory best styling: hover & transitions */
.webstory-page .webstory-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.12);
}
.webstory-page .webstory-card:focus-visible {
  outline: 2px solid var(--ws-accent, #0a84ff);
  outline-offset: 2px;
}
.webstory-page .webstory-scroll-btn:focus-visible,
.webstory-page .webstory-scroll-btn-left:focus-visible {
  outline: 2px solid var(--ws-accent, #0a84ff);
  outline-offset: 2px;
}
.webstory-page .webstory-card:hover .webstory-card-img {
  transform: scale(1.05);
}
.webstory-page .webstory-card-share:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.webstory-page .webstory-scroll-btn:hover {
  background: #353538;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.webstory-page .webstory-scroll-btn-left:hover {
  transform: translateY(-50%) scale(1.05);
}
.webstory-page .webstory-header-share:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}
.webstory-page .webstory-sidebar-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.webstory-page .webstory-sidebar-cta:hover {
  background: #409cff;
  transform: translateY(-1px);
}
.webstory-page .webstory-cta-link:hover {
  background: #409cff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(10, 132, 255, 0.4);
}
.webstory-page .webstory-latest-tile:hover {
  background: #353538;
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* Webstory theme: gradient & pattern backgrounds */
.webstory-page.ws-bg-gradient {
  background: linear-gradient(135deg, #1c1c1e 0%, #252530 50%, #1a1a1e 100%) !important;
}
.webstory-page.ws-bg-pattern {
  background-color: #1c1c1e !important;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 40%) !important;
}

/* Webstory card animations */
@keyframes ws-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes ws-slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes ws-scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes ws-slideLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.webstory-card.ws-anim-card-fadeIn {
  animation: ws-fadeIn 0.5s ease-out forwards;
}
.webstory-card.ws-anim-card-slideUp {
  animation: ws-slideUp 0.5s ease-out forwards;
}
.webstory-card.ws-anim-card-scaleIn {
  animation: ws-scaleIn 0.4s ease-out forwards;
}
.webstory-card.ws-anim-card-slideLeft {
  animation: ws-slideLeft 0.5s ease-out forwards;
}

.webstory-row-section.ws-anim-content-fadeIn {
  animation: ws-fadeIn 0.6s ease-out forwards;
}
.webstory-row-section.ws-anim-content-slideUp {
  animation: ws-slideUp 0.6s ease-out forwards;
}
.webstory-row-section.ws-anim-content-slideLeft {
  animation: ws-slideLeft 0.5s ease-out forwards;
}

/* Stagger card animations inside a row */
.webstory-row .webstory-card:nth-child(1) { animation-delay: 0.05s; }
.webstory-row .webstory-card:nth-child(2) { animation-delay: 0.1s; }
.webstory-row .webstory-card:nth-child(3) { animation-delay: 0.15s; }
.webstory-row .webstory-card:nth-child(4) { animation-delay: 0.2s; }
.webstory-row .webstory-card:nth-child(5) { animation-delay: 0.25s; }
.webstory-row .webstory-card:nth-child(n + 6) { animation-delay: 0.3s; }

.webstory-row-section:nth-of-type(1) { animation-delay: 0s; }
.webstory-row-section:nth-of-type(2) { animation-delay: 0.08s; }
.webstory-row-section:nth-of-type(3) { animation-delay: 0.16s; }
.webstory-row-section:nth-of-type(4) { animation-delay: 0.24s; }
.webstory-row-section:nth-of-type(5) { animation-delay: 0.32s; }
.webstory-row-section:nth-of-type(n + 6) { animation-delay: 0.4s; }

/* Webstory page entrance */
.webstory-page-enter {
  animation: ws-pageEnter 0.5s ease-out;
}
@keyframes ws-pageEnter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .webstory-page-enter {
    animation: none;
  }
}

/* Webstory header */
.webstory-header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(12px);
}
.webstory-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.webstory-hero-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.webstory-category-pill {
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.webstory-category-pill:hover {
  transform: translateY(-1px);
}
.webstory-categories {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.webstory-category-pill.active {
  box-shadow: 0 2px 12px rgba(10, 132, 255, 0.35);
}
.webstory-category-pill:focus-visible {
  outline: 2px solid var(--ws-accent, #0a84ff);
  outline-offset: 2px;
}

/* Ensure webstory tabs and page are always clickable */
.webstory-page,
.webstory-page .webstory-header,
.webstory-page .webstory-categories,
.webstory-page .webstory-category-pill {
  pointer-events: auto !important;
}
.webstory-page .webstory-categories {
  position: relative;
  z-index: 101;
}

/* Webstory CTA section */
.webstory-cta-section {
  padding: 48px 0;
  text-align: center;
  border-top: 1px solid;
}
.webstory-cta-text {
  margin: 0 0 20px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ws-muted, #98989f);
}
.webstory-cta-link {
  display: inline-block;
  padding: 14px 32px;
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 20px rgba(10, 132, 255, 0.35);
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.webstory-cta-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Story viewer overlay */
.webstory-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.97);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ws-viewerOpen 0.25s ease-out;
}
@keyframes ws-viewerOpen {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.webstory-viewer-progress-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  display: flex;
  gap: 6px;
  z-index: 10;
}
.webstory-viewer-progress-track {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}
.webstory-viewer-progress-fill {
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 2px;
  transition: width 0.05s linear;
}
.webstory-viewer-progress-done {
  width: 100%;
}
.webstory-viewer-btn {
  position: absolute;
  top: 14px;
  z-index: 11;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.webstory-viewer-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}
.webstory-viewer-close {
  left: 16px;
}
.webstory-viewer-share {
  right: 16px;
}
.webstory-viewer-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}
.webstory-viewer-tap-left {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 35%;
  z-index: 5;
  cursor: pointer;
}
.webstory-viewer-tap-right {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 35%;
  z-index: 5;
  cursor: pointer;
}
.webstory-viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.webstory-viewer-arrow:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-50%) scale(1.08);
}
.webstory-viewer-arrow-prev {
  left: 12px;
}
.webstory-viewer-arrow-next {
  right: 12px;
}
.webstory-viewer-frame {
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #141414;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 50px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}
.webstory-viewer-slide-inner {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #222;
}
.webstory-viewer-slide-inner.ws-slide-next {
  animation: ws-slideInFromRight 0.3s ease-out;
}
.webstory-viewer-slide-inner.ws-slide-prev {
  animation: ws-slideInFromLeft 0.3s ease-out;
}
@keyframes ws-slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes ws-slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.webstory-viewer-image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
}
.webstory-viewer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.webstory-layout {
  display: flex;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px 20px 0;
  gap: 28px;
  align-items: flex-start;
}
.webstory-main {
  flex: 1 1 auto;
  min-width: 0;
}
.webstory-empty-text {
  color: #98989f;
  padding: 24px 0;
  margin: 0;
}
.webstory-row-section {
  margin-bottom: 44px;
}
.webstory-row-wrap {
  position: relative;
  padding-left: 52px;
  padding-right: 52px;
}
.webstory-section-title {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.webstory-row {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 0;
  padding-bottom: 16px;
}
.webstory-card {
  position: relative;
  isolation: isolate;
  flex: 0 0 calc((100% - 32px) / 3);
  min-width: 160px;
  border-radius: 14px;
  overflow: hidden;
  color: inherit;
  display: flex;
  flex-direction: column;
  margin-right: 16px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
/* Full-card link to external article (above imagery; share button stays on top) */
.webstory-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  text-decoration: none;
  color: inherit;
}
.webstory-card-link:focus-visible {
  outline: 2px solid var(--ws-accent, #0a84ff);
  outline-offset: 3px;
}
.webstory-card--viewer:focus-visible {
  outline: 2px solid var(--ws-accent, #0a84ff);
  outline-offset: 3px;
}
.webstory-card-image-wrap {
  position: relative;
  z-index: 0;
  aspect-ratio: 3 / 4;
  min-height: 0;
  background: #1a1a1a;
  flex: 1 1 auto;
  overflow: hidden;
}
.webstory-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.webstory-card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  display: flex;
  gap: 5px;
  background: linear-gradient(transparent 20%, rgba(0, 0, 0, 0.7) 100%);
}
.webstory-card-progress-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
}
.webstory-card-content {
  position: relative;
  z-index: 0;
  padding: 14px 16px;
  flex-shrink: 0;
}
.webstory-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
  letter-spacing: -0.01em;
}
.webstory-card-desc {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #98989f;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}
.webstory-card-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.webstory-card-date {
  font-size: 12px;
  color: #98989f;
  font-weight: 500;
}
.webstory-card-share {
  position: relative;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.webstory-card-share:hover {
  background: rgba(255, 255, 255, 0.14);
}
.webstory-card-share:focus-visible {
  outline: 2px solid var(--ws-accent, #0a84ff);
  outline-offset: 2px;
}
.webstory-icon-xs {
  font-size: 11px;
}
.webstory-icon-sm {
  font-size: 14px;
}
.webstory-scroll-btn,
.webstory-scroll-btn-left {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.webstory-scroll-btn-left {
  left: 0;
}
.webstory-scroll-btn {
  right: 0;
}
.webstory-sidebar {
  flex-shrink: 0;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.webstory-sidebar-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid;
}
.webstory-sidebar-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.webstory-sidebar-subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  color: #98989f;
}
.webstory-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.webstory-sidebar-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.webstory-sidebar-media {
  aspect-ratio: 16/9;
  background: #1a1a1a;
  overflow: hidden;
}
.webstory-sidebar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.webstory-sidebar-body {
  padding: 14px;
}
.webstory-sidebar-item-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.webstory-sidebar-sponsored {
  margin: 8px 0 0;
  font-size: 11px;
  color: #6e6e73;
}
.webstory-sidebar-cta {
  margin-top: 12px;
  padding: 9px 18px;
  border-radius: 10px;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.webstory-slide-overlay {
  animation: ws-overlayFade 0.35s ease-out;
}
@keyframes ws-overlayFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .webstory-viewer-backdrop {
    animation: none;
  }
  .webstory-viewer-slide-inner.ws-slide-next,
  .webstory-viewer-slide-inner.ws-slide-prev {
    animation: none;
  }
  .webstory-slide-overlay {
    animation: none;
  }
}

/* —— SEO story landing (/webstory/[slug]) —— */
.webstory-article-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  min-height: 60vh;
  font-family: var(--font-inter), 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f5f5f7;
  background: #0d0d0f;
}
.webstory-article-breadcrumb {
  font-size: 13px;
  color: #98989f;
  margin-bottom: 16px;
}
.webstory-article-breadcrumb a {
  color: var(--ws-accent, #0a84ff);
  text-decoration: none;
}
.webstory-article-breadcrumb a:hover {
  text-decoration: underline;
}
.webstory-article-section {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #98989f;
}
.webstory-article-h1 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.webstory-article-date {
  margin: 0 0 24px;
  font-size: 14px;
  color: #98989f;
}
.webstory-article-figure {
  margin: 0 0 24px;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
}
.webstory-article-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 200px;
}
.webstory-article-cover {
  object-fit: cover;
}
.webstory-article-lede {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.6;
  color: #c7c7cc;
}
.webstory-article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.webstory-article-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.webstory-article-cta-primary {
  background: var(--ws-accent, #0a84ff);
  color: #fff;
border: none;
}
.webstory-article-cta-primary:hover {
  opacity: 0.92;
}
.webstory-article-cta-secondary {
  background: transparent;
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.webstory-article-cta-secondary:hover {
  border-color: rgba(255, 255, 255, 0.35);
}
.webstory-card--internal {
  cursor: pointer;
}
