/* ═══════════════════════════════════════════════════════════════════════════
   Settlement of the Week — Archive Page Styles  (single source of truth)
   Task #830779 — Full layout/positioning fix
   Task #831272 — Contrast, readability, !important hardening vs global CSS
   ═══════════════════════════════════════════════════════════════════════════
   WHY !important is used here:
   styles.min.css defines dark-theme .sotw-card styles with !important.
   color-authority.css (in combined.min.css) forces .sotw-archive-hero
   { color: #111827 !important }.  This file loads AFTER both in the DOM
   (layout-head.ejs line 259), so same-specificity !important rules here win.
   Higher-specificity selectors (.sotw-card-featured .X) beat the 1-class
   selectors in styles.min.css without needing !important, but we add it
   anyway as a defense against async load-order variance.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Hero Section ─────────────────────────────────────────────────────── */
.sotw-archive-hero {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 50%, #fefce8 100%) !important;
  padding: 4rem 1.5rem 3rem !important;
  text-align: center !important;
  border-bottom: 1px solid #e5e7eb !important;
  color: #111827 !important;
}
/* Kill any ::before decorative overlays from inline or global styles */
.sotw-archive-hero::before,
.sotw-archive-hero::after {
  display: none !important;
}
.sotw-archive-hero-inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}
.sotw-archive-eyebrow {
  display: inline-block !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #16a34a !important;
  background: rgba(34, 197, 94, 0.1) !important;
  border: 1px solid rgba(34, 197, 94, 0.2) !important;
  padding: 0.35rem 0.9rem !important;
  border-radius: 20px !important;
  margin-bottom: 1.25rem !important;
}
.sotw-archive-h1 {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 2.5rem !important;
  font-weight: 800 !important;
  color: #111827 !important;
  line-height: 1.15 !important;
  margin: 0 0 1rem !important;
}
.sotw-archive-sub {
  font-size: 1.05rem !important;
  color: #4b5563 !important;
  line-height: 1.65 !important;
  margin: 0 0 1.75rem !important;
  max-width: 560px;
  margin-left: auto !important;
  margin-right: auto !important;
}
.sotw-archive-browse-btn {
  display: inline-block !important;
  padding: 0.75rem 1.5rem !important;
  background: #22c55e !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  border-radius: 10px !important;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s;
}
.sotw-archive-browse-btn:hover {
  background: #16a34a !important;
  transform: translateY(-1px);
  color: #ffffff !important;
}

/* ─── This Week's Pick Section ─────────────────────────────────────────── */
.sotw-archive-current {
  padding: 3rem 1.5rem !important;
  background: #ffffff !important;
}
.sotw-archive-current-inner {
  max-width: 900px;
  margin: 0 auto;
}
.sotw-archive-current-label {
  display: inline-block !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #854d0e !important;
  background: rgba(252, 210, 20, 0.15) !important;
  border: 1px solid rgba(252, 210, 20, 0.3) !important;
  padding: 0.35rem 0.9rem !important;
  border-radius: 20px !important;
  margin-bottom: 1.25rem !important;
}

/* ─── Featured Card — light mode overrides ─────────────────────────────── */
/* The base .sotw-card in styles.min.css uses dark-theme glass/gold styling
   with !important.  We override to clean white with green accent. */
.sotw-card-featured {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
  border-radius: 16px !important;
  padding: 2rem !important;
}
.sotw-card-featured:hover {
  border-color: rgba(34, 197, 94, 0.35) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(34, 197, 94, 0.1) !important;
}

/* Featured card — text colors (all !important to beat var(--white), var(--gold) etc.) */
.sotw-card-featured .sotw-title {
  color: #111827 !important;
}
.sotw-card-featured .sotw-company {
  color: #4b5563 !important;
}
.sotw-card-featured .sotw-summary {
  color: #6b7280 !important;
}

/* Featured card — badge overrides (base uses var(--green-light) = #86efac → low contrast on white) */
.sotw-card-featured .sotw-category-badge {
  color: #15803d !important;
  background: rgba(34, 197, 94, 0.08) !important;
  border-color: rgba(34, 197, 94, 0.25) !important;
}
.sotw-card-featured .sotw-no-proof-badge {
  color: #166534 !important;
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}
.sotw-card-featured .sotw-urgent-badge {
  color: #92400e !important;
  background: #fef3c7 !important;
  border-color: #fcd34d !important;
}

/* Featured card — payout block */
.sotw-card-featured .sotw-payout-block {
  background: rgba(34, 197, 94, 0.06) !important;
  border-color: rgba(34, 197, 94, 0.15) !important;
}
.sotw-card-featured .sotw-payout-label {
  color: #16a34a !important;
}
.sotw-card-featured .sotw-payout-amount {
  color: #15803d !important;
}

/* Featured card — deadline */
.sotw-card-featured .sotw-deadline {
  color: #4b5563 !important;
}
.sotw-card-featured .sotw-deadline strong {
  color: #111827 !important;
}

/* Featured card — CTA button (base uses gold gradient → white-on-yellow = unreadable) */
.sotw-card-featured .sotw-cta-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25) !important;
}
.sotw-card-featured .sotw-cta-btn:hover {
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35) !important;
  color: #ffffff !important;
}

/* ─── Past Picks Archive Grid ──────────────────────────────────────────── */
.sotw-archive-list {
  padding: 3rem 1.5rem 4rem !important;
  background: #f9fafb !important;
}
.sotw-archive-list-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.sotw-archive-list-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  color: #111827 !important;
  margin: 0 0 2rem !important;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sotw-count-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280 !important;
  background: #e5e7eb !important;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
}

