:root {
    --page-background: #f5f5f5;
    --page-text: #1d1d1b;
    --link-color: #243e72;
    --box-background: #ffffff;
    --box-text: #000000;
    --border-color: #9c998f;
    --input-background: #fffefa;
    --input-border: #777;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--page-background);
    color: var(--page-text);
    font-family: Georgia, serif;
    font-size: 18px;
    line-height: 1.55;
}

a {
    color: var(--link-color);
}

.header,
.footer,
.content-layout,
.home-content {
    width: min(100% - 2rem, 960px);
    margin-right: auto;
    margin-left: auto;
}

.header,
.footer,
.main-box,
.sidebar-box,
.home-content {
    border-bottom: 1px ridge var(--border-color);
    border-right: 1px ridge var(--border-color);
}

.header,
.footer {
    background: var(--box-background);
    color: var(--box-text);
    padding: 1rem;
}

.header {
    margin-bottom: 0.5rem;
}

.home-content,
.main-box,
.sidebar-box {
    background: var(--box-background);
}

.header a {
    color: var(--box-text);
    margin-right: 1rem;
}

.home-content {
    flex: 1;
    min-height: 70vh;
    padding: 3rem;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    /* gap: 2rem; */
    flex: 1;
}

.main-box,
.sidebar-box {
    padding: 2rem;
}

main article {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

aside {
    font-size: 0.9em;
}

aside h2 {
    font-size: 1em;
    margin-top: 0;
}

aside ul {
    padding-left: 1.2rem;
}

input,
textarea,
button {
    font: inherit;
}

input,
textarea {
    display: block;
    width: 100%;
    border: 1px solid var(--input-border);
    background: var(--input-background);
    padding: 0.45rem;
}

button {
    border: 1px solid var(--box-background);
    background: var(--box-background);
    color: var(--box-text);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
}

.footer {
    margin-top: 2rem;
}

@media (max-width: 650px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    aside {
        margin-top: 0;
    }
}