/* in thesis_shared.css */

/* =====================================================
   Thesis Shared Styles — FINAL, CANONICAL VERSION
   ===================================================== */

/* ================================
   Base document rules
   ================================ */
body {
  margin: 0 !important;
  padding: 0 !important;
  hyphens: none !important;
}

/* =====================================================
   SINGLE global page counter
   ===================================================== */
body.thesis-compiled {
  /* counter-reset: page; */
}

/* ================================
   Thesis wrapper
   ================================ */
.thesis-wrapper {
  font-family: "Times New Roman", Times, serif;
  font-size: 12pt;
  line-height: 1.5;
  color: #000;
  background-color: #f3f4f6;
}

.thesis-container {
  margin: 0 !important;
  padding: 0 !important;
  background-color: #f3f4f6;
}

/* =====================================================
   ONE PAGE = ONE thesis-content
   ===================================================== */
.thesis-content {
  width: 8.5in;
  min-height: 11in;

  /* Do NOT force max-height here.
     If content is too long, we need to fix the template pagination,
     not hide the overflow. */
  max-height: none;
  height: auto;
  overflow: visible;

  margin: 1in auto;
  padding: 1in;
  background: #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  box-sizing: border-box;

  font-family: "Times New Roman", Times, serif;
  font-size: 12pt;
  line-height: 2;
  text-align: justify;
  text-indent: 0.5in;

  position: relative;

  break-after: page;
  page-break-after: always;
}

/* Binding margin */
.thesis-content.binding-margin {
  margin-left: 1.5in;
}

/* =====================================================
   PAGE NUMBER DISPLAY
   ===================================================== */
.thesis-content::after {
  position: absolute;
  bottom: 0.5in;
  right: 1in;
  font-size: 12pt;
  color: #000;
}

/* Roman numerals (front matter ONLY) */
/* .thesis-content.roman::after {
  content: counter(page, lower-roman);
} */

/* Arabic numerals (default) */
/* .thesis-content.arabic::after {
  content: counter(page);
} */

.thesis-content::after {
  content: attr(data-page-label);
}

/* =====================================================
   🚨 THE CRITICAL FIX 🚨
   ===================================================== */

/*
  The ONLY reset point allowed in the document
  This MUST be applied to the FIRST Introduction page
*/
/* .thesis-content.arabic-start {
  counter-reset: page 0;
} */

/*
  Defensive rule:
  NO OTHER SECTION may reset the counter
*/
/* .thesis-content:not(.arabic-start) {
  counter-reset: none;
} */

/* =====================================================
   Section breaks (semantic only)
   ===================================================== */
.section-break {
  display: block;
}

/* =====================================================
   Headings
   ===================================================== */
.thesis-content h1,
.thesis-content h2,
.thesis-content h3,
.thesis-content h4,
.thesis-content h5,
.thesis-content h6 {
  text-align: center;
  font-weight: bold;
  margin: 1rem 0;
}

/* =====================================================
   Paragraphs
   ===================================================== */
.thesis-content p {
  text-indent: 2em;
  margin: 0.8em 0;
}

.thesis-content p.thesis-paragraph-continuation {
  margin-top: 0;
  text-indent: 0;
}

/* =====================================================
   TOC / Lists
   ===================================================== */
.list-title {
  font-size: 18pt;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1em;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-entry {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.5em;
}

.leader-dots {
  flex: 1;
  margin: 0 1em;
  border-bottom: 1pt dotted black;
}

/* =====================================================
   Tables & figures
   ===================================================== */
.thesis-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

.thesis-content th,
.thesis-content td {
  border: 1px solid #000;
  padding: 0.5em;
}

/* =====================================================
   Print
   ===================================================== */
@media print {
  .thesis-wrapper,
  .thesis-container {
    background: white;
  }

  .thesis-content {
  width: 8.5in;
  min-height: 11in;
  max-height: none;
  height: auto;
  overflow: visible;

  box-shadow: none;
  margin: 0;
  padding: 1in;
}
  .no-print {
      display: none !important;
    }


  @page {
    size: 8.5in 11in;
    margin: 0;
  }
}
