/* Serenity Project - Professional Whitepaper Color Scheme */
:root {
  /* Primary Brand Colors - Professional Navy/Teal Scheme */
  --brand-color: #1E3A5F;
  --brand-dark: #0F1F35;
  --brand-light: #2D5A87;
  --brand-accent: #4A90A4;
  
  /* Typography */
  --heading-font: 'Calibri', sans-serif;
  --body-font: 'Calibri', sans-serif;
  
  /* Background & Surface Colors */
  --bg-light: #F8F8F8;
  --bg-white: #FFFFFF;
  --bg-text: #383C40;
  --border-color: #D1D5DB;
  
  /* Text Colors */
  --text-dark: #000000;
  --text-medium: #000000;
  --text-light: #000000;
  
  /* Status Colors */
  --success: #059669;
  --warning: #D97706;
  --info: #0284C7;
  --error: #DC2626;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--body-font);
  line-height: 1.8;
  color: #000000;
  background: #F8F8F8;
  font-size: 13pt;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

/* Password Protection Modal */
.password-modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.95) 0%, rgba(15, 31, 53, 0.95) 100%);
  z-index: 10000;
  padding: 20px;
}

.password-modal-content {
  background: white;
  border-radius: 12px;
  padding: 40px;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.password-header {
  text-align: center;
  margin-bottom: 30px;
}

.password-header h2 {
  color: var(--brand-color);
  font-size: 24pt;
  margin: 0 0 15px 0;
  font-weight: 700;
  border: none;
  padding: 0;
  font-family: var(--heading-font);
}

.password-subtitle {
  color: #000000;
  font-size: 12pt;
  margin: 0;
  line-height: 1.6;
}

.password-form {
  width: 100%;
}

.password-input-group {
  margin-bottom: 25px;
}

.password-input-group label {
  display: block;
  margin-bottom: 8px;
  color: #000000;
  font-weight: 600;
  font-size: 12pt;
}

.password-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 13pt;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-family: var(--body-font);
  box-sizing: border-box;
}

.password-input:focus {
  outline: none;
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(241, 95, 48, 0.1);
}

.password-error {
  margin-top: 10px;
  padding: 10px;
  background: #FEE2E2;
  color: #DC2626;
  border-radius: 6px;
  font-size: 11pt;
  text-align: center;
  border-left: 3px solid #DC2626;
}

.password-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.password-submit-btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 14pt;
  font-weight: 600;
  background: var(--brand-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--heading-font);
}

.password-submit-btn:hover {
  background: var(--brand-dark);
}

.password-submit-btn:active {
  transform: translateY(0);
}

.password-home-btn {
  width: 100%;
  padding: 12px 24px;
  font-size: 13pt;
  font-weight: 600;
  background: transparent;
  color: var(--brand-color);
  border: 2px solid var(--brand-color);
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  font-family: var(--heading-font);
  display: inline-block;
  box-sizing: border-box;
}

.password-home-btn:hover {
  background: var(--brand-color);
  color: white;
}

.main-content {
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

header {
  text-align: center;
  margin-bottom: 10px;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--brand-color) 0%, var(--brand-dark) 100%);
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
  font-family: var(--heading-font);
  font-size: 30pt;
  margin: 0 0 10px 0;
  font-weight: 700;
  letter-spacing: -0.5px;
}

header .subtitle {
  font-size: 16pt;
  opacity: 0.95;
  margin: 0;
  font-weight: 300;
}

header .meta {
  margin-top: 20px;
  font-size: 13pt;
  text-align: center;
  opacity: 0.9;
  color: white;
}

.header-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.header-btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 14pt;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid white;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: var(--heading-font);
}

.header-btn:hover {
  background: white;
  color: var(--brand-color);
}

.header-btn:active {
  transform: translateY(0);
}

.header-btn.primary {
  background: white;
  color: var(--brand-color);
}

.header-btn.primary:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-dark);
}

