/* report.css
 *
 * Styling for the rendered report. Pairs with index.css (which has the
 * site-wide quiz styles). The ai-card layout is borrowed from
 * APMI-AI-PROFILES-VISUAL-v2.html so the match introductions match that
 * doc's look. The candor profile is rendered as 3 horizontal bars
 * (replacing the radial radar in the original profile visual).
 */

/* ------------------------------------------------------------------
 * Variables (reuse index.css palette where it exists)
 * ------------------------------------------------------------------ */

.report {
  --report-ink: #2d2418;
  --report-ink-2: #3a3328;
  --report-muted: #5e5440;
  --report-faint: #9c8a6a;
  --report-cream: #faf7f0;
  --report-cream-2: #fffbef;
  --report-border: #e8e1cf;
  --report-border-strong: #d6cdb5;
  --report-accent: #7a8c5c;
  --report-accent-soft: rgba(122, 140, 92, 0.12);
  --report-warning: #c89a3a;
}

/* ------------------------------------------------------------------
 * Site banner (static variant for reports + AI profiles page)
 *
 * Image + logo overlay, the entire banner is wrapped in an <a> that
 * links to the home page. No fade-in (reports are persistent artifacts).
 * No clickable AI cells (this is a navigation header, not a panel
 * explorer). The main page uses the richer banner-overlay.html instead.
 * ------------------------------------------------------------------ */

.site-banner {
  position: relative;
  width: 100%;
  background: #0d0b08;
  margin: 0;
}
.site-banner-link {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.site-banner-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.site-banner-logo-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(13, 11, 8, 0.50) 0%, transparent 100%);
  pointer-events: none;
}
.site-banner-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #c8a86a;
  text-shadow: 0 2px 32px rgba(0, 0, 0, 0.95), 0 1px 8px rgba(0, 0, 0, 0.98);
  white-space: nowrap;
}
.site-banner-logo span { color: #f5d080; }

/* Hide banner on print/PDF to keep the saved artifact clean. */
@media print {
  .site-banner { display: none; }
}

/* ------------------------------------------------------------------
 * Report shell
 * ------------------------------------------------------------------ */

.report {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--report-ink-2);
  line-height: 1.6;
  background: var(--report-cream);
}

.report-title,
.report h1,
.report h2,
.report h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--report-ink);
  line-height: 1.2;
}

.report h1 { font-size: 38px; margin: 16px 0 8px; }
.report h2 { font-size: 28px; margin: 36px 0 12px; padding-top: 8px; border-top: 1px solid var(--report-border); }
.report h3 { font-size: 21px; margin: 20px 0 6px; }
.report h4 { font-size: 16px; margin: 14px 0 4px; color: var(--report-muted); }
.report p { margin: 10px 0; }

/* ------------------------------------------------------------------
 * Cover
 * ------------------------------------------------------------------ */

