/* Deep Dive Data — shared swipe-story article shell.
   Mobile-first: every article renders as a full-bleed swipeable card deck,
   on every device. Desktop gets the same deck centered in a fixed-width
   column instead of a phone-frame preview — this is the article, not a demo. */

:root {
  --ss-bg-dark: #1a1a2e;
  --ss-bg-light: #1b1b2f;
  --ss-text: #e0e0e0;
  --ss-text-muted: #bfbfbf;
  --ss-stage-bg: #0b0b14;
}

* , *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--ss-stage-bg);
  font-family: 'Arial', sans-serif;
  color: var(--ss-text);
  overscroll-behavior: none;
}

.ss-stage { min-height: 100dvh; display: flex; align-items: center; justify-content: center; }

.ss-deck {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  background: var(--ss-bg-dark);
  overflow: hidden;
}

@media (min-width: 560px) {
  .ss-deck {
    height: min(94vh, 900px);
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  }
}

.ss-progress-row { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 30; display: flex; gap: 4px; }
.ss-progress-row .seg { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.22); overflow: hidden; }
.ss-progress-row .seg span { display: block; height: 100%; width: 0%; background: #fff; transition: width 0.15s linear; }
.ss-progress-row .seg.done span { width: 100%; }

.ss-badge { position: absolute; top: 22px; left: 12px; z-index: 30; display: flex; align-items: center; gap: 8px; font-size: 11px; color: rgba(255,255,255,0.75); font-weight: 700; letter-spacing: 0.04em; }
.ss-badge img { width: 20px; height: 20px; border-radius: 50%; }
.ss-exit { position: absolute; top: 20px; right: 12px; z-index: 30; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.8); text-decoration: none; font-size: 20px; line-height: 1; }

.ss-track { height: 100%; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; touch-action: pan-x; scrollbar-width: none; }
.ss-track::-webkit-scrollbar { display: none; }

.ss-card {
  flex: 0 0 100%; width: 100%; height: 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 90px 26px 70px;
  background: linear-gradient(180deg, var(--ss-bg-light) 0%, var(--ss-bg-dark) 55%, #101025 100%);
  overflow-y: auto;
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
}
.ss-card.alt { background: linear-gradient(180deg, #14142a 0%, var(--ss-bg-dark) 55%, #0e0e20 100%); }
.ss-card.cover { justify-content: flex-end; padding-bottom: 90px; }
.ss-card.end { justify-content: flex-start; text-align: center; }
.ss-card.end .pw-sheet { margin-top: auto; margin-bottom: auto; }
.ss-card input, .ss-card button, .ss-card a { user-select: auto; -webkit-user-select: auto; }

.ss-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 14px; }
.ss-card h1 { font-size: clamp(1.5rem, 6.4vw, 2.15rem); line-height: 1.2; font-weight: 800; margin: 0 0 14px; }
.ss-card h2 { font-size: clamp(1.2rem, 5.8vw, 1.6rem); line-height: 1.28; font-weight: 800; margin: 0 0 14px; }
.ss-card p { color: var(--ss-text-muted); font-size: 0.97rem; line-height: 1.6; margin: 0 0 12px; }
.ss-card p strong, .ss-card p b { color: var(--ss-text); }
.ss-card p.ss-lead { color: var(--ss-text); font-size: 1.06rem; font-weight: 600; line-height: 1.45; }

.ss-big-stat { font-size: clamp(2.6rem, 15vw, 4rem); font-weight: 800; line-height: 1; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.ss-big-stat-label { font-size: 12px; color: var(--ss-text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 22px; }

.ss-chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.ss-chip { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 9px 10px; text-align: center; flex: 1; min-width: 76px; }
.ss-chip .cv { font-size: 1.0rem; font-weight: 800; }
.ss-chip .cl { font-size: 8.5px; color: var(--ss-text-muted); margin-top: 2px; letter-spacing: 0.02em; line-height: 1.3; }

.ss-note { border-radius: 0 10px 10px 0; padding: 14px 16px; font-size: 0.88rem; line-height: 1.55; color: var(--ss-text); margin-top: 8px; }
.ss-note strong { color: inherit; }

.ss-mini-table { width: 100%; margin: 6px 0 4px; border-collapse: collapse; }
.ss-mini-table td { padding: 9px 0; font-size: 0.86rem; border-bottom: 1px solid rgba(255,255,255,0.08); color: var(--ss-text); }
.ss-mini-table tr:last-child td { border-bottom: none; }
.ss-mini-table td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ss-text-muted); }
.ss-mini-table tr.hl td { font-weight: 700; }

.ss-fn-list { margin: 8px 0 4px; padding: 0; list-style: none; }
.ss-fn-list li { position: relative; padding: 8px 0 8px 26px; font-size: 0.92rem; color: var(--ss-text); border-bottom: 1px solid rgba(255,255,255,0.07); }
.ss-fn-list li:last-child { border-bottom: none; }
.ss-fn-list li::before { position: absolute; left: 0; top: 8px; font-weight: 900; font-size: 0.85rem; }

.ss-bar-row { margin-bottom: 14px; }
.ss-bar-row .bl-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ss-text-muted); margin-bottom: 5px; }
.ss-bar-row .bl-track { height: 11px; border-radius: 6px; background: rgba(255,255,255,0.08); overflow: hidden; }
.ss-bar-row .bl-fill { height: 100%; border-radius: 6px; }

