/* ========================================
   Flight Show Page — Scrollable Redesign
   ======================================== */

/* ── Loading States ───────────────── */
.loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-secondary, #666);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.analysis-error {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary, #666);
}

.btn-retry {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-retry:hover {
  background: #2980b9;
}

/* ── Page Container ───────────────── */
.flight-page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  background: var(--color-bg-body, #f8fafc);
  min-height: 100vh;
}

/* ── Hero Section ─────────────────── */
.flight-hero {
  background-color: #0b1f36;
  background-image: linear-gradient(135deg, #0f766e 0%, #0f3f72 55%, #0b1f36 100%);
  background-size: 100% 500px;
  background-repeat: no-repeat;
  padding: 26px 32px 0;
  color: #e8f5f2;
  position: relative;
  overflow: hidden;
}

.flight-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(45, 212, 191, 0.18), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.16), transparent 24%);
  pointer-events: none;
}

.flight-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.flight-hero-title h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #f1f9f6;
}

.flight-breadcrumb {
  margin-bottom: 8px;
}

.breadcrumb-link {
  color: rgba(232,245,242,0.75);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.breadcrumb-link:hover {
  color: white;
}

.flight-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: rgba(232,245,242,0.9);
}

.meta-separator {
  opacity: 0.5;
}

.meta-country-flag {
  font-size: 18px;
  line-height: 1;
}

.meta-time-range {
  font-size: 13px;
  opacity: 0.75;
  font-weight: 500;
}

.flight-description-banner {
  background: var(--color-surface-50, #f8fafc);
  border: 1px solid var(--color-border, rgba(0,0,0,0.08));
  border-radius: var(--radius-md, 10px);
  padding: var(--space-4, 16px) var(--space-5, 20px);
  margin-bottom: var(--space-4, 16px);
}

.flight-description-banner .description-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-700, #334155);
  margin: 0;
}

.flight-description-banner .description-text p {
  margin: 0 0 8px;
}

.flight-description-banner .description-text p:last-child {
  margin-bottom: 0;
}

.flight-hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(232,245,242,0.14);
  color: #f1f9f6;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid rgba(232,245,242,0.25);
}

.btn-icon:hover {
  background: rgba(232,245,242,0.24);
}

.btn-icon-danger {
  background: rgba(254, 242, 242, 0.2);
  color: #fee2e2;
  border-color: rgba(248, 113, 113, 0.5);
}

.btn-icon-danger:hover {
  background: rgba(254, 226, 226, 0.3);
  color: #fecdd3;
  border-color: rgba(239, 68, 68, 0.6);
}

/* ── Key Stats Bar ────────────────── */
.flight-key-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px 0 20px;
  border-top: 1px solid rgba(232,245,242,0.18);
}

.key-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(4, 16, 18, 0.22);
  border: 1px solid rgba(232,245,242,0.14);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  backdrop-filter: blur(6px);
}

.key-stat-icon {
  font-size: 22px;
  opacity: 0.95;
}

.key-stat-content {
  display: flex;
  flex-direction: column;
}

.key-stat-value {
  font-size: 19px;
  font-weight: 800;
}

.key-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.82;
}

.key-stat-sub {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 2px;
}

/* ── Achievements Bar ─────────────── */
.flight-achievements-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border-top: 1px solid rgba(250, 204, 21, 0.3);
}

.achievement-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.achievement-badge-inline:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.achievement-badge-inline .achievement-icon {
  font-size: 16px;
}

.achievement-badge-inline .achievement-title {
  white-space: nowrap;
}

/* ── Map Container ────────────────── */
.flight-map-container {
  margin: 0 -32px;
  background: #1a1a1a;
}

#flight-map {
  height: 450px;
  width: 100%;
}

.map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, #0f172a 0%, #0b1221 45%, #040912 100%);
  color: #e2e8f0;
  border-bottom: 1px solid #0f172a;
  min-height: 320px;
}

.map-placeholder-body {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
}

.map-placeholder-icon {
  font-size: 26px;
}

.map-placeholder-text {
  max-width: 520px;
}

.map-placeholder-text p {
  margin: 4px 0 0;
  color: #cbd5e1;
}

