/* Shared */

:root {
    font-family: monospace;
    color-scheme: light dark;
}

body {
    margin: 0;
    padding: 2rem;
    font-size: 16px;
    line-height: 1.4;
}

h1,
h2,
h3,
strong,
th,
.stat dd,
.summary dd,
.cups,
.day-number {
    font-weight: 650;
}

.stat dt,
.summary dt {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.75;
}

.stat dd,
.summary dd {
    font-size: 1.1rem;
    line-height: 1.25;
    margin-top: 2px;
}

.total dd {
    font-size: 1.75rem;
}

.combination-count {
    font-size: 0.95rem;
    font-weight: 600;
}

.combination-product {
    font-size: 1.3rem;
    font-weight: 650;
}

.month-total,
.cups,
.summary dd,
.stat dd,
.period-table td:last-child {
    font-variant-numeric: tabular-nums;
}

.month-title {
    font-size: 22px;
}

main {
    margin: 0 auto;
}

.page-index main,
.page-month main,
.page-year main {
    max-width: 1100px;
}

.page-day main {
    max-width: 1000px;
}

.page-day a,
.page-month a {
    color: inherit;
}

.page-index h1 {
    margin-bottom: 2rem;
}

.page-day h1,
.page-month h1 {
    margin-bottom: 0.25rem;
}

.page-day h2,
.page-month h2 {
    margin-top: 0;
    margin-bottom: 2rem;
}

.year-navigation {
    margin-top: 1.75rem;
}

.year-navigation h2 {
    margin: 0 0 1rem;
}

.year-navigation-months {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.4rem 1rem;
}

.historical-navigation {
    margin-top: 1.75rem;
}

.historical-navigation-title {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.historical-years {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

/* Calendar */

.calendar-table .week-number {
    width: 3.5rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    text-align: center;
    vertical-align: middle;
    opacity: 0.75;
}

.month-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.page-index .month-header h2 {
    margin: 0;
}

.month-total {
    font-weight: 600;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar-table th,
.calendar-table td {
    border: 1px solid currentColor;
}

.calendar-table th {
    padding: 0.6rem;
    text-align: center;
    font-size: 0.9rem;
}

.calendar-table td {
    height: 7rem;
    padding: 0.65rem;
    vertical-align: top;
}

.calendar-table td.empty {
    opacity: 0.2;
}

.calendar-table td.future {
    opacity: 0.45;
}

.day-number {
    font-weight: 700;
    font-size: 0.95rem;
}

.cups {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.day-link {
    display: block;
    height: 100%;
    margin: -0.65rem;
    padding: 0.65rem;
    color: inherit;
    text-decoration: none;
}

.day-link:hover {
    background: rgba(127, 127, 127, 0.15);
}

.sunday {
    background: rgba(180, 60, 60, 0.12);
}

.calendar-table td.sunday .day-link:hover {
    background: rgba(180, 60, 60, 0.22);
}

.page-month .month-header {
    margin-top: 3rem;
}

.year-month {
    margin-top: 3rem;
}

/* Index summary */

.page-index .summary {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(120px, 1fr)
        );
    gap: 0.75rem;
    margin-top: 2rem;
}

.page-index .summary div {
    border: 1px solid currentColor;
    padding: 0.8rem;
}

.page-index .summary dd {
    margin: 0.25rem 0 0;
}

/* Period statistics */

.stats {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(220px, 1fr)
        );
    gap: 0.75rem;
}

.stat {
    border: 1px solid currentColor;
    padding: 1rem;
}

.stat dd {
    text-align: right;
}

.featured {
    grid-column: 1 / -1;
    padding: 1.25rem;
}

.featured dt {
    margin-bottom: 1rem;
}

.featured dd {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);
    grid-template-areas:
        "count count"
        "product details";
    column-gap: 3rem;
    row-gap: 0.5rem;
    margin: 0;
}

.combination-count {
    grid-area: count;
    margin: 0;
    text-align: left;;
}

.combination-product {
    grid-area: product;
    margin: 0;
    text-align: left;
}

.combination-details {
    grid-area: details;
    line-height: 1.6;
    text-align: left;
}

/* Period table */

.period-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.period-table th {
    padding: 0.75rem;
    border: 1px solid currentColor;
    text-align: left;
    font-size: 1.13rem;

}
.period-table td {
    padding: 0.75rem;
    border: 1px solid currentColor;
    text-align: left;
    font-size: 0.97rem;
    font-weight: 400;
}

.period-table th:last-child,
.period-table td:last-child {
    text-align: right;
}

/* coffee combination display */

.served-combinations {
    margin-top: 3rem;
}

.served-combinations h3 {
    margin-bottom: 0.75rem;
    font-size: 1.13rem;
}

.combination-table {
    margin-top: 0;
}

.combination-table th:first-child,
.combination-table td:first-child {
    width: 5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.combination-table td:first-child {
    font-weight: 650;
}

.combination-summary span + span::before {
    content: " · ";
}

.combination-table tbody td {
    font-size: 0.97rem;
    font-weight: 400;
}

.combination-product-cell,
.combination-summary {
    font-weight: 400;
}

.combination-table thead th {
    font-size: 1.0rem;
    font-weight: 700;
}

/* for mobile displays */
@media (max-width: 700px) {
    .featured dd {
        grid-template-columns: 1fr;
        grid-template-areas:
            "count"
            "product"
            "details";
    }
}
@media (max-width: 700px) {
    .year-navigation-months {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}