/* Section Navigation Menu */
.section-nav {
  background: var(--bg-white);
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 40px;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-link {
  display: inline-block;
  padding: 4px 10px;
  font-size: 9pt;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: var(--bg-light);
  font-family: var(--body-font);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link:hover {
  background: var(--brand-color);
  color: white;
  border-color: var(--brand-color);
}

h2 {
  font-family: var(--heading-font);
  color: var(--brand-color);
  border-bottom: 3px solid var(--brand-color);
  padding-bottom: 8px;
  margin-top: 50px;
  margin-bottom: 24px;
  font-size: 20pt;
  font-weight: 600;
  scroll-margin-top: 100px;
}

h3 {
  font-family: var(--heading-font);
  color: var(--brand-dark);
  margin-top: 32px;
  margin-bottom: 16px;
  font-size: 18pt;
  font-weight: 600;
}

h4 {
  font-family: var(--heading-font);
  color: #000000;
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 18pt;
  font-weight: 600;
}

p {
  font-size: 14pt;
  margin-bottom: 18px;
  color: #000000;
  text-align: justify;
}

ul, ol {
  font-size: 14pt;
  margin-bottom: 20px;
  padding-left: 30px;
}

ul li, ol li {
  margin-bottom: 10px;
  line-height: 1.8;
}

strong {
  color: var(--brand-dark);
  font-weight: 600;
}

.expert-box {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-left: 4px solid var(--brand-color);
  padding: 20px;
  margin: 30px 0;
  border-radius: 6px;
}

.expert-box h4 {
  color: var(--brand-color);
  margin-top: 0;
}

.warning-box {
  background: #FFFBEB;
  border-left: 4px solid var(--warning);
  padding: 20px;
  margin: 30px 0;
  border-radius: 6px;
}

.success-box {
  background: #ECFDF5;
  border-left: 4px solid var(--success);
  padding: 20px;
  margin: 30px 0;
  border-radius: 6px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.tech-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
}

.tech-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tech-card h4 {
  color: var(--brand-color);
  margin-top: 0;
}

.timeline-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.timeline-table th {
  background: var(--brand-color);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 600;
}

.timeline-table td {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

.timeline-table tr:hover {
  background: var(--bg-light);
}

.phase-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 9pt;
  font-weight: 600;
  background: var(--brand-color);
  color: white;
}

.diagram-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  margin: 30px 0;
}

pre {
  background: #1E1E1E;
  color: #D4D4D4;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 13pt;
  line-height: 1.6;
  margin: 0;
  text-align: center;
  width: 100%;
}

.feature-list {
  background: var(--bg-light);
  padding: 25px;
  border-radius: 8px;
  margin: 25px 0;
}

.feature-list ul {
  list-style: none;
  padding-left: 0;
}

.feature-list li {
  padding: 12px 0;
  padding-left: 30px;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
  font-size: 17pt;
  top: 12px;
}

footer {
  margin-top: 80px;
  padding: 30px;
  background: var(--bg-light);
  border-radius: 8px;
  text-align: center;
  font-size: 10pt;
  color: #000000;
  border-top: 2px solid var(--border-color);
}

footer p {
  text-align: center;
  margin: 0 auto;
}

footer a {
  text-align: center;
}

.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  padding: 0;
  font-size: 24pt;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50%;
  border: 2px solid var(--brand-color);
  background: var(--brand-color);
  color: white;
  cursor: pointer;
  font-family: var(--heading-font);
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.back-to-top-btn:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top-btn.show {
  display: flex;
}

.back-to-top-btn:active {
  transform: translateY(0);
}

.highlight {
  background: linear-gradient(120deg, #DBEAFE 0%, #BFDBFE 100%);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  color: var(--brand-dark);
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
  * {
    -webkit-tap-highlight-color: transparent;
  }

  body {
    font-size: 12pt;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  /* Password Modal Mobile */
  .password-modal {
    padding: 15px;
  }

  .password-modal-content {
    padding: 30px 20px;
    max-width: 100%;
  }

  .password-header h2 {
    font-size: 20pt;
  }

  .password-subtitle {
    font-size: 11pt;
  }

  .password-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .container {
    padding: 20px 15px;
  }

  header {
    padding: 25px 15px;
    margin-bottom: 30px;
    border-radius: 0;
  }

  header h1 {
    font-size: 22pt;
    margin: 0 0 8px 0;
  }

  header .meta {
    font-size: 11pt;
    margin-top: 15px;
  }

  .header-buttons {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }

  .header-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 13pt;
    text-align: center;
    min-height: 44px;
    touch-action: manipulation;
  }

  .section-nav {
    padding: 10px 0;
    margin-bottom: 30px;
  }

  .nav-container {
    padding: 0 15px;
    gap: 3px 4px;
  }

  .nav-link {
    padding: 4px 8px;
    font-size: 8pt;
    touch-action: manipulation;
  }

  h2 {
    font-size: 18pt;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 6px;
    scroll-margin-top: 80px;
  }

  h3 {
    font-size: 16pt;
    margin-top: 24px;
    margin-bottom: 12px;
  }

  h4 {
    font-size: 14pt;
    margin-top: 18px;
    margin-bottom: 10px;
  }

  p {
    font-size: 12pt;
    margin-bottom: 14px;
  }

  ul, ol {
    font-size: 12pt;
    padding-left: 25px;
    margin-bottom: 16px;
  }

  .expert-box,
  .warning-box,
  .success-box {
    padding: 15px;
    margin: 20px 0;
  }

  .tech-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 20px 0;
  }

  .tech-card {
    padding: 15px;
  }

  .timeline-table {
    font-size: 9pt;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .timeline-table thead {
    display: none;
  }

  .timeline-table tbody {
    display: block;
    width: 100%;
  }

  .timeline-table tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    background: var(--bg-light);
    width: 100%;
    box-sizing: border-box;
  }

  .timeline-table td {
    display: block;
    padding: 6px 0;
    border: none;
    text-align: left;
    width: 100%;
  }

  .timeline-table td:first-child {
    font-weight: 600;
    color: var(--brand-color);
    font-size: 11pt;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--brand-color);
  }

  .timeline-table td:nth-child(2) {
    font-weight: 600;
    margin-bottom: 8px;
  }

  .timeline-table td:nth-child(3):before {
    content: "Deliverables: ";
    font-weight: 600;
    color: #000000;
    display: block;
    margin-bottom: 4px;
  }

  .timeline-table td:nth-child(4):before {
    content: "Team: ";
    font-weight: 600;
    color: #000000;
    display: block;
    margin-bottom: 4px;
  }

  .feature-list {
    padding: 15px;
    margin: 20px 0;
  }

  .feature-list li {
    padding: 10px 0;
    padding-left: 25px;
  }

  pre {
    font-size: 9pt;
    padding: 15px;
    overflow-x: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
    -webkit-overflow-scrolling: touch;
  }

  .diagram-wrapper {
    min-height: 300px;
    margin: 20px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  footer {
    padding: 20px 15px;
    margin-top: 50px;
  }

  footer p {
    font-size: 9pt;
  }

  .back-to-top-btn {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 20pt;
    touch-action: manipulation;
  }
}

@media screen and (max-width: 480px) {
  body {
    font-size: 11pt;
  }

  /* Password Modal Small Mobile */
  .password-modal-content {
    padding: 25px 15px;
  }

  .password-header h2 {
    font-size: 18pt;
    margin-bottom: 12px;
  }

  .password-subtitle {
    font-size: 10pt;
  }

  .password-submit-btn,
  .password-home-btn {
    font-size: 12pt;
    padding: 12px 20px;
  }

  .container {
    padding: 15px 10px;
  }

  header {
    padding: 20px 10px;
    margin-bottom: 25px;
  }

  header h1 {
    font-size: 20pt;
    line-height: 1.2;
  }

  header .meta {
    font-size: 10pt;
  }

  .header-btn {
    padding: 12px 16px;
    font-size: 12pt;
  }

  .section-nav {
    padding: 8px 0;
    margin-bottom: 25px;
  }

  .nav-container {
    padding: 0 10px;
    gap: 2px 3px;
  }

  .nav-link {
    padding: 3px 6px;
    font-size: 7pt;
  }

  h2 {
    font-size: 16pt;
    margin-top: 25px;
    margin-bottom: 12px;
    scroll-margin-top: 70px;
  }

  h3 {
    font-size: 14pt;
    margin-top: 20px;
    margin-bottom: 10px;
  }

  h4 {
    font-size: 13pt;
    margin-top: 16px;
    margin-bottom: 8px;
  }

  p {
    font-size: 11pt;
    margin-bottom: 12px;
  }

  ul, ol {
    font-size: 11pt;
    padding-left: 20px;
  }

  .expert-box,
  .warning-box,
  .success-box {
    padding: 12px;
    margin: 15px 0;
  }

  .tech-card {
    padding: 12px;
  }

  .feature-list {
    padding: 12px;
  }

  pre {
    font-size: 8pt;
    padding: 12px;
  }

  .back-to-top-btn {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 18pt;
    touch-action: manipulation;
  }
}

/* Tablet Styles */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 30px 20px;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  header h1 {
    font-size: 26pt;
  }
}

