/* ==========================================================================
   Premium AI Growth Report — paid deliverable
   ==========================================================================
   This stylesheet does double duty. On screen the report is a dark, on-brand
   web document; sent to a printer (or "Save as PDF") it becomes a clean,
   ink-friendly branded PDF with one section per page.

   Rather than duplicating rules, every colour is read from a variable on `.pr`
   and the print block simply swaps those variables for a light palette. Layout
   rules are written once and apply to both.
   ========================================================================== */

.pr-main {
  padding: 8rem 0 4rem;
}

.pr {
  --pr-ink: #f8fafc;
  --pr-ink-soft: #cbd5e1;
  --pr-ink-muted: #64748b;
  --pr-surface: rgba(15, 23, 42, 0.45);
  --pr-surface-2: rgba(99, 102, 241, 0.07);
  --pr-line: rgba(255, 255, 255, 0.09);
  --pr-line-strong: rgba(99, 102, 241, 0.32);
  --pr-accent: #818cf8;
  --pr-accent-2: #c084fc;
  --pr-page-pad: 2.5rem;

  max-width: 900px;
  margin: 0 auto;
  color: var(--pr-ink);
}

/* --- Action bar (screen only) --- */
.pr-actions {
  position: sticky;
  top: 84px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(12px);
  border: 1px solid var(--pr-line);
  border-radius: var(--radius-md);
}

.pr-actions-meta {
  font-size: 0.85rem;
  color: var(--pr-ink-muted);
  line-height: 1.5;
}

.pr-actions-meta strong {
  color: var(--pr-ink-soft);
}

/* --- A page of the report --- */
.pr-page {
  position: relative;
  padding: var(--pr-page-pad);
  margin-bottom: 1.75rem;
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--radius-md);
}

.pr-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--pr-line);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pr-ink-muted);
}

.pr-page-head .pr-wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.95rem;
  color: var(--pr-ink);
}

.pr-page-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--pr-line);
  font-size: 0.72rem;
  color: var(--pr-ink-muted);
}

/* --- Section headings --- */
.pr-eyebrow {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  margin-bottom: 0.9rem;
  border: 1px solid var(--pr-line-strong);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pr-accent);
}

.pr-page h2 {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  line-height: 1.2;
  margin-bottom: 1.1rem;
  color: var(--pr-ink);
}

.pr-page h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--pr-ink);
}

.pr-page p {
  color: var(--pr-ink-soft);
  line-height: 1.7;
  margin-bottom: 0.9rem;
}

.pr-lead {
  font-size: 1.05rem;
}

/* --- Cover page --- */
.pr-cover {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.14), var(--pr-surface) 65%);
}

.pr-cover-mark {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
}

.pr-cover h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.pr-cover-biz {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--pr-accent);
  margin-bottom: 0.4rem;
}

.pr-cover-sub {
  color: var(--pr-ink-muted);
  font-size: 0.95rem;
}

.pr-cover-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pr-line);
  font-size: 0.8rem;
  color: var(--pr-ink-muted);
}

.pr-contents {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pr-line);
  text-align: left;
}

.pr-contents ol {
  columns: 2;
  column-gap: 2.5rem;
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: var(--pr-ink-soft);
}

.pr-contents li {
  margin-bottom: 0.4rem;
  break-inside: avoid;
}

/* --- Headline figures --- */
.pr-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.pr-figure {
  padding: 1.25rem;
  background: var(--pr-surface-2);
  border: 1px solid var(--pr-line-strong);
  border-radius: var(--radius-sm);
  text-align: center;
}

.pr-figure-value {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--pr-accent-2);
  line-height: 1.1;
}

.pr-figure-label {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--pr-ink-muted);
  line-height: 1.4;
}

/* --- Scorecard --- */
.pr-score-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--pr-surface-2);
  border: 1px solid var(--pr-line-strong);
  border-radius: var(--radius-sm);
}

.pr-score-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--pr-accent);
}

.pr-score-number span {
  font-size: 1.1rem;
  color: var(--pr-ink-muted);
}

.pr-bands {
  list-style: none;
  padding: 0;
}

.pr-band {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--pr-line);
  break-inside: avoid;
}

.pr-band:last-child {
  border-bottom: 0;
}

.pr-band-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.pr-band-score {
  color: var(--pr-accent);
}

.pr-bar {
  height: 7px;
  background: var(--pr-line);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.pr-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-pill);
}

.pr-band-verdict {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--pr-ink-muted);
}

/* --- Tables --- */
.pr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.pr-table th,
.pr-table td {
  padding: 0.7rem 0.65rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--pr-line);
}

.pr-table th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pr-ink-muted);
}

.pr-table td {
  color: var(--pr-ink-soft);
}

.pr-table tr {
  break-inside: avoid;
}

.pr-table td:first-child {
  font-weight: 600;
  color: var(--pr-ink);
}

.pr-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--pr-line-strong);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  color: var(--pr-accent);
  white-space: nowrap;
}

