/* --- 1. Hard-Code Page Size and Margins --- */
.print-page-container {
    /* US Letter dimensions */
    width: 8.5in;
    height: 11in;
    /* Center the page on screen */
    margin: 0 auto;
    /* Use a white background for print preview */
    background-color: white;
    box-shadow: 0 0 0.5in rgba(0, 0, 0, 0.2); /* Visual aid for the page edge */
    /* Add padding for the content area inside the page boundary */
    padding-top: 0.25in;
    padding-bottom: 0.5in;
    position: relative; /* Needed for book-spine-text absolute positioning */
}

.page-content {
    margin-top: .75em;
    padding-top: 0.25in;
}

.header-content {
    display: flex;
    align-items: center;
    position: absolute;
    top: 0.25in;
    width: auto;
    height: 1.5em;
    font-size: 14pt; /* Make it look like a header */
    font-weight: bold;
    color: #333;
}

.page-number {
    font-size: 10pt;
    font-weight: normal;
    color: #999999; /* Use a light grey for subtlety */
    margin: 0 5px;
    white-space: nowrap;
    order: 0;
}

.page-number, .page-title {
    padding: 0;
    white-space: nowrap;
    order: 0;
}

.page-title {
    flex-grow: 1;
    text-align: center;
}

.page-left {
    padding-right: 0.75in; /* BINDING/PUNCH HOLE MARGIN (Left side) */
    padding-left: 0.5in; /* Outer margin */
}

.page-left .header-content {
    right: .75in; /* Binding margin  */
    left: .5in; /* Outer margin  */
}

.page-left .page-number {
    order: -1;
    text-align: left;
}

.page-left .page-title {
    order: 1;
}

.page-right {
    padding-right: 0.5in; /* Outer margin */
    padding-left: 0.75in; /* BINDING/PUNCH HOLE MARGIN (Right side) */
}

.page-right .header-content {
    right: .5in; /* Outer margin */
    left: .75in; /* Binding margin on the  */
}

.page-right .page-number {
    order: 1; /* Puts the number last (on the right) */
    text-align: right;
}

.page-right .page-title {
    order: -1; /* Puts the title first (on the left side of the number) */
}

.instructions-row {
    --bs-gutter-x: 0.5in; /* Example gutter width */
}

.figure-image {
    height: 4.5in;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.1in; /* Space between image and caption */
}
.figure-image-single {
    height: 7.5in;
    display: flex;
    justify-content: center;
    align-items: center;
}
.figure-img {
    max-width: 100%;
    max-height: 100%;
    height: auto; /* Ensures aspect ratio is maintained based on the height constraint */
    width: auto;
    display: block;
}

.figure-caption {
    /* Style for FIGURE A / FIGURE B text */
    font-size: 0.75em;
    color: #666666;
    margin-bottom: 0.125in; /* Space between caption and instructions */
}

.draft-step {
    /* Use flexbox to align the icon and text horizontally */
    display: flex;
    align-items: flex-start; /* Aligns the icon to the top of the text block */
    line-height: 1.4; /* Improves readability */
}

.step-list {
    margin-bottom: .1in;
}

.tool-icon-block {
    width: 0.15in;
    flex-shrink: 0; /* Prevents it from shrinking */
    margin-right: 0.08in; /* Space between icon and text */
    margin-top: .03in;
}

.tool-icon {
    width: 100%;
    height: auto;
    display: block;
}

.tool-ref {
    font-style: italic;
    color: #666666; /* Light Grey */
    font-size: 9.5pt;
    margin-right: 0.15in;
    flex-shrink: 0;
}

.point-ref {
    font-weight: bold;
    color: #0066CC; /* Medium Blue Accent Color */
    margin-right: 0.2in;
    flex-shrink: 0;
}

.instruction-text-block {
    color: #333333;
    font-weight: normal;
    font-size: 10.5pt;
    line-height: 1.4;
    margin: 0; /* Removes default <p> tag margins */
}
.single-instr-col{
    padding-top: 1.25in;
}
#infoPage p {
    color: #333;
    font-size: 10.5pt;
    line-height: 1.4;
}

.info-key {
    color: #333;
    font-size: 13pt;
    font-weight: 600;
}

#infoPage li {
    color: #333;
    font-size: 10.5pt;
    font-weight: normal;
    line-height: 1.4;
}

#infoPageImgs {
    margin-top: 80px;
}

#bookTitle {
    color: #377c20;
    font-size: 25pt;
    font-weight: 700;
}

#draftName {
    color: #377c20;
    font-size: 16pt;
    font-weight: 500;
}

#coverPage p {
    font-style: italic;
}

#coverPage {
    margin-top: 80px;
}

.continuation {
    padding-left: 0.4in; /* Must equal tool-icon-block width + margin-right */
}

.tool-ref-blue {
    font-weight: 600;
    color: #9e3939;
    font-size: 10.5pt;
}

.tool-entry {
    font-weight: 450;
    font-style: italic;
    color: #000000;
    font-size: 10.5pt;
}

.page-footer {
    position: absolute;
    bottom: 0.3in; /* Distance from bottom page edge */
    left: 0.75in; /* Aligned with content start */
    right: 0.75in; /* Aligned with content end */
    text-align: center;
    width: 7in; /* 8.5 - 1.25 - 0.75 = 6.5in content width */
    font-size: 8pt;
}

.book-spine-text {
    position: absolute;
    right: 0.1in; /* Place it inside the outer margin */
    top: 50%;
    transform: rotate(90deg) translateY(-50%);
    transform-origin: 100% 50%; /* Pivot point to rotate up/left */
    font-size: 8pt;
    color: #0066CC; /* Your accent color */
    width: 11in; /* Needs to be wide to span the height of the page when rotated */
    text-align: center;
}

@media print {
    @page {
        size: letter portrait;
        margin: 0;
    }

    body {
        margin: 0;
        padding: 0;
        color: #000 !important;
    }

    .print-page-container {
        box-shadow: none;
        margin: 0;
        position: relative; /* Keep for header/footer positioning (if needed) */
    }

    .page-footer {
        position: static !important;
        bottom: auto;
        left: auto;
        right: auto;
        width: 100%;
        box-sizing: border-box;
        margin-top: 0.25in;
    }
}
