/* ============================================
   ForkStack Answers — Light Theme
   ============================================ */

/* ===== SITE HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.header-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.header-brand:hover { color: var(--accent); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.85rem;
  color: var(--fg-dim);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--fg);
  background: var(--bg-raised);
}

.nav-rss { font-size: 0.75rem; font-family: var(--font-mono); }

/* Search bar */
.header-search {
  position: relative;
  margin-left: auto;
}

.header-search input {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 14px;
  width: 220px;
  outline: none;
  transition: border-color 0.15s, width 0.2s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}

.header-search input::placeholder { color: var(--fg-dim); }

.header-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  width: 280px;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 360px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 200;
}

.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.search-result-item:hover { background: var(--bg-raised); }
.search-result-item:last-child { border-bottom: none; }

.sr-question {
  color: var(--fg);
  font-size: 0.88rem;
  line-height: 1.4;
}

.sr-cat {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 100px;
}

.search-empty {
  padding: 16px;
  color: var(--fg-dim);
  font-size: 0.85rem;
  text-align: center;
}

/* ===== ANSWERS HERO ===== */
.answers-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}

.answers-meta {
  margin-top: 20px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--fg-dim);
}

/* ===== ANSWERS LAYOUT ===== */
.answers-content {
  padding: 48px 0 80px;
}

.answers-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}

/* Sidebar */
.answers-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  margin-bottom: 16px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--fg-dim);
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.category-item:hover { background: var(--bg-raised); color: var(--fg); }

.category-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.cat-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
}

/* Answer cards */
.answers-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.answer-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-card:first-child { padding-top: 0; }

.answer-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.answer-category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 10px;
  border-radius: 100px;
  text-decoration: none;
}

.answer-date {
  font-size: 0.8rem;
  color: var(--fg-dim);
  font-family: var(--font-mono);
}

.answer-title {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.answer-title a {
  color: var(--fg);
  text-decoration: none;
  transition: color 0.15s;
}

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

.answer-summary {
  color: var(--fg-dim);
  font-size: 0.93rem;
  line-height: 1.6;
}

.answer-read-more {
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
  align-self: flex-start;
}

.answer-read-more:hover { text-decoration: underline; }

/* Empty state */
.empty-state {
  padding: 60px 0;
  color: var(--fg-dim);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 32px 0 0;
}

.pagination-btn {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  transition: border-color 0.15s;
}

.pagination-btn:hover { border-color: var(--accent); color: var(--accent); }

.pagination-info {
  color: var(--fg-dim);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

/* ===== ANSWER DETAIL PAGE ===== */
.answer-page { padding-bottom: 80px; }

.answer-page-inner {
  max-width: 780px;
  padding-top: 40px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--fg-dim);
  margin-bottom: 32px;
}

.breadcrumb a { color: var(--fg-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb-sep { color: var(--fg-dim); opacity: 0.5; }

/* Answer header */
.answer-header {
  margin-bottom: 40px;
}

.answer-header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 12px 0 16px;
}

.answer-lead {
  font-size: 1.05rem;
  color: var(--fg-dim);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Answer body */
.answer-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

/* Prose: rich answer content */
.prose h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 32px 0 16px;
  color: var(--fg);
}

.prose h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--fg);
}

.prose p {
  color: var(--fg-dim);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.prose ul, .prose ol {
  margin: 0 0 20px 0;
  padding-left: 24px;
}

.prose li {
  color: var(--fg-dim);
  font-size: 0.97rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.prose strong { color: var(--fg); font-weight: 600; }

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-dim);
}

.prose a:hover { text-decoration-color: var(--accent); }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.prose table th {
  text-align: left;
  padding: 10px 16px;
  background: var(--bg-raised);
  color: var(--fg-dim);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}

.prose table td {
  padding: 12px 16px;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--border);
}

.prose table tr:last-child td { border-bottom: none; }
.prose table tr:hover td { background: var(--bg-raised); }

/* Payment section */
.payment-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.paywall-inner {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Verifying spinner state */
.paywall-verifying {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--fg-dim);
  font-size: 0.9rem;
  padding: 8px 0;
}

.paywall-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* CTA content */
.paywall-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 10px;
}

#paywall-cta h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

#paywall-cta p {
  color: var(--fg-dim);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 0;
}

.paywall-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 20px 0 18px;
}

.price-sats {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
}

.price-usd {
  color: var(--fg-dim);
  font-size: 0.88rem;
  font-family: var(--font-mono);
}

.btn-pay {
  background: #111111;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.6;
}

.pay-tab {
  background: var(--bg-raised);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--fg-dim);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pay-tab:hover { color: var(--fg); background: rgba(255,255,255,0.06); }

.pay-tab.active {
  background: var(--accent-dim);
  border-color: rgba(34, 214, 138, 0.3);
  color: var(--accent);
}

/* Payment panel */
.pay-panel { margin-bottom: 0; }

.pay-panel-desc {
  color: var(--fg-dim);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

/* Address / invoice box */
.pay-address-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
  word-break: break-all;
}

.pay-address-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.pay-address-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--fg);
  line-height: 1.5;
}

.pay-address-text { color: var(--fg-dim); font-size: 0.82rem; }

.pay-placeholder { color: var(--fg-dim); font-style: italic; font-size: 0.85rem; }

.pay-copy-btn {
  margin-top: 8px;
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--fg-dim);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 4px 10px;
  transition: color 0.15s, border-color 0.15s;
}

.pay-copy-btn:hover { color: var(--accent); border-color: rgba(34,214,138,0.3); }

/* Primary action button */
.btn-pay-action {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #0a0a0f;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 24px;
  transition: opacity 0.15s, transform 0.1s;
  width: 100%;
  margin-bottom: 10px;
}

.btn-pay-action:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-pay-action:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.pay-note {
  font-size: 0.78rem;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  margin-top: 4px;
  min-height: 1.2em;
}

/* Unavailable message */
.pay-unavailable-msg {
  background: rgba(255, 180, 0, 0.08);
  border: 1px solid rgba(255, 180, 0, 0.2);
  border-radius: 8px;
  color: #fbbf24;
  font-size: 0.85rem;
  line-height: 1.55;
  margin-top: 12px;
  padding: 12px 16px;
}

/* Guarantee line */
.paywall-guarantee {
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  margin-top: 20px;
  text-align: center;
}

/* Answer footer */
.answer-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

/* Shared button */
.btn-outline {
  display: inline-block;
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  transition: color 0.15s, border-color 0.15s;
}

.btn-outline:hover {
  color: var(--fg);
  border-color: var(--fg);
}

/* Footer extra links */
.footer-rss, .footer-sitemap {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.8rem;
}

.footer-rss:hover, .footer-sitemap:hover { color: var(--fg); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .answers-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .answers-sidebar {
    position: static;
    overflow-x: auto;
  }
  .category-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .header-search input { width: 160px; }
  .header-search input:focus { width: 200px; }
  .search-dropdown { width: 280px; right: 0; }
  .answer-page-inner { padding: 24px 0; }
}

@media (max-width: 480px) {
  .header-inner { gap: 12px; }
  .header-search input { width: 120px; }
  .search-dropdown { width: 240px; }
  .answer-header h1 { font-size: 1.4rem; }
  .pagination { flex-direction: column; align-items: flex-start; }
}