/* --- Generic blocks and lists --- */
.pr-block {
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--pr-surface-2);
  border: 1px solid var(--pr-line);
  border-left: 3px solid var(--pr-line-strong);
  border-radius: var(--radius-sm);
  break-inside: avoid;
}

.pr-block h4 {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  margin-bottom: 0.5rem;
  color: var(--pr-ink);
}

.pr-block p:last-child {
  margin-bottom: 0;
}

.pr-block-meta {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--pr-ink-muted);
}

.pr-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.pr-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.65rem;
  color: var(--pr-ink-soft);
  line-height: 1.6;
  break-inside: avoid;
}

.pr-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  background: var(--pr-accent);
  border-radius: 50%;
}

.pr-list-num {
  counter-reset: pr-step;
}

.pr-list-num li::before {
  counter-increment: pr-step;
  content: counter(pr-step);
  top: 0;
  width: 1.15rem;
  height: 1.15rem;
  background: var(--pr-surface-2);
  border: 1px solid var(--pr-line-strong);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  color: var(--pr-accent);
}

.pr-quote {
  padding: 1.15rem 1.25rem;
  background: var(--pr-surface-2);
  border: 1px dashed var(--pr-line-strong);
  border-radius: var(--radius-sm);
  font-style: italic;
  color: var(--pr-ink-soft);
  line-height: 1.7;
}

/* --- Phase cards for the 90-day plan --- */
.pr-phase {
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--pr-surface-2);
  border: 1px solid var(--pr-line-strong);
  border-radius: var(--radius-sm);
  break-inside: avoid;
}

.pr-phase-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.pr-phase-head strong {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--pr-accent);
}

.pr-phase-kpi {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--pr-ink-muted);
}

/* --- Closing call to action (screen only) --- */
.pr-outro {
  padding: 2rem;
  text-align: center;
  background: var(--pr-surface-2);
  border: 1px solid var(--pr-line-strong);
  border-radius: var(--radius-md);
}

/* --- Loading / message states --- */
.pr-state {
  max-width: 620px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
  text-align: center;
}

.pr-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--border-glass);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: pr-spin 0.85s linear infinite;
}

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

.pr-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent-primary);
}

.pr-progress {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .pr {
    --pr-page-pad: 1.5rem;
  }

  .pr-actions {
    top: 76px;
    flex-direction: column;
    align-items: stretch;
  }

  .pr-contents ol {
    columns: 1;
  }

  .pr-score-hero {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  /* Tables get cramped on phones — stack each row into a labelled block. */
  .pr-table thead {
    display: none;
  }

  .pr-table,
  .pr-table tbody,
  .pr-table tr,
  .pr-table td {
    display: block;
    width: 100%;
  }

  .pr-table tr {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--pr-line);
  }

  .pr-table td {
    padding: 0.2rem 0;
    border: 0;
  }

  .pr-table td[data-label]::before {
    content: attr(data-label) ": ";
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pr-ink-muted);
  }
}

/* ==========================================================================
   Print / Save-as-PDF — the branded deliverable
   ========================================================================== */

@page {
  size: A4;
  margin: 13mm 13mm 12mm;
}

@media print {
  /* Ask the browser to honour our accent colours rather than dropping them. */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    background: #ffffff !important;
    color: #111827;
  }

  body::before,
  body::after {
    display: none !important;
  }

  .navbar,
  .no-print,
  footer {
    display: none !important;
  }

  .subpage-main,
  .pr-main,
  .container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
  }

  .pr {
    /* Same rules, ink-friendly palette. */
    --pr-ink: #111827;
    --pr-ink-soft: #374151;
    --pr-ink-muted: #6b7280;
    --pr-surface: #ffffff;
    --pr-surface-2: #f5f6ff;
    --pr-line: #e5e7eb;
    --pr-line-strong: #c7d2fe;
    --pr-accent: #4f46e5;
    --pr-accent-2: #7c3aed;
    --pr-page-pad: 0;

    max-width: none;
    color: #111827;
    font-size: 10.5pt;
  }

  /* One report section per sheet of paper. */
  .pr-page {
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
    border-radius: 0;
    break-after: page;
    break-inside: avoid;
  }

  .pr-page:last-child {
    break-after: auto;
  }

  /* Branding repeated on every page, top and bottom. */
  .pr-page-head {
    border-bottom: 2px solid var(--pr-accent);
    margin-bottom: 1.4rem;
  }

  .pr-page-foot {
    border-top: 1px solid var(--pr-line);
  }

  .pr-cover {
    min-height: 240mm;
    background: none;
    border: 0;
  }

  .pr-page h2 {
    font-size: 18pt;
  }

  .pr-page h3 {
    font-size: 11.5pt;
  }

  .pr-cover h1 {
    font-size: 30pt;
  }

  .pr-figure-value {
    font-size: 20pt;
  }

  .pr-score-number {
    font-size: 32pt;
  }

  .pr-bar {
    background: #e5e7eb;
  }

  .pr-bar-fill {
    background: #4f46e5;
  }

  .pr-table {
    font-size: 9.5pt;
  }

  a {
    color: #4f46e5;
    text-decoration: none;
  }
}