.btn-load-map {
  padding: 10px 14px;
  background: linear-gradient(135deg, #22d3ee 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-load-map:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.45);
}

.is-hidden {
  display: none !important;
}

/* ── Replay Controls ──────────────── */
.replay-controls {
  background: linear-gradient(180deg, #0f172a, #1e293b);
  padding: 0 32px 16px;
  color: #e2e8f0;
}

.replay-profile-wrapper {
  position: relative;
  height: 80px;
  margin-bottom: 8px;
}

.replay-profile-canvas {
  width: 100%;
  height: 100%;
}

.replay-profile-labels {
  position: absolute;
  top: 0;
  right: 8px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.replay-profile-label {
  font-size: 10px;
  color: rgba(226, 232, 240, 0.5);
}

.replay-controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.replay-btn {
  padding: 6px 14px;
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.replay-btn:hover {
  background: rgba(255,255,255,0.18);
}

.replay-scrubber {
  flex: 1;
  accent-color: #3b82f6;
}

.replay-time,
.replay-alt,
.replay-vario {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.8;
}

.replay-speed {
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
}

/* ── Scroll Nav (sticky section navigation) ── */
.flight-scroll-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  padding: 0 32px;
  display: none; /* shown via JS on scroll */
}

.flight-scroll-nav.is-visible {
  display: block;
}

.scroll-nav-inner {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 1400px;
  margin: 0 auto;
}

.scroll-nav-inner::-webkit-scrollbar {
  display: none;
}

.scroll-nav-link {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.scroll-nav-link:hover {
  color: #334155;
}

.scroll-nav-link.is-active {
  color: #0f766e;
  border-bottom-color: #0f766e;
}

/* ── Scrollable Content Area (replaces tabs) ── */
.flight-sections {
  padding: 0 32px 48px;
  background: #f8fafc;
}

.flight-section {
  padding: 32px 0;
  border-bottom: 1px solid #e2e8f0;
}

.flight-section:last-child {
  border-bottom: none;
}

.flight-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.flight-section-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.flight-section-header svg {
  color: #0f766e;
  flex-shrink: 0;
}

.section-pro-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.25);
}

.section-free-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #ecfdf5;
  color: #059669;
  padding: 3px 10px;
  border-radius: 4px;
}

/* ── Flight Summary Grid ──────────── */
.flight-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Info Cards (shared across sections) */
.info-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
}

.info-card-wide {
  grid-column: 1 / -1;
}

.info-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.info-card-title svg {
  color: #3b82f6;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-grid-3col {
  grid-template-columns: repeat(3, 1fr);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  font-weight: 500;
}

.info-value {
  font-size: 15px;
  color: #1e293b;
  font-weight: 600;
}

.info-value-small {
  font-size: 13px;
  word-break: break-all;
}

.info-value-highlight {
  color: #0f766e;
}

.info-link {
  color: #3b82f6;
  text-decoration: none;
}

.info-link:hover {
  text-decoration: underline;
}

.external-link {
  word-break: break-all;
  font-size: 14px;
}

.description-text {
  color: #475569;
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 0;
}

.description-private-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  font-style: italic;
  margin-top: 8px;
}

/* ── Pilot Ratings ────────────────── */
.pilot-ratings-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.pilot-rating-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pilot-rating-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  font-weight: 500;
}

.pilot-rating-stars {
  display: flex;
  gap: 2px;
}

.pilot-rating-stars .star {
  font-size: 18px;
  color: #d4d4d8;
}

.pilot-rating-stars .star.filled {
  color: #f59e0b;
}

.pilot-rating-empty {
  font-size: 13px;
  color: #94a3b8;
  font-style: italic;
}

/* ── Overview Section (unified Summary + Ratings + Description) ── */
.overview-description {
  margin-bottom: 20px;
}

.overview-description-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
}

.overview-description-text p {
  margin: 0 0 8px;
}

.overview-description-text p:last-child {
  margin-bottom: 0;
}

