/* battlecard.css — /battlecard/:brief_id view */

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

:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface-2: #1a1a24;
  --border: #222230;
  --border-2: #2a2a3a;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --text-dim: #52525b;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --green: #22c55e;
  --green-bg: #052e16;
  --red: #f43f5e;
  --red-bg: #2d0a14;
  --yellow: #eab308;
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'Space Grotesk', system-ui, sans-serif;
}

html { font-family: var(--font); background: var(--bg); color: var(--text); }

.bcard-body {
  min-height: 100vh;
  background: var(--bg);
  font-family: var(--font);
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.bcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.bcard-logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.bcard-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.bcard-nav a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.bcard-nav a:hover { color: var(--text); }

.bcard-nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: background 0.15s !important;
}

.bcard-nav-cta:hover { background: var(--accent-hover) !important; }

/* ── Top band ────────────────────────────────────────────────────────────────── */
.bcard-topband {
  background: linear-gradient(135deg, #111118 0%, #16162a 100%);
  border-bottom: 1px solid var(--border);
  padding: 32px 24px;
}

.bcard-topband-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.bcard-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.bcard-title {
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  line-height: 1.2;
  margin-bottom: 8px;
}

.bcard-title-us { color: var(--text); }
.bcard-vs { font-size: 16px; color: var(--text-dim); font-weight: 400; }
.bcard-title-them { color: var(--accent); }

.bcard-last-updated {
  font-size: 12px;
  color: var(--text-dim);
}

.bcard-topband-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.bcard-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: var(--font);
  text-decoration: none;
}

.bcard-action-btn:hover { color: var(--text); border-color: var(--border-2); }

.bcard-action-btn--pro {
  color: var(--accent);
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.08);
}

.bcard-action-btn--pro:hover { background: rgba(99, 102, 241, 0.15); }

.bcard-action-btn--locked {
  color: var(--text-dim);
  opacity: 0.7;
}

/* ── Main content ─────────────────────────────────────────────────────────── */
.bcard-main {
  min-height: calc(100vh - 200px);
}

.bcard-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.bcard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.bcard-card--verdict {
  background: linear-gradient(135deg, #111118 0%, #16162a 100%);
  border-color: rgba(99, 102, 241, 0.25);
}

.bcard-card--pitch {
  background: linear-gradient(135deg, #111118 0%, #14141f 100%);
  border-color: var(--border-2);
}

.bcard-card-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.bcard-label--green { color: var(--green); }
.bcard-label--red { color: var(--red); }

/* Quick verdict */
.bcard-verdict-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  font-weight: 500;
}

/* Two-col layout */
.bcard-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .bcard-two-col { grid-template-columns: 1fr; }
  .bcard-title { font-size: 22px; }
  .bcard-topband-inner { flex-direction: column; gap: 16px; }
}

/* Win / Loss signals */
.bcard-card--win { border-color: rgba(34, 197, 94, 0.2); }
.bcard-card--loss { border-color: rgba(244, 63, 94, 0.2); }

.bcard-signal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bcard-signal-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.bcard-signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.bcard-signal-dot--green { background: var(--green); }
.bcard-signal-dot--red { background: var(--red); }

/* Landmines */
.bcard-landmine-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bcard-landmine-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.bcard-landmine-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.bcard-landmine-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bcard-landmine-objection {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  font-style: italic;
}

.bcard-landmine-response {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

/* Proof points */
.bcard-proof-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bcard-proof-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.bcard-proof-check {
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

/* Elevator pitch */
.bcard-pitch-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 16px;
  font-style: italic;
}

.bcard-copy-pitch-btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
}

.bcard-copy-pitch-btn:hover { background: rgba(99, 102, 241, 0.18); }

/* Brief link */
.bcard-brief-link-row {
  text-align: center;
  padding: 8px 0;
}

.bcard-brief-link {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.bcard-brief-link:hover { color: var(--accent); }

/* ── Watermark footer ────────────────────────────────────────────────────── */
.bcard-watermark-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 24px;
}

