
/* ============================================
   PRINT STYLESHEET FOR PAGED.JS
   Book-style layout for The Cooperative Communication Vision

   This file contains the @page CSS rules that Paged.js
   interprets to create paginated, print-ready output.

   CUSTOMIZATION GUIDE:
   - Change page size on line marked PAGE SIZE below
   - Change margins on lines marked MARGINS below
   - Change fonts in the body rule below
   ============================================ */

/* --- PAGE SIZE --- */
/* Common book sizes:
   5.5in 8.5in  = US Half Letter / Digest
   6in 9in      = US Trade Paperback
   5.06in 7.81in = Royal (common UK)
   8.5in 11in   = US Letter
*/
@page {
    size: 6in 9in;                  /* PAGE SIZE — change here */
    margin-top: 0.75in;             /* MARGINS */
    margin-bottom: 0.75in;
    margin-inside: 0.875in;         /* Binding side — slightly wider */
    margin-outside: 0.625in;

    /* Page number at bottom center */
    @bottom-center {
        content: counter(page);
        font-family: Georgia, serif;
        font-size: 10pt;
        color: #555;
    }
}

/* --- FIRST PAGE OF EACH CHAPTER --- */
/* Suppress the header and add extra top margin */
@page chapter-start {
    margin-top: 2in;

    @top-left { content: none; }
    @top-right { content: none; }
    @top-center { content: none; }
}

/* --- LEFT (VERSO) PAGES --- */
@page :left {
    @top-left {
        content: "The Cooperative Communication Vision";
        font-family: Georgia, serif;
        font-size: 9pt;
        font-style: italic;
        color: #777;
    }
}

/* --- RIGHT (RECTO) PAGES --- */
@page :right {
    @top-right {
        content: string(chapter-title);
        font-family: Georgia, serif;
        font-size: 9pt;
        font-style: italic;
        color: #777;
    }
}

/* --- BLANK PAGES --- */
@page :blank {
    @top-left { content: none; }
    @top-right { content: none; }
    @bottom-center { content: none; }
}


/* ============================================
   CONTENT STYLING FOR PRINT
   ============================================ */

body {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11pt;
    line-height: 1.55;
    color: #000;
    /* Remove screen-only styling */
    background: none;
}

.blank-page-content {
    /* Override screen max-width — Paged.js controls the page box */
    max-width: none;
    margin: 0;
    padding: 0;
}

/* --- CHAPTER TITLE --- */
/* The h1 sets the running header text for right-hand pages */
h1.entry-title {
    string-set: chapter-title content();
    font-size: 22pt;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5em;
    page: chapter-start;           /* Use the chapter-start page style */
    break-before: right;           /* Start chapters on a right-hand page */
}

h2 {
    font-size: 15pt;
    margin-top: 1.8em;
    margin-bottom: 0.6em;
    break-after: avoid;            /* Don't leave a heading stranded */
}

h3 {
    font-size: 12pt;
    margin-top: 1.4em;
    margin-bottom: 0.5em;
    break-after: avoid;
}

p {
    margin-bottom: 0.7em;
    orphans: 3;                    /* Minimum lines at bottom of page */
    widows: 3;                     /* Minimum lines at top of page */
}

blockquote {
    margin: 1em 1.5em;
    padding-left: 0.8em;
    border-left: 2pt solid #999;
    font-style: italic;
    font-size: 10.5pt;
}

ul, ol {
    margin: 0.8em 0 0.8em 1.5em;
}

li {
    margin-bottom: 0.3em;
}

/* --- IMAGES --- */
img {
    max-width: 100%;
    height: auto;
    break-inside: avoid;           /* Don't split images across pages */
}

figure {
    break-inside: avoid;
    margin: 1em 0;
}

/* --- TABLES --- */
table {
    border-collapse: collapse;
    width: 100%;
    break-inside: avoid;
    margin: 1em 0;
    font-size: 10pt;
}

th, td {
    border: 1px solid #999;
    padding: 0.4em 0.6em;
    text-align: left;
}

th {
    background: #eee;
    font-weight: bold;
}

/* --- LINKS — hide URLs in print --- */
a {
    color: #000;
    text-decoration: none;
}

/* --- HORIZONTAL RULES --- */
hr {
    border: none;
    border-top: 0.5pt solid #999;
    margin: 1.5em 0;
}

/* --- EXERCISE SECTIONS (if marked with a class) --- */
.exercise, .reflection-questions {
    break-inside: avoid;
    border: 1pt solid #ccc;
    padding: 1em;
    margin: 1.2em 0;
    background: #fafafa;
}

/* --- REFERENCES SECTION --- */
.references p {
    padding-left: 2em;
    text-indent: -2em;             /* Hanging indent for MLA/APA style */
    font-size: 10pt;
}