.info-card-divider {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.info-label-block {
  margin-bottom: 8px;
  display: block;
}

.info-value-block {
  display: block;
  margin-top: 2px;
}

.info-card-footer {
  margin-top: 12px;
  padding-top: 8px;
}

.overview-weather-tease {
  margin-top: 16px;
}

.weather-snapshot--blurred {
  opacity: 0.4;
}

.overview-loading-text {
  color: #94a3b8;
  font-size: 13px;
}

.overview-empty-text {
  color: #94a3b8;
  font-size: 14px;
  font-style: italic;
}

.meta-glider-type {
  color: #94a3b8;
  font-weight: 400;
}

/* Overview Ratings (folded from standalone section) */
.overview-ratings {
  margin-top: 20px;
  padding: 16px 20px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.overview-ratings-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.overview-ratings-header svg {
  color: #f59e0b;
  flex-shrink: 0;
}

.overview-ratings-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.overview-ratings-cta {
  font-size: 13px;
  color: #3b82f6;
  text-decoration: none;
  margin-left: auto;
}

.overview-ratings-cta:hover {
  text-decoration: underline;
}

.overview-ratings-incomplete {
  margin-top: 8px;
}

.overview-ratings-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  border: 1px dashed #e2e8f0;
}

.overview-ratings-empty-icon {
  font-size: 20px;
}

.overview-ratings-empty-title {
  margin: 0;
  font-size: 14px;
  color: #475569;
}

.overview-ratings-empty-hint {
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

/* ── Weather Snapshot ────────────── */
.weather-snapshot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.weather-snapshot-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.weather-snapshot-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.weather-snapshot-content {
  display: flex;
  flex-direction: column;
}

.weather-snapshot-value {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.weather-snapshot-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.weather-snapshot-detail {
  font-size: 11px;
  color: #94a3b8;
}

.weather-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
}

.weather-rating-badge.excellent { background: #dcfce7; color: #166534; }
.weather-rating-badge.good { background: #dbeafe; color: #1e40af; }
.weather-rating-badge.moderate { background: #fef3c7; color: #92400e; }
.weather-rating-badge.challenging { background: #fed7aa; color: #9a3412; }
.weather-rating-badge.poor { background: #fecaca; color: #991b1b; }

/* ── Premium Tease / Blur Overlay ── */
.premium-tease-section {
  position: relative;
  display: grid;
  border-radius: 12px;
  overflow: hidden;
}

.premium-tease-content {
  grid-area: 1 / 1;
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
  opacity: 0.7;
  min-height: 0;
}

/* Overlay variant (default) — floats over blurred content */
.premium-tease-overlay {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);
  z-index: 5;
  min-height: 240px;
}

/* Card variant — standalone card with bg + border, for turbo-frame lockscreens */
.premium-tease-overlay--card {
  grid-area: unset;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 48px 40px;
  min-height: auto;
  position: relative;
  overflow: hidden;
}

.premium-tease-overlay--card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

/* Inline variant — compact, no card wrapper */
.premium-tease-overlay--inline {
  grid-area: unset;
  background: transparent;
  backdrop-filter: none;
  padding: 16px 0;
  min-height: auto;
}

/* Badge — tier-aware color variants */
.premium-tease-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.premium-tease-badge--race {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.premium-tease-badge--mentor {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.premium-tease-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 6px;
}

.premium-tease-desc {
  font-size: 14px;
  color: #475569;
  margin: 0 0 16px;
  max-width: 400px;
}

/* Feature checklist inside tease */
.premium-tease-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  max-width: 480px;
}

.premium-tease-feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}

.premium-tease-feature svg {
  color: #10b981;
  flex-shrink: 0;
}

/* Tier upgrade note */
.premium-tease-tier-note {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
  font-style: italic;
}

.btn-premium-upgrade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
  white-space: nowrap;
}

.btn-premium-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.35);
}

.btn-premium-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: white;
  color: #6d28d9;
  border: 2px solid #e2e0f5;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-premium-signin:hover {
  background: #f5f3ff;
  border-color: #c4b5fd;
}

.premium-tease-note {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 10px;
}

/* Skeleton placeholder for locked insights */
.insight-skeleton {
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid #f1f5f9;
}

.insight-skeleton-bar {
  border-radius: 4px;
  background: #e2e8f0;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.insight-skeleton-bar--title {
  height: 14px;
  width: 55%;
  margin-bottom: 8px;
}

.insight-skeleton-bar--text {
  height: 10px;
  width: 85%;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Paywall Trial Variant (A/B experiment) ── */

/* Lock icon centered over blurred content */
.paywall-lock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
  color: #7c3aed;
}

/* Trial variant wrapper tweaks */
.paywall-trial-variant {
  gap: 4px;
}

/* CTA stack — vertical layout with spacing */
.paywall-cta-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  width: 100%;
  max-width: 320px;
}

/* Primary trial CTA — emphasized with pulse glow */
.btn-trial-primary {
  position: relative;
  animation: trial-pulse-glow 2.5s ease-in-out infinite;
}

.btn-trial-primary svg {
  flex-shrink: 0;
}

@keyframes trial-pulse-glow {
  0%, 100% {
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
  }
  50% {
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.45), 0 0 0 4px rgba(124, 58, 237, 0.08);
  }
}

/* Tertiary preview button — ghost/link style */
.btn-paywall-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: #6d28d9;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-paywall-preview:hover {
  background: #f5f3ff;
  text-decoration: underline;
}

.btn-paywall-preview svg {
  flex-shrink: 0;
  color: #7c3aed;
}

/* ── Preview Modal ── */
.paywall-preview-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: var(--z-modal-backdrop, 1200);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.paywall-preview-modal-backdrop.active {
  opacity: 1;
}

.paywall-preview-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  background: white;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  z-index: var(--z-modal, 1300);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.paywall-preview-modal.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.paywall-preview-modal-header {
  position: relative;
  padding: 28px 28px 16px;
  text-align: center;
}

.paywall-preview-modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
}

.paywall-preview-modal-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.paywall-preview-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s;
}

