/* ═══════════════════════════════════════════════════════════════════════════
   GUIDE PAGE STYLES
   Content preview with conversion elements
   ═══════════════════════════════════════════════════════════════════════════ */

.guide-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

@media (min-width: 900px) {
  .guide-header {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
  }
}

/* Table of contents */
.toc {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.toc li {
  counter-increment: toc-counter;
}

.toc a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  color: var(--ink);
  transition: all 0.2s var(--ease-out);
}

.toc a:hover {
  border-color: var(--accent);
  background: #fff;
  transform: translateX(4px);
}

.toc a::before {
  content: counter(toc-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Notes and callouts */
.note {
  border-left: 4px solid var(--accent-2);
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0 14px 14px 0;
  margin: 20px 0;
}

.note strong {
  color: #9a4515; /* Darker than --accent-2 for WCAG AA contrast (4.5:1+) */
}

/* WCAG AA contrast fixes for guide page */
.note strong {
  color: #9a4515; /* Darker than --accent-2 for WCAG AA contrast (4.5:1+) */
}

.callout {
  background: linear-gradient(135deg, #fffdf7 0%, #fff 100%);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 20px 0;
}

.callout strong {
  color: var(--accent);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th,
.table td {
  text-align: left;
  padding: 14px 16px;
  font-size: 0.95rem;
}

.table th {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

.table tr:not(:last-child) td {
  border-bottom: 1px solid var(--line);
}

.table tr:hover td {
  background: rgba(14, 90, 87, 0.03);
}

/* Typography helpers */
.small {
  font-size: 0.9rem;
}

/* Print styles */
.page-break {
  page-break-before: always;
  break-before: page;
}

/* Section content cards */
.guide-content .card {
  margin-bottom: 20px;
}

/* Sticky purchase CTA for guide preview */
.guide-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  z-index: 1000;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
}

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

.guide-sticky-text {
  flex: 1;
  min-width: 200px;
}

.guide-sticky-text strong {
  display: block;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 2px;
}

.guide-sticky-text span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Progress indicator */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 1001;
  transition: width 0.1s linear;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .guide-sticky-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .guide-sticky-text {
    text-align: center;
  }

  .table th,
  .table td {
    padding: 10px 12px;
    font-size: 0.88rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
  :root {
    --bg: #ffffff;
    --bg-2: #ffffff;
    --ink: #000000;
    --muted: #222222;
    --accent: #000000;
    --accent-2: #000000;
    --accent-3: #000000;
    --card: #ffffff;
    --line: #cccccc;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }

  body {
    background: #ffffff;
    font-size: 11pt;
  }

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

  .wrap {
    padding: 0;
    max-width: none;
  }

  .btn,
  .kicker,
  .guide-sticky-cta,
  .reading-progress {
    display: none !important;
  }

  .card,
  .list li,
  .callout,
  .note,
  .toc a {
    box-shadow: none;
    background: #ffffff;
    border: 1px solid #ccc;
  }

  .toc a::before {
    background: #000;
  }

  .table th {
    background: #333;
  }

  a {
    color: #000000;
    text-decoration: none;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  .card, .callout, .note {
    page-break-inside: avoid;
  }

  footer {
    margin-top: 40px;
  }
}