/* PDF Generation Styles */
/* Print/PDF Styles - Clean typography, no images */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: #f8f8f8 !important;
    margin: 0;
    padding: 0;
    font-size: 11pt;
    line-height: 1.6;
    color: #333 !important;
  }

  .container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10mm 5mm !important;
  }

  /* Hide buttons */
  .header-buttons {
    display: none !important;
  }

  /* Hide back to top button in print */
  .back-to-top-btn {
    display: none !important;
  }

  /* Header styling */
  header {
    background: linear-gradient(135deg, var(--brand-color) 0%, var(--brand-dark) 100%) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color: white !important;
    padding: 15px 8px !important;
    margin-bottom: 15px !important;
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  header h1 {
    font-size: 24pt !important;
    margin: 5px 0 !important;
    color: white !important;
  }

  header .meta {
    font-size: 11pt !important;
    color: white !important;
  }

  /* Typography */
  h2 {
    font-size: 18pt !important;
    color: var(--brand-color) !important;
    border-bottom: 2px solid var(--brand-color) !important;
    padding-bottom: 4px !important;
    margin-top: 20px !important;
    margin-bottom: 4px !important;
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  h2 + .expert-box,
  h2 + .warning-box,
  h2 + .success-box,
  h2 + p,
  h2 + ul,
  h2 + ol,
  h2 + h3,
  h2 + div,
  h2 + table {
    margin-top: 0 !important;
  }

  h3 {
    font-size: 14pt !important;
    color: var(--brand-dark) !important;
    margin-top: 16px !important;
    margin-bottom: 4px !important;
    page-break-after: avoid;
  }

  h3 + .feature-list,
  h3 + p,
  h3 + ul,
  h3 + ol,
  h3 + div,
  h3 + .tech-grid,
  h3 + table,
  h3 + .timeline-table {
    margin-top: 0 !important;
  }

  h4 {
    font-size: 12pt !important;
    margin-top: 12px !important;
    margin-bottom: 4px !important;
    page-break-after: avoid;
  }

  h4 + p,
  h4 + ul,
  h4 + ol,
  h4 + div {
    margin-top: 0 !important;
  }

  p {
    font-size: 11pt !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    text-align: justify;
    orphans: 3;
    widows: 3;
  }

  /* Remove top margin from first element after headings */
  h2 + p,
  h3 + p,
  h4 + p {
    margin-top: 0 !important;
  }

  ul, ol {
    font-size: 11pt !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    padding-left: 20px !important;
  }

  li {
    margin-bottom: 5px !important;
    line-height: 1.6 !important;
  }

  /* Boxes */
  .expert-box,
  .warning-box,
  .success-box {
    page-break-inside: avoid;
    margin: 8px 0 12px 0 !important;
    padding: 12px 8px !important;
    border-left-width: 3px !important;
  }

  h2 + .expert-box,
  h2 + .warning-box,
  h2 + .success-box {
    margin-top: 0 !important;
  }

  .expert-box h4,
  .warning-box h4,
  .success-box h4 {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
  }

  .expert-box p:first-of-type,
  .warning-box p:first-of-type,
  .success-box p:first-of-type {
    margin-top: 0 !important;
  }

  .expert-box {
    background: #EFF6FF !important;
    border-left-color: var(--brand-color) !important;
  }

  .warning-box {
    background: #FFF7ED !important;
    border-left-color: var(--warning) !important;
  }

  .success-box {
    background: #F0FDF4 !important;
    border-left-color: var(--success) !important;
  }

  /* Tables */
  .timeline-table {
    page-break-inside: avoid;
    font-size: 10pt !important;
    margin-top: 0 !important;
  }

  h3 + .timeline-table {
    margin-top: 0 !important;
  }

  .timeline-table th {
    background: var(--brand-color) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color: white !important;
    padding: 8px 6px !important;
  }

  .timeline-table td {
    padding: 8px 6px !important;
  }

  /* Tech cards */
  .tech-grid {
    display: block !important;
    margin: 8px 0 !important;
  }

  .tech-card {
    page-break-inside: avoid;
    margin-bottom: 12px !important;
    padding: 12px 8px !important;
    border: 1px solid #ddd !important;
    background: #FAFAFA !important;
  }

  .tech-card h4 {
    margin-top: 0 !important;
  }

  .tech-card h4 {
    font-size: 12pt !important;
    color: var(--brand-color) !important;
  }

  /* Feature list */
  .feature-list {
    page-break-inside: avoid;
    background: #FAFAFA !important;
    padding: 12px 8px !important;
    margin: 8px 0 12px 0 !important;
  }

  h3 + .feature-list {
    margin-top: 4px !important;
  }

  .feature-list li:before {
    font-size: 14pt !important;
  }

  /* Code blocks */
  pre {
    page-break-inside: avoid;
    font-size: 9pt !important;
    padding: 15px !important;
    background: #1E1E1E !important;
    color: #D4D4D4 !important;
    overflow: visible !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
  }

  /* Footer */
  footer {
    page-break-inside: avoid;
    margin-top: 30px !important;
    padding: 15px 8px !important;
    font-size: 9pt !important;
    border-top: 1px solid #ddd !important;
  }

  /* Phase badges */
  .phase-badge {
    font-size: 8pt !important;
    padding: 3px 8px !important;
  }

  /* Links */
  a {
    color: var(--brand-color) !important;
    text-decoration: underline !important;
  }

  /* Avoid page breaks */
  .page-break-avoid {
    page-break-inside: avoid;
  }

  /* Force page breaks before major sections */
  h2:not(:first-of-type) {
    page-break-before: auto;
  }

  /* Remove shadows and effects for print */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Ensure proper spacing */
  @page {
    size: A4;
    margin: 5mm 5mm;
  }
}

/* Ensure clean PDF output when printing */
body.printing {
  overflow: visible !important;
}