.ss-chart-box { height: 150px; margin: 10px 0 6px; }

.ss-signal-num { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }

.ss-bl-box { border-radius: 14px; padding: 18px; margin-top: 14px; }
.ss-bl-box .bls { font-size: 1.02rem; font-weight: 800; color: var(--ss-text); margin-bottom: 8px; }
.ss-bl-box p { margin-bottom: 0; font-size: 0.9rem; }

.ss-end-logo { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 18px; display: block; }
.ss-end-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.ss-end-actions a { display: block; text-decoration: none; padding: 13px 18px; border-radius: 10px; font-size: 0.92rem; font-weight: 700; text-align: center; }
.ss-end-actions a.secondary { background: rgba(255,255,255,0.07); color: var(--ss-text); border: 1px solid rgba(255,255,255,0.14); }
.ss-end-note { font-size: 11px; color: rgba(191,191,191,0.6); margin-top: 20px; line-height: 1.6; }

.ss-swipe-hint { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 11px; color: rgba(255,255,255,0.5); letter-spacing: 0.04em; display: flex; align-items: center; justify-content: center; gap: 6px; animation: ss-hintfade 2.4s ease-in-out infinite; }
@keyframes ss-hintfade { 0%,100% { opacity: 0.35; } 50% { opacity: 0.85; } }

