/* style.css - A clean, professional stylesheet for reports */
/* Optimized for: 1" margins on print, black-and-white printing, mobile responsiveness, and journalistic readability */

/* Import Google Fonts for journalistic serifs (widely available, excellent readability on screen and print) */
@import url('https://fonts.googleapis.com/css2?family=Georgia&family=Libre+Baskerville&family=Playfair+Display:wght@700&display=swap');

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1rem;
  font-family: 'Georgia', 'Libre Baskerville', serif; /* Classic journalistic serif fonts */
  font-size: 1rem; /* Base 16px – scales well on mobile */
  line-height: 1.6;
  color: #000;
  background-color: #fff;
  max-width: 100%;
  hyphens: auto; /* Improves text flow on narrow screens */
}

@media (min-width: 768px) {
  body {
    font-size: 1.125rem; /* Slightly larger for tablets/desktops */
    padding: 2rem;
  }
}

/* Container for main content – centers and constrains width on larger screens */
.container {
  max-width: 900px;
  margin: 0 auto;
}

/* Headings – professional and hierarchical */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif; /* Elegant display serif for headlines */
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  color: #000;
}

h1 {
  font-size: 2.5rem;
  text-align: center;
}

@media (max-width: 767px) {
  h1 {
    font-size: 2rem;
  }
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.4rem;
}

/* Paragraphs and text */
p {
  margin-bottom: 1.2em;
  text-align: justify;
}

/* Lists */
ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2em;
}

/* Images – responsive and print-friendly */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
}

/* Tables – responsive wrapper for mobile */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

th, td {
  border: 1px solid #000;
  padding: 0.5rem;
  text-align: left;
}

@media (max-width: 767px) {
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Print-specific styles */
@media print {
  @page {
    margin: 1in; /* Exactly 1" margins on all sides */
    size: letter portrait; /* Or 'A4' if preferred */
  }

  body {
    padding: 0; /* Remove screen padding for print */
    font-size: 12pt; /* Traditional print size */
    line-height: 1.5;
  }

  a {
    text-decoration: none; /* Remove underlines in print */
    color: inherit;
  }

  a::after {
    content: " (" attr(href) ")"; /* Optional: show URLs after links */
    font-size: 0.8em;
  }

  img {
    max-width: 100% !important; /* Ensure images fit */
  }

  /* Hide non-essential elements if present */
  nav, footer, aside, .no-print {
    display: none;
  }

  /* Force black text */
  * {
    color: #000 !important;
    background: transparent !important;
  }
}