.report-cover {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--report-border);
  margin-bottom: 24px;
}
.report-title {
  font-size: 42px;
  text-align: center;
}
.report-apmi {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--report-muted);
}
.report-apmi strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--report-ink);
}
.cover-dim-scales {
  list-style: none;
  padding: 0;
  margin: 12px 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
}
.cover-dim-scales li {
  font-size: 14px;
  color: var(--report-muted);
}
.cover-matches {
  margin: 18px 0;
  text-align: left;
  display: inline-block;
}
.cover-match {
  margin: 4px 0;
  font-size: 15px;
  color: var(--report-ink-2);
}
.cover-match-label {
  color: var(--report-faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-block;
  min-width: 200px;
}
.cover-match-style {
  color: var(--report-faint);
  font-style: italic;
  font-size: 13px;
}
.cover-tagline {
  font-size: 14px;
  color: var(--report-muted);
  font-style: italic;
  margin: 18px auto 8px;
  max-width: 600px;
}
.cover-meta {
  font-size: 12px;
  color: var(--report-faint);
  margin-top: 12px;
}

/* ------------------------------------------------------------------
 * Section shells
 * ------------------------------------------------------------------ */

.report-section {
  margin: 36px 0;
}
.section-lede {
  font-size: 14px;
  color: var(--report-muted);
  font-style: italic;
  margin-bottom: 18px;
}

/* APMI breakdown */
.apmi-letter {
  margin: 18px 0;
  padding: 12px 16px 12px 18px;
  border-left: 3px solid var(--report-accent-soft);
  background: var(--report-cream-2);
  border-radius: 0 4px 4px 0;
}
.apmi-letter h3 { margin: 0 0 6px; font-size: 18px; }
.apmi-letter p { font-size: 14.5px; color: var(--report-muted); margin: 0; }

/* ------------------------------------------------------------------
 * Figure 11.6 (full 16-types grid)
 * ------------------------------------------------------------------ */

.figure-11-6 {
  margin: 18px 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--report-border);
  border-radius: 8px;
}
.figure-caption {
  font-size: 13px;
  color: var(--report-muted);
  margin-bottom: 12px;
}
.apmi-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  color: var(--report-ink-2);
}
.apmi-grid-table th,
.apmi-grid-table td {
  border: 1px solid var(--report-border);
  padding: 8px 6px;
  vertical-align: top;
  text-align: center;
}
.apmi-grid-table th {
  background: var(--report-cream);
  font-weight: 600;
}
.apmi-grid-table .apmi-cell {
  background: #fff;
  line-height: 1.35;
}
.apmi-grid-table .apmi-cell.active {
  background: var(--report-accent);
  color: #fff;
  font-weight: 600;
}
.apmi-grid-table .apmi-cell.active .dim-label { color: rgba(255, 255, 255, 0.85); }
.apmi-grid-table .dim-label {
  font-size: 10px;
  color: var(--report-faint);
  font-style: italic;
}
.figure-footer {
  font-size: 11px;
  color: var(--report-faint);
  font-style: italic;
  margin-top: 8px;
}

/* ------------------------------------------------------------------
 * AI Card (the prettified match section, adapted from
 * APMI-AI-PROFILES-VISUAL-v2.html)
 * ------------------------------------------------------------------ */

.ai-card {
  background: #fff;
  border: 1px solid var(--report-border);
  border-radius: 8px;
  padding: 24px;
  margin: 18px 0 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: grid;
  grid-template-columns: 120px 1fr 220px;
  gap: 24px;
  align-items: start;
}
.ai-photo-wrap { display: flex; justify-content: center; }
.ai-photo {
  width: 120px; height: 120px;
  border-radius: 8px;
  object-fit: cover;
  background: #f0e8d4;
}
.ai-main h3.ai-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--report-ink);
  font-style: italic;
  margin: 0 0 8px;
  border: none; padding: 0;
}
.ai-meta {
  font-size: 12px;
  color: var(--report-faint);
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}
.ai-codes {
  font-size: 13px;
  color: var(--report-muted);
  background: var(--report-cream-2);
  padding: 8px 12px;
  border-radius: 4px;
  display: inline-block;
  margin: 4px 0 10px;
}
.ai-codes strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  color: var(--report-ink);
  letter-spacing: 0.08em;
}
.ai-codes .complement {
  font-size: 12px;
  color: var(--report-faint);
  margin-left: 12px;
}
.ai-style { font-size: 12.5px; color: var(--report-muted); margin: 0 0 8px; }
.ai-desc { font-size: 13.5px; color: var(--report-ink-2); line-height: 1.6; margin: 0; }

.ai-visuals {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}
.visual-block { text-align: left; }
.visual-label {
  font-size: 10px;
  color: var(--report-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

/* ------------------------------------------------------------------
 * Mini grid (inside each ai-card)
 * ------------------------------------------------------------------ */

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--report-border);
  padding: 2px;
  border-radius: 3px;
  width: 100%;
  max-width: 180px;
}
.mini-grid-cell {
  background: var(--report-cream);
  font-size: 9px;
  color: var(--report-faint);
  font-weight: 600;
  padding: 4px 2px;
  text-align: center;
  font-family: Georgia, serif;
}
.mini-grid-cell.active {
  background: var(--report-accent);
  color: #fff;
}
.position-gloss {
  font-size: 11px;
  color: var(--report-faint);
  font-style: italic;
  margin: 6px 0 0;
}

