/* Layout: the boxes sit in a grid that fills the window.
   3 columns on a desktop, 2 on a tablet (the ninth box then spans the row), 1 on a phone.
   Overrides the fixed 410 px floats of main.css. */
.boxes {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0 0 20px;
}
@media (min-width: 760px) {
    .boxes { grid-template-columns: repeat(2, 1fr); }
    .boxes .box:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1180px) {
    .boxes { grid-template-columns: repeat(3, 1fr); }
    .boxes .box:last-child { grid-column: auto; }
}

.boxes .box {
    float: none;
    width: auto;
    height: auto;
    margin: 0;
    padding: 14px 16px 10px;
    min-width: 0;
}

.boxes textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 200px;
    margin: 0;
    resize: vertical;
}

/* the <br> after each textarea plus floated buttons: keep buttons in the box */
.boxes .box br { display: none; }
.boxes .box .button {
    float: none;
    display: inline-block;
    margin: 10px 8px 4px 0;
}

header { padding-right: 52px; }

@media (max-width: 759px) {
    body { margin: 0; }
    header { margin: 12px 12px 10px; font-size: 100%; }
    header h1 { font-size: 2.2em; line-height: 1.15; }
    header h2 { font-size: 1.15em; line-height: 1.3; margin: 4px 0 0; }
    .boxes .box { padding: 12px; }
    .boxes textarea { height: 160px; }
    footer { margin: 0 12px; }
}