/* Paywall overlay (public/js/paywall.js) — sits above everything else in .ss-deck */
.pw-overlay {
  position: absolute; inset: 0; z-index: 40;
  background: var(--ss-bg-dark);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
}
.pw-overlay[hidden] { display: none; }
.pw-exit {
  position: absolute; top: 20px; right: 12px; z-index: 41;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8); text-decoration: none; font-size: 20px; line-height: 1;
}
.pw-sheet { width: 100%; max-width: 340px; }
.pw-step[hidden] { display: none; }
.pw-icon { font-size: 2.2rem; text-align: center; margin-bottom: 14px; }
.pw-sheet h3 { color: var(--ss-text); font-size: 1.2rem; font-weight: 800; margin: 0 0 8px; text-align: center; }
.pw-sub { color: var(--ss-text-muted); font-size: 0.88rem; line-height: 1.5; text-align: center; margin: 0 0 20px; }
.pw-sheet label { display: block; color: var(--ss-text-muted); font-size: 0.8rem; margin: 14px 0 6px; }
.pw-sheet input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.04);
  color: var(--ss-text); font-size: 1rem; letter-spacing: 0.04em;
}
.pw-sheet input::placeholder { color: rgba(191,191,191,0.5); }
.pw-error { color: #ff6b7f; font-size: 0.8rem; margin: 8px 0 0; min-height: 1.1em; text-align: center; }
.pw-btn-primary {
  width: 100%; box-sizing: border-box; margin-top: 20px; padding: 14px; border: none; border-radius: 10px;
  background: var(--accent, #e43f5a); color: #fff; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.pw-link {
  display: block; width: 100%; margin-top: 12px; padding: 8px; border: none; background: none;
  color: var(--ss-text-muted); font-size: 0.85rem; text-decoration: underline; cursor: pointer; text-align: center;
}
.pw-spinner {
  width: 34px; height: 34px; margin: 0 auto 16px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--accent, #e43f5a);
  animation: pw-spin 0.8s linear infinite;
}
@keyframes pw-spin { to { transform: rotate(360deg); } }

.pw-icon-circle {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.pw-arrow { display: inline-block; margin-left: 4px; }
.pw-divider {
  display: flex; align-items: center; gap: 10px; margin: 18px 0;
  color: var(--ss-text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.pw-divider::before, .pw-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.12);
}
.pw-btn-outline {
  width: 100%; padding: 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2); background: transparent;
  color: var(--ss-text); font-size: 0.92rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.pw-btn-icon { font-size: 1rem; }
.pw-helper {
  color: var(--ss-text-muted); font-size: 0.76rem; text-align: center;
  margin: 12px 0 0; line-height: 1.4;
}
.pw-value-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 22px 0 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.1);
}
.pw-value-item {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
}
.pw-value-icon { font-size: 1.2rem; margin-bottom: 2px; }
.pw-value-item strong { color: var(--ss-text); font-size: 0.72rem; font-weight: 700; line-height: 1.25; }
.pw-value-item span { color: var(--ss-text-muted); font-size: 0.68rem; line-height: 1.3; }
.pw-brand {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-align: center; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.1);
}
.pw-brand strong { color: var(--ss-text); font-size: 0.82rem; font-weight: 800; }
.pw-brand span { color: var(--ss-text-muted); font-size: 0.62rem; letter-spacing: 0.06em; }

/* Shared "end of story" card (public/js/end-card.js) */
.ec-icon-circle {
  width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 50%;
  border: 1px solid rgba(139,124,246,0.35); background: rgba(139,124,246,0.1);
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
}
.ec-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 22px 0 18px; }
.ec-share-title { color: var(--ss-text); font-size: 0.95rem; font-weight: 800; margin: 0 0 14px; text-align: center; }
.ec-qr-box {
  width: 180px; height: 180px; margin: 0 auto 10px; background: #fff; border-radius: 14px;
  padding: 12px; display: flex; align-items: center; justify-content: center;
}
.ec-qr-box img { width: 100%; height: 100%; display: block; }
.ec-qr-caption { color: var(--ss-text-muted); font-size: 0.8rem; text-align: center; margin: 0 0 18px; }
.ec-btn-donate {
  width: 100%; margin-top: 12px; padding: 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--accent, #e43f5a); background: transparent; color: var(--accent, #e43f5a);
  font-size: 0.92rem; font-weight: 700; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.ec-btn-copy {
  width: 100%; padding: 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2); background: transparent; color: var(--ss-text);
  font-size: 0.92rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.ec-note { font-size: 11px; color: rgba(191,191,191,0.55); margin: 18px 0 0; line-height: 1.6; text-align: center; }

.ec-gift-form, .ec-gift-status, .ec-gift-link { margin-top: 14px; }
.ec-gift-form[hidden], .ec-gift-status[hidden], .ec-gift-link[hidden] { display: none; }
.ec-gift-status { text-align: center; }
.ec-gift-link-box {
  width: 100%; padding: 12px; margin-bottom: 10px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.04);
  color: var(--ss-text); font-size: 0.8rem; word-break: break-all; text-align: center;
}