/* Grid layout: 3 columns desktop, 2 tablet, 1 mobile */
.sotw-archive-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.25rem !important;
}

/* Individual past-pick card */
.sotw-archive-card {
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  padding: 1.35rem !important;
  text-decoration: none !important;
  color: #111827 !important;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.sotw-archive-card:hover {
  border-color: rgba(34, 197, 94, 0.35) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06) !important;
  transform: translateY(-2px);
  color: #111827 !important;
}
.sotw-archive-card:visited {
  color: #111827 !important;
}
.sotw-archive-card-expired {
  opacity: 0.6;
}
.sotw-archive-card-expired:hover {
  opacity: 0.8;
}

/* Week label + expired tag */
.sotw-archive-card-week {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #6b7280 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sotw-expired-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #dc2626 !important;
  background: #fee2e2 !important;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Card content */
.sotw-archive-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  line-height: 1.35;
  margin: 0 0 0.35rem;
}
.sotw-archive-card-company {
  font-size: 0.85rem !important;
  color: #6b7280 !important;
  margin: 0 0 0.75rem;
  font-weight: 500;
}

/* Meta row: payout + no proof + deadline */
.sotw-archive-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}
.sotw-archive-payout {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #15803d !important;
  background: rgba(34, 197, 94, 0.1) !important;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}
.sotw-archive-no-proof {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #16a34a !important;
  background: rgba(74, 222, 128, 0.12) !important;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}
.sotw-archive-deadline {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4b5563 !important;
  background: #f3f4f6 !important;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}
.sotw-archive-deadline.urgent {
  color: #dc2626 !important;
  background: #fee2e2 !important;
  font-weight: 700;
}

/* Empty state */
.sotw-archive-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280 !important;
  font-size: 1rem;
}
.sotw-archive-empty p {
  margin: 0 0 1.5rem;
}

/* ─── Newsletter CTA ───────────────────────────────────────────────────── */
.sotw-newsletter-cta {
  display: flex !important;
  align-items: center !important;
  gap: 1.5rem !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  padding: 1.75rem 2rem !important;
  margin-top: 3rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}
.sotw-newsletter-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.sotw-newsletter-text {
  flex: 1;
  min-width: 0;
}
.sotw-newsletter-text strong {
  display: block;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin-bottom: 0.25rem;
}
.sotw-newsletter-text span {
  font-size: 0.88rem !important;
  color: #6b7280 !important;
  line-height: 1.5;
}
.sotw-newsletter-form {
  display: flex !important;
  gap: 0.5rem;
  flex-shrink: 0;
}
.sotw-newsletter-input {
  padding: 0.65rem 1rem !important;
  border: 1px solid #d1d5db !important;
  border-radius: 10px !important;
  font-size: 0.9rem !important;
  color: #111827 !important;
  background: #ffffff !important;
  outline: none;
  width: 220px;
  transition: border-color 0.2s;
}
.sotw-newsletter-input:focus {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
}
.sotw-newsletter-input::placeholder {
  color: #9ca3af !important;
}
.sotw-newsletter-btn {
  padding: 0.65rem 1.15rem !important;
  background: #22c55e !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.sotw-newsletter-btn:hover {
  background: #16a34a !important;
  color: #ffffff !important;
}
.sotw-newsletter-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.sotw-newsletter-success {
  font-size: 0.9rem;
  color: #16a34a !important;
  font-weight: 600;
  padding: 0.5rem 0;
}

/* ─── Responsive — Tablet (≤ 900px) ────────────────────────────────────── */
@media (max-width: 900px) {
  .sotw-archive-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .sotw-newsletter-cta {
    flex-direction: column !important;
    text-align: center !important;
    gap: 1rem !important;
    padding: 1.5rem !important;
  }
  .sotw-newsletter-form {
    width: 100% !important;
    flex-direction: column !important;
  }
  .sotw-newsletter-input {
    width: 100% !important;
  }
}

/* ─── Responsive — Mobile (≤ 640px) ────────────────────────────────────── */
@media (max-width: 640px) {
  .sotw-archive-hero {
    padding: 3rem 1.25rem 2.25rem !important;
  }
  .sotw-archive-h1 {
    font-size: 1.75rem !important;
  }
  .sotw-archive-sub {
    font-size: 0.95rem !important;
  }
  .sotw-archive-grid {
    grid-template-columns: 1fr !important;
  }
  .sotw-archive-current {
    padding: 2rem 1.25rem !important;
  }
  .sotw-archive-list {
    padding: 2rem 1.25rem 3rem !important;
  }
  .sotw-archive-list-title {
    font-size: 1.3rem !important;
  }
  .sotw-newsletter-cta {
    padding: 1.25rem !important;
  }
  .sotw-newsletter-text strong {
    font-size: 0.92rem !important;
  }
  .sotw-newsletter-text span {
    font-size: 0.82rem !important;
  }
  /* Featured card single-column on mobile */
  .sotw-card-featured {
    padding: 1.5rem !important;
  }
}

/* ─── Responsive — Small Mobile (≤ 375px) ──────────────────────────────── */
@media (max-width: 375px) {
  .sotw-archive-hero {
    padding: 2.5rem 1rem 2rem !important;
  }
  .sotw-archive-h1 {
    font-size: 1.5rem !important;
  }
  .sotw-archive-sub {
    font-size: 0.88rem !important;
  }
  .sotw-archive-card {
    padding: 1.1rem !important;
  }
  .sotw-archive-card-title {
    font-size: 0.92rem !important;
  }
}