/* ------------------------------------------------------------------
 * Candor bars (replaces the radial radar)
 * ------------------------------------------------------------------ */

.candor-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.candor-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}
.candor-label {
  font-size: 11px;
  color: var(--report-muted);
  font-weight: 600;
}
.candor-bar {
  background: var(--report-border);
  border-radius: 2px;
  height: 10px;
  overflow: hidden;
  position: relative;
}
.candor-fill {
  background: var(--report-accent);
  height: 100%;
  border-radius: 2px;
}
.candor-score {
  font-size: 10px;
  color: var(--report-faint);
  text-align: right;
  font-family: Georgia, serif;
}

/* ------------------------------------------------------------------
 * Match section extras (rationale, caveat)
 * ------------------------------------------------------------------ */

.match-rationale,
.match-working-with {
  margin-top: 16px;
}
.match-caveat {
  background: var(--report-cream-2);
  border-left: 3px solid var(--report-warning);
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: var(--report-muted);
  font-style: italic;
  margin-top: 16px;
}

/* ------------------------------------------------------------------
 * Playbook & 7-day plan entries
 * ------------------------------------------------------------------ */

.playbook-entry,
.day-entry,
.advanced-entry,
.library-cell {
  margin: 18px 0;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--report-border);
  border-radius: 6px;
}
.playbook-entry h3,
.day-entry h3,
.advanced-entry h3 {
  margin-top: 0;
}
.library-cell h4 {
  margin: 0 0 6px;
  color: var(--report-ink-2);
  font-family: 'Cormorant Garamond', serif;
}
.library-cell ol { margin: 0 0 0 20px; padding: 0; }
.library-cell li { margin: 6px 0; font-size: 13.5px; }
.prompt-tag {
  display: inline-block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 8px;
  margin-right: 6px;
  background: var(--report-cream-2);
  color: var(--report-muted);
  font-family: Georgia, serif;
}
.prompt-tag.tag-easy-mode { background: var(--report-accent-soft); color: var(--report-accent); }
.prompt-tag.tag-advanced { background: rgba(200, 154, 58, 0.15); color: var(--report-warning); }

.prefix-block {
  background: var(--report-cream-2);
  border-left: 3px solid var(--report-accent);
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
  font-size: 13.5px;
  font-style: italic;
  color: var(--report-ink-2);
  margin: 6px 0;
}

/* ------------------------------------------------------------------
 * CTA lead (type-keyed preamble before upgrade buttons)
 * ------------------------------------------------------------------ */

.cta-lead {
  font-size: 15px;
  font-style: italic;
  color: var(--report-muted);
  margin: 14px 0 8px;
  line-height: 1.55;
}

/* ------------------------------------------------------------------
 * Match guardrails callout (pref/AI tone conflict)
 * ------------------------------------------------------------------ */

.match-guardrails {
  margin: 16px 0;
  padding: 14px 18px;
  background: var(--report-cream);
  border-left: 3px solid var(--report-accent);
  border-radius: 0 4px 4px 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--report-ink-2);
}
.match-guardrails strong { color: var(--report-ink); }

/* ------------------------------------------------------------------
 * AI warning label
 * ------------------------------------------------------------------ */

.section-warning-label { margin: 30px 0; }
.warning-label-card {
  padding: 22px 26px;
  background: var(--report-cream-2);
  border-left: 4px solid var(--report-warning);
  border-radius: 4px;
  position: relative;
}
.warning-label-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--report-warning);
  font-weight: 700;
  margin-bottom: 10px;
}
.warning-label-card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--report-ink-2);
}

/* ------------------------------------------------------------------
 * Upgrade buttons (primary + secondary, free-tier two-button layout)
 * ------------------------------------------------------------------ */

.upgrade-cta-pair {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0 10px;
}

.btn-upgrade,
.btn-upgrade-primary {
  display: inline-block;
  padding: 14px 26px;
  background: var(--report-accent);
  color: #fff;
  border-radius: 4px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.1s;
  cursor: pointer;
}
.btn-upgrade:hover,
.btn-upgrade-primary:hover {
  background: var(--report-ink);
  transform: translateY(-1px);
}

