/* TOC active indicator — arrow instead of pilcrow */
.md-sidebar--secondary .md-nav__link--active::before {
  content: "←";
  margin-right: 4px;
  font-weight: bold;
  color: #4CAF50;
}

/* Export PDF button styling */
.pdf-export-container {
  margin: 0.5rem 0 1.5rem 0;
}

.pdf-export-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border: 2px solid #4CAF50;
  border-radius: 6px;
  background: transparent;
  color: #4CAF50;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.pdf-export-btn:hover {
  background: #4CAF50;
  color: #fff;
}

/* Print styles — clean PDF output */
@media print {
  /* Hide navigation, header, footer, buttons */
  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-footer,
  .md-top,
  .pdf-export-container,
  .md-search,
  .md-source,
  .headerlink,
  nav[aria-label="Footer"] {
    display: none !important;
  }

  /* Full width content */
  .md-content {
    margin: 0 !important;
    max-width: 100% !important;
  }

  .md-main__inner {
    margin: 0 !important;
  }

  .md-grid {
    max-width: 100% !important;
  }

  /* Clean article styling */
  article {
    padding: 0 !important;
  }

  /* Ensure images fit page */
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  /* Tables don't break across pages */
  table {
    page-break-inside: avoid;
  }

  tr {
    page-break-inside: avoid;
  }

  /* Headings stay with content */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  /* Page margins */
  @page {
    margin: 1.5cm;
    size: A4;
  }

  /* Force light background for readability */
  body,
  .md-content,
  article {
    background: #fff !important;
    color: #333 !important;
  }

  /* Table styling for print */
  table {
    border-collapse: collapse;
    width: 100%;
  }

  th, td {
    border: 1px solid #ccc !important;
    padding: 6px 10px;
    color: #333 !important;
    background: #fff !important;
  }

  th {
    background: #f0f0f0 !important;
    font-weight: bold;
  }

  /* Code blocks */
  pre, code {
    background: #f5f5f5 !important;
    color: #333 !important;
    border: 1px solid #ddd;
  }

  /* Links show URL */
  a[href]::after {
    content: none; /* Don't show URLs in print — too noisy */
  }

  a {
    color: #333 !important;
    text-decoration: underline;
  }
}
