@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=IM+Fell+English+SC&display=swap');

:root {
    --paper: #f3e9d2;
    --paper-deep: #e7d9b8;
    --ink: #2a2118;
    --ink-soft: #5a4b3a;
    --brass: #8a6d2f;
    --brass-light: #c9a24b;
    --rule: #3b2f22;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0 10px;
    background: #4a3b2a url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="80" height="80"%3E%3Crect width="80" height="80" fill="%234a3b2a"/%3E%3Cpath d="M0 40h80M40 0v80" stroke="%23443626" stroke-width="1"/%3E%3C/svg%3E');
    color: var(--ink);
    font-family: 'IM Fell English', Georgia, serif;
    font-size: 19px;
    line-height: 1.55;
}

.sheet {
    max-width: 840px;
    margin: 26px auto 60px;
    padding: 30px 40px 24px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.5), transparent 60%),
        radial-gradient(ellipse at 80% 90%, rgba(120,90,40,.14), transparent 55%),
        var(--paper);
    border: 3px double var(--rule);
    box-shadow: 0 3px 22px rgba(0,0,0,.45);
}

a { color: var(--ink); }
a:hover { color: var(--brass); }

/* ---------- masthead ---------- */

.masthead {
    text-align: center;
    border-bottom: 4px double var(--rule);
    padding-bottom: 14px;
}
.masthead h1 {
    font-family: 'IM Fell English SC', serif;
    font-size: 46px;
    letter-spacing: 3px;
    margin: 2px 0 0;
    text-transform: uppercase;
}
.masthead h1 a { text-decoration: none; }
.tagline {
    margin: 2px 0 12px;
    font-style: italic;
    color: var(--ink-soft);
}
.ornament {
    color: var(--brass);
    letter-spacing: 10px;
    font-size: 14px;
}
.masthead nav a {
    font-family: 'IM Fell English SC', serif;
    font-size: 20px;
    text-decoration: none;
    margin: 0 14px;
    padding-bottom: 2px;
}
.masthead nav a.active,
.masthead nav a:hover {
    border-bottom: 2px solid var(--brass);
}

/* ---------- flash & empty ---------- */

.flash {
    margin: 18px auto 0;
    max-width: 560px;
    text-align: center;
    font-style: italic;
    border: 1px solid var(--brass);
    background: var(--paper-deep);
    padding: 10px 16px;
}
.empty { text-align: center; margin: 60px 0; font-style: italic; }
.error { color: #7a1f1f; font-style: italic; }

/* ---------- datelines & entries ---------- */

.dateline {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 44px 0 6px;
}
.dateline::before,
.dateline::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--rule);
    box-shadow: 0 3px 0 -1px var(--rule);
}
.dateline h2 {
    font-family: 'IM Fell English SC', serif;
    font-size: 27px;
    font-weight: normal;
    margin: 0;
    white-space: nowrap;
}
.dateline h2 a { text-decoration: none; }

.entry { margin: 26px 0 40px; }
.entry + .entry {
    border-top: 1px dashed var(--brass);
    padding-top: 28px;
}
.entry h3 {
    font-family: 'IM Fell English SC', serif;
    font-size: 25px;
    font-weight: normal;
    text-align: center;
    margin: 10px 0 4px;
}
.entry .body { text-align: justify; }
.entry .body:first-letter { font-size: 1.6em; line-height: 1; }

.plate { text-align: center; margin: 18px auto 14px; }
.plate img {
    width: 460px;
    max-width: 100%;
    border: 3px solid var(--rule);
    outline: 1px solid var(--rule);
    outline-offset: 5px;
    background: #fff;
    display: inline-block;
}
.plate img.missing { opacity: .8; background: var(--paper-deep); }
.plate figcaption {
    font-style: italic;
    color: var(--ink-soft);
    font-size: 16px;
    margin-top: 10px;
}

.meta {
    text-align: center;
    font-size: 15px;
    color: var(--ink-soft);
    font-style: italic;
}
.controls { display: inline-flex; gap: 4px; margin-left: 10px; }
.controls form { display: inline; }
button.link, a.link {
    background: none;
    border: none;
    padding: 0 6px;
    font: italic 15px 'IM Fell English', Georgia, serif;
    color: var(--brass);
    cursor: pointer;
    text-decoration: underline;
}
button.link:hover, a.link:hover { color: var(--ink); }

.btn-quiet {
    background: none;
    color: var(--ink-soft);
    border-color: var(--ink-soft);
    box-shadow: 0 3px 0 var(--ink-soft);
    margin-left: 12px;
}

/* ---------- archive ---------- */

.page-title {
    font-family: 'IM Fell English SC', serif;
    font-weight: normal;
    text-align: center;
    font-size: 32px;
    margin: 28px 0 6px;
}
ul.days { list-style: none; padding: 0; text-align: center; }
ul.days li { margin: 6px 0; }
ul.days .count { color: var(--ink-soft); font-style: italic; font-size: 16px; }

/* ---------- forms ---------- */

.note { text-align: center; font-style: italic; color: var(--ink-soft); max-width: 560px; margin: 0 auto 24px; }
.paperform { max-width: 620px; margin: 0 auto 30px; }
.paperform.login { max-width: 380px; text-align: center; }
.paperform label { display: block; font-family: 'IM Fell English SC', serif; font-size: 20px; margin: 18px 0 4px; }
.paperform .optional { font-size: 15px; color: var(--ink-soft); }
.paperform input[type="text"],
.paperform input[type="password"],
.paperform textarea {
    width: 100%;
    padding: 10px 12px;
    font: 18px 'IM Fell English', Georgia, serif;
    color: var(--ink);
    background: #faf4e4;
    border: 1px solid var(--rule);
    box-shadow: inset 0 1px 4px rgba(0,0,0,.15);
}
.paperform textarea { resize: vertical; }
.paperform .check { font-family: 'IM Fell English', Georgia, serif; font-size: 16px; font-style: italic; }
.paperform p { text-align: center; }

button[type="submit"], .btn {
    display: inline-block;
    font-family: 'IM Fell English SC', serif;
    font-size: 21px;
    letter-spacing: 1px;
    color: #241b0e;
    background: linear-gradient(var(--brass-light), var(--brass));
    border: 2px solid #4d3a16;
    border-radius: 3px;
    padding: 9px 34px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 3px 0 #4d3a16;
}
button[type="submit"]:hover, .btn:hover { filter: brightness(1.08); color: #241b0e; }
button[type="submit"]:active { transform: translateY(2px); box-shadow: 0 1px 0 #4d3a16; }
button[type="submit"]:disabled { opacity: .6; cursor: wait; }

/* ---------- pager & footer ---------- */

.pager {
    display: flex;
    justify-content: space-between;
    margin: 30px 0 10px;
    font-family: 'IM Fell English SC', serif;
    font-size: 19px;
}
.pager a { text-decoration: none; }

footer {
    margin-top: 46px;
    padding-top: 10px;
    border-top: 4px double var(--rule);
    text-align: center;
    font-style: italic;
    font-size: 15px;
    color: var(--ink-soft);
}

@media (max-width: 640px) {
    body { font-size: 17px; }
    .sheet { padding: 20px 16px; margin-top: 10px; }
    .masthead h1 { font-size: 32px; }
    .masthead nav a { margin: 0 8px; font-size: 17px; }
    .dateline h2 { font-size: 20px; white-space: normal; text-align: center; }
}
