:root {
    --border: #c9ced6;
    --blue: #eaf0f8;
    --purple: #f3ecf8;
    --gray: #eef0f2;
    --alt: #fafbfc;
    --text: #1f2937;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: #fff;
}

.page {
    max-width: 8.2in;
    margin: 0 auto;
    padding: 0.35in 0.38in;
}

h1 {
    margin: 0 0 12px;
    text-align: center;
    font-size: 24px;
    line-height: 1.15;
}

h2 {
    margin: 14px 0 6px;
    font-size: 17px;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
    line-height: 1.25;
}

th,
td {
    border: 1px solid var(--border);
    padding: 7px 8px;
    vertical-align: top;
}

th {
    font-weight: 700;
    text-align: left;
}

.am th {
    background: var(--blue);
}
.pm th {
    background: var(--purple);
}
.schedule th {
    background: var(--gray);
    text-align: center;
}

tbody tr:nth-child(even) td {
    background: var(--alt);
}

.routine col.step {
    width: 15%;
}
.routine col.product {
    width: 29%;
}
.routine col.notes {
    width: 56%;
}

.schedule {
    font-size: 11px;
    text-align: center;
}

.schedule td:first-child,
.schedule th:first-child {
    text-align: left;
    font-weight: 700;
    width: 16%;
}

.schedule td {
    padding: 6px 4px;
    vertical-align: middle;
}

@media print {
    @page {
        size: letter;
        margin: 0.28in;
    }

    body {
        background: white;
    }

    .page {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 8px;
    }
    h2 {
        font-size: 14px;
        margin: 8px 0 4px;
    }

    table {
        font-size: 10px;
        line-height: 1.15;
    }

    th,
    td {
        padding: 4px 5px;
    }

    .schedule {
        font-size: 9.5px;
    }

    .schedule td {
        padding: 4px 3px;
    }

    h1,
    h2,
    table {
        break-inside: avoid;
    }
}