.bcard-watermark-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.bcard-watermark-logo {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.bcard-watermark-text {
  font-size: 12px;
  color: var(--text-dim);
  flex: 1;
}

.bcard-watermark-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.bcard-watermark-cta:hover { color: var(--accent-hover); }

/* ── Error / not found ───────────────────────────────────────────────────── */
.bcard-error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 40px 24px;
}

.bcard-error-inner {
  text-align: center;
  max-width: 420px;
}

.bcard-error-icon { font-size: 40px; margin-bottom: 20px; }
.bcard-error-inner h1 { font-size: 22px; margin-bottom: 10px; }
.bcard-error-inner p { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }

.bcard-cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.bcard-cta-btn:hover { background: var(--accent-hover); }

/* ── Upgrade modal ───────────────────────────────────────────────────────── */
.bcard-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.bcard-modal {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
}

.bcard-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.bcard-modal-icon { font-size: 36px; margin-bottom: 16px; }
.bcard-modal-title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.bcard-modal-sub { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }

.bcard-modal-cta {
  display: block;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 12px;
  transition: background 0.15s;
}

.bcard-modal-cta:hover { background: var(--accent-hover); }
.bcard-modal-note { font-size: 11px; color: var(--text-dim); }

/* ── Powered-by badge (top-right floating) ───────────────────────────────── */
.bcard-powered-badge {
  position: fixed;
  top: 14px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(17, 17, 24, 0.9);
  border: 1px solid #27272a;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #a1a1aa;
  text-decoration: none;
  z-index: 99;
  backdrop-filter: blur(8px);
  transition: color 0.15s, border-color 0.15s;
}
.bcard-powered-badge:hover { color: #e4e4e7; border-color: #52525b; }
.bcard-powered-badge .logo-dot { width: 6px; height: 6px; flex-shrink: 0; }

/* ── Share action buttons — social variants ──────────────────────────────── */
.bcard-action-btn--social {
  text-decoration: none;
}

/* ── Email share modal — input + textarea ────────────────────────────────── */
.bcard-modal-input {
  width: 100%;
  background: #1a1a2e;
  border: 1px solid #27272a;
  border-radius: 8px;
  color: #e4e4e7;
  font-size: 14px;
  padding: 10px 14px;
  margin-bottom: 10px;
  outline: none;
  font-family: inherit;
}
.bcard-modal-input:focus { border-color: #6366f1; }
.bcard-modal-textarea {
  width: 100%;
  background: #1a1a2e;
  border: 1px solid #27272a;
  border-radius: 8px;
  color: #e4e4e7;
  font-size: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  outline: none;
  font-family: inherit;
  resize: vertical;
  min-height: 72px;
}
.bcard-modal-textarea:focus { border-color: #6366f1; }

/* ── Indexable toggle row ────────────────────────────────────────────────── */
.bcard-indexable-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid #18181b;
  margin-top: 8px;
}
.bcard-indexable-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #d4d4d8;
  cursor: pointer;
}
.bcard-indexable-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #6366f1;
  cursor: pointer;
}
.bcard-indexable-hint {
  font-size: 11px;
  color: #52525b;
}

/* ── Print styles (PDF via browser print) ────────────────────────────────── */
@media print {
  .bcard-header, .bcard-topband-actions, .bcard-watermark-footer,
  .bcard-brief-link-row, .bcard-copy-pitch-btn, #pdf-upgrade-modal,
  .bcard-powered-badge, .bcard-indexable-row { display: none !important; }
  .bcard-body { background: #fff; color: #000; }
  .bcard-topband { background: #f8f8f8; border-bottom: 1px solid #e0e0e0; }
  .bcard-card { background: #fff; border: 1px solid #e0e0e0; break-inside: avoid; }
  .bcard-title, .bcard-verdict-text, .bcard-pitch-text { color: #000; }
  .bcard-card-label, .bcard-text-muted { color: #444; }
  .bcard-signal-list li, .bcard-proof-list li, .bcard-landmine-response { color: #111; }
  .bcard-landmine-objection { color: #555; }
}
