/* FRACTURED CROWN - PATENT LAW TEXTBOOK EDITION */
/* 8" x 10" Print-Optimized Layout */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&family=Nunito:wght@400;600;700&display=swap');

@page {
    size: 8in 10in;
    margin: 0.75in 0.75in 0.75in 1in;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', 'Verdana', 'Trebuchet MS', sans-serif;
    font-size: 12pt;
    line-height: 1.8;
    color: #2c3e50;
    max-width: 8in;
    margin: 0 auto;
    padding: 0.5in;
    background: #f5f5f0;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .no-print {
        display: none;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    .margin-note {
        page-break-inside: avoid;
    }
}

/* Textbook Page Layout */
.textbook-page {
    background: white;
    padding: 0.75in 0.75in 0.75in 1in;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 0.75in;
    position: relative;
}

/* Chapter Headers */
h1.chapter-title {
    font-family: 'Comfortaa', 'Century Gothic', sans-serif;
    font-size: 28pt;
    font-weight: 700;
    text-align: center;
    margin: 0.5in 0 0.25in 0;
    color: #5b4b8a;
    text-transform: uppercase;
    letter-spacing: 3pt;
}

h2.chapter-subtitle {
    font-family: 'Nunito', 'Verdana', sans-serif;
    font-size: 15pt;
    font-weight: 600;
    text-align: center;
    margin: 0 0 0.5in 0;
    color: #7c6ba3;
}

h3.section-header {
    font-family: 'Comfortaa', 'Century Gothic', sans-serif;
    font-size: 14pt;
    font-weight: 700;
    margin-top: 0.3in;
    margin-bottom: 0.15in;
    color: #5b4b8a;
}

/* Story Text */
.story-text {
    text-align: justify;
    hyphens: auto;
    margin-bottom: 0.2in;
    line-height: 2;
}

/* Drop cap only on first paragraph after chapter subtitle */
h2.chapter-subtitle + hr + .story-text:first-letter,
h2.chapter-subtitle + .story-text:first-letter {
    font-size: 3em;
    line-height: 0.9;
    float: left;
    margin: 0.05em 0.1em 0 0;
    font-weight: bold;
}

/* Margin Notes - Patent Law References */
.margin-note {
    position: relative;
    display: block;
    background: #fffef0;
    border-left: 3px solid #d4af37;
    padding: 8pt 10pt;
    margin: 10pt 0 10pt 0;
    font-size: 9pt;
    line-height: 1.4;
    font-family: 'Courier New', monospace;
}

.margin-note::before {
    content: "§";
    position: absolute;
    left: -15pt;
    top: 8pt;
    font-size: 14pt;
    font-weight: bold;
    color: #d4af37;
}

.margin-note .statute {
    font-weight: bold;
    color: #8b7ab8;
}

/* Ancient Text Blocks */
.ancient-text {
    font-family: 'Georgia', serif;
    font-style: italic;
    background: #f9f9f9;
    border: 1px solid #ccc;
    padding: 12pt;
    margin: 15pt 20pt;
    font-size: 10pt;
    line-height: 1.5;
}

/* Code/Analysis Blocks */
.analysis-block {
    font-family: 'Courier New', Courier, monospace;
    background: #f0f0f0;
    border: 1px solid #999;
    padding: 10pt;
    margin: 12pt 0;
    font-size: 9pt;
    white-space: pre-wrap;
}

/* Equipment Lists, Research Notes */
.research-note {
    background: #f9f5ff;
    border: 2px dashed #c9a0dc;
    padding: 12pt;
    margin: 15pt 0;
    font-size: 10pt;
}

/* Statutory Reference Section */
.statutory-index {
    background: #e8f4f8;
    border: 2px solid #2980b9;
    padding: 15pt;
    margin-top: 0.5in;
    page-break-before: always;
}

.statutory-index h3 {
    color: #2980b9;
    margin-top: 0;
}

.statutory-index ul {
    margin: 8pt 0;
    padding-left: 20pt;
}

.statutory-index li {
    margin-bottom: 6pt;
    line-height: 1.4;
}

.statute-citation {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #8b7ab8;
}

/* Study Aids */
.study-question {
    background: #f0fff0;
    border-left: 4px solid #228b22;
    padding: 10pt;
    margin: 12pt 0;
    font-size: 10pt;
}

.study-question::before {
    content: "STUDY: ";
    font-weight: bold;
    color: #228b22;
}

/* Page Numbers */
.page-number {
    position: absolute;
    bottom: 0.5in;
    right: 1in;
    font-size: 10pt;
    color: #666;
}

/* Navigation - No Print */
.textbook-nav {
    background: #2c3e50;
    color: white;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.textbook-nav a {
    color: #3498db;
    text-decoration: none;
    margin: 0 15px;
}

.textbook-nav a:hover {
    color: #5dade2;
    text-decoration: underline;
}

/* Emphasis Styles */
strong {
    font-weight: bold;
    color: #1a1a1a;
}

em {
    font-style: italic;
}

/* Scene Breaks */
hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 0.3in 2in;
}

/* Dialogue */
.dialogue {
    margin-left: 0.2in;
}

/* Character Thoughts */
.thought {
    font-style: italic;
}

/* Footer */
.chapter-footer {
    margin-top: 0.5in;
    padding-top: 12pt;
    border-top: 2px solid #ccc;
    font-size: 9pt;
    text-align: center;
    color: #666;
}