.paywall-preview-modal-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.paywall-preview-modal-body {
  padding: 0 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.paywall-preview-chart-card {
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  overflow: hidden;
}

.paywall-preview-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0 0 12px;
}

.paywall-preview-chart-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.paywall-preview-modal-footer {
  padding: 16px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Mobile: slide-up modal */
@media (max-width: 768px) {
  .paywall-preview-modal {
    top: auto;
    left: 0;
    bottom: 0;
    transform: translateY(20px);
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
  }

  .paywall-preview-modal.active {
    transform: translateY(0);
  }

  .paywall-preview-modal-header {
    padding: 20px 20px 12px;
  }

  .paywall-preview-modal-body {
    padding: 0 20px 12px;
  }

  .paywall-preview-modal-footer {
    padding: 12px 20px 24px;
  }

  .paywall-cta-stack {
    max-width: 100%;
  }
}

/* Free insight teaser cards */
.insight-teaser-blurred {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  opacity: 0.5;
}

/* Placeholder card for performance tease */
.performance-placeholder-card {
  padding: 20px;
}

.performance-placeholder-card h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

/* Performance empty state */
.performance-empty-state {
  padding: 24px;
  text-align: center;
  color: #64748b;
}

/* ── Performance Snapshots ────────── */
.performance-snapshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Analysis Section Styles ──────── */
.performance-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.performance-title {
  flex: 1;
  min-width: 200px;
}

.title-pill {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary-600, #0d9488);
  background: rgba(13, 148, 136, 0.10);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.title-copy {
  font-size: 14px;
  color: var(--text-secondary, #64748b);
  margin: 4px 0 0;
}

.snapshot-card {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Collapsible analysis sections */
.analysis-section-details {
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  background: var(--color-surface, #fff);
  margin-bottom: 16px;
  overflow: hidden;
}

.analysis-section-details[open] {
  border-color: var(--color-primary-200, #99f6e4);
}

.analysis-section-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary, #1e293b);
  user-select: none;
  list-style: none;
  transition: background 0.15s;
}

.analysis-section-summary:hover {
  background: var(--color-bg-hover, #f1f5f9);
}

.analysis-section-summary::-webkit-details-marker {
  display: none;
}

.analysis-section-summary::before {
  content: "▸";
  font-size: 12px;
  transition: transform 0.2s;
  color: var(--text-secondary, #64748b);
}

.analysis-section-details[open] > .analysis-section-summary::before {
  transform: rotate(90deg);
}

.section-icon {
  font-size: 18px;
}

.section-count {
  font-size: 12px;
  font-weight: 700;
  background: var(--color-primary-100, #ccfbf1);
  color: var(--color-primary-700, #0f766e);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
}

.btn-inline {
  font-size: 12px;
  padding: 4px 10px;
  margin-left: 8px;
}

.analysis-section-body {
  padding: 0 18px 18px;
}

.performance-deep {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.performance-empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary, #64748b);
}

.performance-empty-state .empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.performance-empty-state h3 {
  margin: 0 0 8px;
  color: var(--text-primary, #1e293b);
}

.performance-empty-state .empty-state-hint {
  font-size: 13px;
  margin-top: 8px;
  opacity: 0.8;
}

/* ── Tab visibility toggles ──────── */
.tab-visibility-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  color: #e5eef3;
}

.tab-visibility-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.tab-visibility-label {
  opacity: 0.8;
}

.tab-visibility-status {
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.tab-visibility-status.status-public {
  background: rgba(74, 222, 128, 0.15);
  color: #bbf7d0;
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.tab-visibility-status.status-private {
  background: rgba(248, 113, 113, 0.15);
  color: #fecdd3;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.tab-visibility-actions {
  display: flex;
  gap: 10px;
}

.tab-toggle-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #e5eef3;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.tab-toggle-btn:hover {
  background: rgba(255,255,255,0.15);
}

.tab-anchor {
  position: relative;
  top: -80px;
  height: 0;
  visibility: hidden;
}

/* ── Coach Strip Card ─────────────── */
.coach-strip-card {
  background: rgba(4, 16, 18, 0.35);
  border: 1px solid rgba(232,245,242,0.14);
  border-radius: var(--radius-lg, 12px);
  padding: 20px 24px;
}

.coach-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.coach-strip-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-primary-600, #2A9D8F);
  color: #fff;
}

.coach-strip-status {
  font-size: 12px;
  opacity: 0.7;
}

.coach-strip-body {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.coach-strip-section {
  flex: 1 1 200px;
  min-width: 0;
}

.coach-strip-section-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  opacity: 0.85;
}

.coach-strip-list {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.coach-strip-highlight {
  background: rgba(42,157,143,0.10);
  border: 1px solid rgba(42,157,143,0.25);
  border-radius: var(--radius-md, 8px);
  padding: 10px 14px;
}

.coach-strip-highlight p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.coach-strip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.coach-strip-empty {
  text-align: center;
  padding: 12px 0;
}

.coach-strip-empty .coach-strip-chip {
  margin-bottom: 10px;
}

.coach-strip-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.coach-strip-copy {
  font-size: 14px;
  opacity: 0.7;
  margin: 0 0 14px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.coach-strip-empty .coach-strip-actions {
  justify-content: center;
}

/* ── Flight Coach Strip (hero variant) ── */
.flight-coach-strip {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) 1.4fr;
  gap: 16px;
  padding: 18px 20px;
  margin: 12px 0 18px;
  background: linear-gradient(140deg, #0b2e3f 0%, #0f5f4f 55%, #0a1c2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  color: #e2f1ec;
}

.coach-strip-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(29, 185, 84, 0.18);
  color: #b7f7d3;
  border: 1px solid rgba(29, 185, 84, 0.35);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.coach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e8f5f2;
  background: rgba(255,255,255,0.08);
}

.coach-btn-primary {
  background: linear-gradient(135deg, #2ee079, #1db954, #15803d);
  color: #041012;
  box-shadow: 0 12px 24px rgba(21, 128, 61, 0.28);
  border-color: rgba(29, 185, 84, 0.65);
}

.coach-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(21, 128, 61, 0.36);
}

.coach-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #e8f5f2;
  border-color: rgba(255, 255, 255, 0.16);
}

.coach-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.coach-tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.coach-tip {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  color: #e2e8f0;
}

.coach-tip-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.coach-tip-title {
  font-weight: 700;
  font-size: 15px;
  color: #f8fafc;
  margin-bottom: 4px;
}

.coach-tip-copy {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
}

/* ── Day Analyzer Banner ──────────── */
.day-analyzer-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
  border-radius: 12px;
  padding: 14px 20px;
  margin-top: 16px;
}

.day-analyzer-banner.premium-teaser-banner {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border-color: #d8b4fe;
}

.day-analyzer-banner .banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.day-analyzer-banner .banner-content {
  flex: 1;
  color: #334155;
  font-size: 0.95rem;
}

.day-analyzer-banner .premium-hint {
  color: #7c3aed;
  font-weight: 500;
}

.btn-day-analyzer {
  background: #2563eb;
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-day-analyzer:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-day-analyzer-upgrade {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-day-analyzer-upgrade:hover {
  background: linear-gradient(135deg, #6d28d9, #5b21b6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

/* ── Photo ────────────────────────── */
.photo-link {
  display: block;
}

.flight-photo {
  width: 100%;
  max-width: 800px;
  border-radius: 8px;
  transition: transform 0.2s;
}

.flight-photo:hover {
  transform: scale(1.01);
}

/* ── Premium Teaser (legacy — deprecated, use .premium-tease-overlay--card instead) ── */
.premium-teaser {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 48px;
  border-radius: 16px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.premium-teaser-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.premium-teaser h2 {
  font-size: 24px;
  margin: 0 0 12px;
}

.premium-teaser p {
  opacity: 0.9;
  margin: 0 0 24px;
}

.premium-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.premium-feature {
  background: rgba(255,255,255,0.15);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-premium {
  display: inline-block;
  background: white;
  color: #667eea;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-premium-outline {
  display: inline-block;
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 10px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s;
}

.premium-auth-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 340px;
}

.premium-note {
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.8;
}

/* ── Comments Section ────────────── */
.comments-section {
  max-width: 800px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.comment-input {
  width: 100%;
  padding: 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.2s;
  font-family: inherit;
}

.comment-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.btn-comment-submit {
  align-self: flex-start;
  padding: 12px 24px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-comment-submit:hover {
  background: #2563eb;
}

.comment-signin-prompt {
  color: #64748b;
  font-style: italic;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-author-info {
  display: flex;
  flex-direction: column;
}

.comment-author-name {
  font-weight: 600;
  color: #1e293b;
}

.comment-time {
  font-size: 12px;
  color: #64748b;
}

.comment-delete-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
}

.comment-content {
  color: #334155;
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 0 0 12px;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.like-btn, .like-count {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  color: #64748b;
  transition: all 0.2s;
}

.like-btn:hover {
  background: #f1f5f9;
}

.like-btn.liked {
  color: #3b82f6;
  background: #eff6ff;
}

.no-comments {
  color: #64748b;
  font-style: italic;
  text-align: center;
  padding: 32px;
  background: #f8fafc;
  border-radius: 12px;
}

/* ── Debrief / Reflect Section ────── */
.debrief-prompt {
  text-align: center;
  padding: 40px 24px;
  background: white;
  border-radius: 12px;
  border: 2px dashed #e2e8f0;
}

.debrief-prompt-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.debrief-prompt h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px;
}

.debrief-prompt-text {
  color: #64748b;
  font-size: 14px;
  max-width: 480px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.debrief-prompt-cta {
  margin-bottom: 20px;
}

.debrief-prompt-hints {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.debrief-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
}

.debrief-hint-icon {
  font-size: 16px;
}

.debrief-summary {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 24px;
}

.debrief-summary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.debrief-summary-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.debrief-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.debrief-status-draft { background: #f1f5f9; color: #64748b; }
.debrief-status-in_progress { background: #fef3c7; color: #92400e; }
.debrief-status-completed { background: #dcfce7; color: #166534; }
.debrief-status-reviewed { background: #dbeafe; color: #1e40af; }

.debrief-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.debrief-rating-label {
  font-size: 13px;
  color: #64748b;
}

.debrief-rating-stars .star {
  font-size: 16px;
}

.debrief-rating-stars .star.filled {
  color: #f59e0b;
}

.debrief-section {
  margin-bottom: 16px;
}

.debrief-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 8px;
}

.debrief-section-icon {
  margin-right: 4px;
}

.debrief-list {
  margin: 0;
  padding-left: 20px;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
}

.debrief-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.debrief-reviews-summary {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.debrief-reviews-summary h4 {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 12px;
}

.review-thread-preview {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.review-thread-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.review-thread-time {
  font-size: 12px;
  color: #94a3b8;
}

.review-thread-excerpt {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

/* ── Deep Analysis Locked Preview ── */
.analysis-locked-preview {
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 48px 40px;
  text-align: center;
  position: relative;
}

.analysis-locked-preview::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.analysis-locked-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 24px;
}

.analysis-locked-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
}

/* ── Flight Intelligence / Insights ── */
.flight-insights-section {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.intelligence-actions {
  margin-bottom: 16px;
  text-align: right;
}

.intelligence-actions .btn-sm {
  font-size: 13px;
  padding: 6px 14px;
}

.insights-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.insights-header h2 {
  color: #0f172a;
  margin: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.insights-icon {
  font-size: 1.5rem;
}

.btn-refresh {
  background: #2563eb;
  color: white;
  border: 1px solid #1d4ed8;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-refresh:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* Insights list: priority-driven layout */
.insights-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Top priority insight — full width, prominent */
.insight-card--top {
  grid-column: 1 / -1;
}

.insight-card--top .insight-title {
  font-size: 1.25rem;
}

.insight-card--top .insight-extras {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

/* Secondary insights — 2-column grid */
.insights-grid-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

/* Minor insights — compact collapsible list */
.insights-minor {
  margin-top: 0.5rem;
}

.insights-minor-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
}

.insights-minor-toggle svg {
  transition: transform 0.2s;
}

.insights-minor-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.insights-minor-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.insight-card--minor {
  padding: 12px 16px;
  border-left-width: 3px;
}

.insight-card--minor .insight-title {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.insight-card--minor .insight-description {
  font-size: 0.85rem;
}

.insight-card--minor .insight-extras,
.insight-card--minor .insight-data {
  display: none;
}

/* Base insight card */
.insight-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid #3b82f6;
}

.insight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.insight-card.insight-positive {
  border-left-color: #10b981;
}

.insight-card.insight-informative {
  border-left-color: #3b82f6;
}

.insight-card.insight-neutral {
  border-left-color: #6b7280;
}

.insight-card.insight-suggestion {
  border-left-color: #f59e0b;
}

.insight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.insight-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.insight-badge.timing { background: #fef3c7; color: #92400e; }
.insight-badge.altitude { background: #dbeafe; color: #1e40af; }
.insight-badge.weather { background: #e0e7ff; color: #3730a3; }
.insight-badge.duration { background: #fce7f3; color: #831843; }
.insight-badge.site_comparison { background: #d1fae5; color: #065f46; }
.insight-badge.pattern { background: #e0e7ff; color: #3730a3; }
.insight-badge.efficiency { background: #fef3c7; color: #92400e; }
.insight-badge.glide { background: #dbeafe; color: #1e40af; }
.insight-badge.time_allocation { background: #fce7f3; color: #831843; }

.insight-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.insight-description {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
  font-size: 0.938rem;
}

.insight-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.25rem 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid #e5e7eb;
}

.pill-primary { background: #ecfeff; border-color: #22d3ee; color: #0f172a; }
.pill-delta { background: #eef2ff; border-color: #6366f1; color: #312e81; }
.pill-compare { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.pill-confidence { background: #e0f2fe; border-color: #38bdf8; color: #0c4a6e; }
.pill-low { background: #fff7ed; border-color: #f97316; color: #9a3412; }
.pill-ok { background: #e0f2fe; border-color: #38bdf8; color: #0c4a6e; }

.insight-data {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.data-point {
  font-size: 0.813rem;
  background: #f9fafb;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
}

.data-label {
  color: #6b7280;
  font-weight: 500;
}

.data-value {
  color: #111827;
  font-weight: 600;
  margin-left: 0.25rem;
}

.insight-extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.extras-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  margin-bottom: 0.2rem;
}

.insight-extras p {
  margin: 0;
  color: #1f2937;
  line-height: 1.5;
  font-size: 0.9rem;
}

.insights-note {
  margin-top: 0.75rem;
  color: #475569;
  font-size: 0.9rem;
}

.insights-empty {
  background: white;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: #0f172a;
}

.insights-empty p {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
}

.help-text {
  font-size: 0.9rem;
  color: #475569;
}

/* ── Patterns Section ─────────────── */
.patterns-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.patterns-section h3 {
  color: #0f172a;
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
}

.patterns-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pattern-card {
  display: flex;
  align-items: start;
  gap: 1rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: transform 0.15s, box-shadow 0.15s;
}

.pattern-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.pattern-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 10px;
}

.pattern-content {
  flex: 1;
}

.pattern-description {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #0f172a;
}

.pattern-meta {
  color: #475569;
  font-size: 0.875rem;
}

.pattern-confidence-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.pattern-confidence-track {
  width: 48px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.pattern-confidence-fill {
  height: 100%;
  border-radius: 2px;
  background: #10b981;
  transition: width 0.3s;
}

/* ── Danger Zone ──────────────────── */
.flight-danger-zone {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #fecaca;
}

.btn-delete {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* ── Map mode banner (removed from default; fallback only) ── */
.map-mode-banner {
  margin: 8px -32px 0;
  padding: 12px 18px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #e0f2fe 0%, #eff6ff 100%);
  border-bottom: 1px solid #cbd5e1;
}

.map-mode-banner.is-visible {
  display: flex;
}

.map-mode-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-mode-label {
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.map-mode-copy {
  margin: 0;
  color: #1f2937;
  font-size: 14px;
}

.map-mode-toggle {
  display: inline-flex;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.map-mode-btn {
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: #0f172a;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-mode-btn:hover {
  background: #e0f2fe;
}

.map-mode-btn.is-active {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: white;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
}

/* ── Premium Badge (small) ────────── */
.premium-badge-small {
  font-size: 9px;
  font-weight: 700;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Responsive ───────────────────── */
@media (max-width: 768px) {
  .flight-hero {
    padding: 16px 16px 0;
  }

  .flight-hero-header {
    gap: 12px;
  }

  .flight-hero-title h1 {
    font-size: 20px;
  }

  .flight-breadcrumb {
    margin-bottom: 4px;
  }

  .breadcrumb-link {
    font-size: 13px;
  }

  .flight-hero-meta {
    font-size: 13px;
    flex-wrap: wrap;
  }

  .flight-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .btn-icon {
    padding: 8px 12px;
    font-size: 13px;
  }

  .btn-icon span {
    display: none;
  }

  .btn-icon svg {
    width: 18px;
    height: 18px;
  }

  .flight-key-stats {
    gap: 10px;
    padding: 16px 0;
  }

  .key-stat {
    flex: 1 1 45%;
    gap: 8px;
  }

  .key-stat-icon {
    font-size: 20px;
  }

  .key-stat-value {
    font-size: 16px;
  }

  .key-stat-label {
    font-size: 10px;
  }

  .flight-map-container {
    margin: 0 -16px;
  }

  .replay-controls {
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px 16px;
  }

  #flight-map {
    height: 280px;
  }

  .flight-sections {
    padding: 0 16px 24px;
  }

  .flight-scroll-nav {
    padding: 0 16px;
  }

  .flight-summary-grid {
    grid-template-columns: 1fr;
  }

  .info-card {
    padding: 16px;
    border-radius: 10px;
  }

  .info-card-title {
    font-size: 14px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    gap: 8px;
  }

  .info-card-title svg {
    width: 18px;
    height: 18px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .info-grid-3col {
    grid-template-columns: 1fr;
  }

  .info-label {
    font-size: 11px;
  }

  .info-value {
    font-size: 14px;
  }

  .description-text {
    font-size: 14px;
    line-height: 1.6;
  }

  .flight-photo {
    border-radius: 6px;
  }

  .performance-snapshots {
    grid-template-columns: 1fr;
  }

  .pilot-ratings-row {
    gap: 20px;
  }

  /* Overview responsive */
  .overview-ratings {
    padding: 12px 16px;
  }

  .overview-ratings-header {
    gap: 6px;
  }

  .overview-ratings-title {
    font-size: 14px;
  }

  .overview-description-text {
    font-size: 14px;
  }

  .overview-ratings-empty {
    padding: 10px 12px;
    gap: 10px;
  }

  .overview-ratings-empty-icon {
    font-size: 18px;
  }

  .overview-ratings-empty-title {
    font-size: 13px;
  }

  .weather-snapshot {
    grid-template-columns: repeat(2, 1fr);
  }

  .premium-teaser {
    padding: 24px 16px;
    border-radius: 12px;
  }

  .premium-teaser-icon {
    font-size: 36px;
  }

  .premium-teaser h2 {
    font-size: 20px;
  }

  /* Comments */
  .comments-section {
    max-width: 100%;
  }

  .comment-form {
    margin-bottom: 24px;
    padding-bottom: 20px;
  }

  .comment-input {
    padding: 12px;
    font-size: 14px;
  }

  .btn-comment-submit {
    width: 100%;
    padding: 12px;
  }

  .comment-card {
    padding: 16px;
  }

  .comment-author-name {
    font-size: 14px;
  }

  .comment-time {
    font-size: 11px;
  }

  .comment-content {
    font-size: 14px;
  }

  .like-btn, .like-count {
    font-size: 13px;
    padding: 4px 10px;
  }

  .no-comments {
    padding: 24px;
    font-size: 14px;
  }

  .debrief-prompt {
    padding: 24px 16px;
  }

  .debrief-prompt-hints {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .day-analyzer-banner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .btn-day-analyzer,
  .btn-day-analyzer-upgrade {
    width: 100%;
    text-align: center;
  }

  .flight-coach-strip {
    grid-template-columns: 1fr;
    padding: 16px;
    margin: 10px 0 14px;
  }

  .coach-tips {
    grid-template-columns: 1fr;
  }

  .map-mode-banner.is-visible {
    flex-direction: column;
    align-items: flex-start;
    margin: 8px -16px 0;
  }

  .map-placeholder {
    min-height: 260px;
  }

  .map-mode-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .map-placeholder-body {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .flight-danger-zone {
    margin-top: 32px;
    padding-top: 20px;
  }

  .btn-delete {
    width: 100%;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .flight-hero {
    padding: 12px 12px 0;
  }

  .flight-hero-title h1 {
    font-size: 18px;
  }

  .flight-hero-meta {
    font-size: 12px;
  }

  .flight-key-stats {
    gap: 8px;
    padding: 12px 0;
  }

  .key-stat {
    gap: 6px;
  }

  .key-stat-icon {
    font-size: 18px;
  }

  .key-stat-value {
    font-size: 14px;
  }

  .key-stat-label {
    font-size: 9px;
  }

  .flight-map-container {
    margin: 0 -12px;
  }

  .replay-controls {
    margin-left: -12px;
    margin-right: -12px;
    padding: 0 12px 12px;
  }

  #flight-map {
    height: 220px;
  }

  .flight-sections {
    padding: 0 12px 20px;
  }

  .flight-scroll-nav {
    padding: 0 12px;
  }

  .info-card {
    padding: 14px;
  }

  .weather-snapshot {
    grid-template-columns: 1fr;
  }

  .flight-coach-strip {
    padding: 14px;
  }

  .map-mode-banner.is-visible {
    margin: 8px -12px 0;
  }

  .map-placeholder {
    min-height: 220px;
  }

  .map-placeholder-body {
    padding: 14px;
  }

  .scroll-nav-link {
    padding: 10px 12px;
    font-size: 12px;
  }
}

/* ── Responsive: premium buttons ── */
@media (max-width: 480px) {
  .premium-tease-overlay {
    padding: 24px 16px;
    min-height: 200px;
  }

  .premium-auth-btns {
    flex-direction: column;
    width: 100%;
    max-width: none;
    align-items: stretch;
  }

  .btn-premium-upgrade,
  .btn-premium-signin {
    padding: 12px 20px;
    width: 100%;
    justify-content: center;
  }

  .analysis-locked-preview {
    padding: 32px 16px;
  }

  .analysis-locked-features {
    gap: 8px;
  }

  .analysis-locked-feature {
    font-size: 12px;
    padding: 6px 10px;
  }

  .flight-insights-section {
    padding: 1.25rem;
  }

  .insights-grid-secondary {
    grid-template-columns: 1fr;
  }

  .insights-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .insight-card {
    padding: 1rem;
  }

  .insight-extras {
    grid-template-columns: 1fr;
  }

  .premium-tease-features {
    gap: 8px;
  }

  .premium-tease-feature {
    font-size: 12px;
    padding: 5px 10px;
  }

  .premium-tease-overlay--card {
    padding: 32px 20px;
  }
}