.btn-upgrade-secondary {
  display: inline-block;
  padding: 6px 0;
  color: var(--report-muted);
  font-size: 13.5px;
  text-decoration: underline;
  text-decoration-color: var(--report-border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.btn-upgrade-secondary:hover {
  color: var(--report-accent);
  text-decoration-color: var(--report-accent);
}

/* ------------------------------------------------------------------
 * Locked match teases ($14.99 tier)
 * ------------------------------------------------------------------ */

.cover-match-locked {
  opacity: 0.55;
  color: var(--report-muted);
}
.cover-match-locked .cover-match-label {
  color: var(--report-faint);
}
.cover-match-locked-note {
  font-style: italic;
  font-size: 0.93em;
  color: var(--report-faint);
}
.lock-icon {
  display: inline-block;
  margin-right: 6px;
  filter: grayscale(0.4);
}

.locked-match {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin: 10px 0;
  background: var(--report-cream);
  border: 1px dashed var(--report-border-strong);
  border-radius: 6px;
  position: relative;
}
.locked-match .lock-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.locked-match .locked-body {
  flex: 1;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--report-ink-2);
}
.locked-match .locked-body em {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--report-faint);
  font-style: italic;
}

/* ------------------------------------------------------------------
 * Share footer + closing
 * ------------------------------------------------------------------ */

.section-share { padding: 18px 22px; background: #fff; border: 1px solid var(--report-border); border-radius: 8px; }
.section-closing { text-align: center; padding-top: 24px; }
.section-closing h2 { border: none; padding: 0; font-size: 24px; }
.report-footer {
  font-size: 11px;
  color: var(--report-faint);
  margin-top: 36px;
  line-height: 1.5;
}

/* ------------------------------------------------------------------
 * Share buttons
 * ------------------------------------------------------------------ */

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 22px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid var(--report-border);
  border-radius: 4px;
  background: var(--report-cream);
  color: var(--report-ink-2);
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.share-btn:hover {
  border-color: var(--report-accent);
  background: var(--report-accent-soft);
  color: var(--report-ink);
}
.share-btn:focus-visible {
  outline: 2px solid var(--report-accent);
  outline-offset: 2px;
}
.share-btn-twitter:hover  { border-color: #1da1f2; }
.share-btn-linkedin:hover { border-color: #0077b5; }
.share-btn-facebook:hover { border-color: #1877f2; }
.share-btn-whatsapp:hover { border-color: #25d366; }
.share-btn-copy           { font-variant-numeric: tabular-nums; }
.share-btn-download       { font-variant-numeric: tabular-nums; }
.share-btn-native         { background: var(--report-accent-soft); border-color: var(--report-accent); }
.share-btn[disabled]      { opacity: 0.6; cursor: wait; }

@media (max-width: 520px) {
  .share-btn { font-size: 12.5px; padding: 8px 11px; }
}

/* ------------------------------------------------------------------
 * Upgrade CTAs
 * ------------------------------------------------------------------ */

.upgrade-cta {
  text-align: center;
  margin: 24px 0;
}
.btn-upgrade {
  display: inline-block;
  padding: 12px 24px;
  background: var(--report-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.btn-upgrade:hover { background: #5e6f44; }

/* ------------------------------------------------------------------
 * Placeholders (shown when content/ stubs aren't populated yet)
 * ------------------------------------------------------------------ */

.placeholder {
  font-size: 13px;
  color: var(--report-faint);
  font-style: italic;
}

/* ------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 768px) {
  .ai-card {
    grid-template-columns: 80px 1fr;
    gap: 16px;
  }
  .ai-photo { width: 80px; height: 80px; }
  .ai-visuals { grid-column: 1 / -1; }
  .apmi-grid-table { font-size: 9px; }
  .apmi-grid-table .dim-label { display: none; }
}

/* ------------------------------------------------------------------
 * Print (browser "Save as PDF" path)
 * ------------------------------------------------------------------ */

@media print {
  body { background: #fff; }
  .report { box-shadow: none; padding: 20px; max-width: none; }
  .ai-card { page-break-inside: avoid; }
  .report-section { page-break-inside: avoid; }
  .btn-upgrade { display: none; }
}
