:root {
    --bg: #f5f1e8;
    --paper: #fffdf8;
    --paper-2: #f0e8d7;
    --line: #d7c9aa;
    --text: #241c12;
    --muted: #6c604e;
    --link: #5f2e14;
    --link-hover: #8a431e;
    --accent: #7b5b2e;
    --accent-soft: #eee1c5;
    --danger-soft: #f5d8d3;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-header,
.site-footer {
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
}

.site-footer {
    border-top: 1px solid var(--line);
    border-bottom: 0;
    margin-top: 28px;
}

.site-header-inner,
.site-footer .container {
    padding-top: 18px;
    padding-bottom: 18px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .8rem;
}

.site-header h1,
.hero h2,
.hero-compact h2,
h2, h3, h4, h5 {
    margin-top: 0;
    line-height: 1.2;
}

.site-header h1 {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.tagline {
    margin: 0;
    color: var(--muted);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 16px 0 10px;
}

.site-nav a,
a {
    color: var(--link);
    text-decoration: none;
}

.site-nav a:hover,
a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

main.container {
    padding-top: 24px;
}

.hero,
.panel,
.card,
.archive-item,
.year-card,
.calendar-shell {
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(0,0,0,.03);
}

.hero {
    padding: 24px;
    margin-bottom: 24px;
}

.hero-compact {
    padding: 18px 20px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.button-link,
button {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    padding: 8px 14px;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}

.button-link:hover,
button:hover {
    background: var(--link-hover);
    color: #fff;
    text-decoration: none;
}

.button-link-muted {
    background: var(--accent-soft);
    color: var(--text);
    border-color: var(--line);
}

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 20px;
}

.cards,
.archive-list {
    display: grid;
    gap: 12px;
}

.card,
.panel {
    padding: 16px;
}

.card-accent {
    border-left: 4px solid var(--accent);
}

.meta,
.small {
    color: var(--muted);
    font-size: .95rem;
}

.notice {
    padding: 10px 12px;
    background: #eef6ee;
    border: 1px solid #b7d8b7;
    margin-bottom: 16px;
}

.error {
    padding: 10px 12px;
    background: #fbeaea;
    border: 1px solid #dfb3b3;
    margin-bottom: 16px;
}

form {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
}

input[type="text"],
input[type="url"],
input[type="date"],
input[type="password"],
input[type="search"],
select,
textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px;
    margin-top: 4px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    font: inherit;
}

textarea {
    min-height: 120px;
}

.filters .actions {
    margin-top: 12px;
}

.filters .actions a {
    margin-left: 10px;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.year-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.year-card {
    display: grid;
    gap: 4px;
    padding: 14px;
}

.year-card strong {
    font-size: 1.1rem;
}

.year-nav,
.calendar-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    margin: 16px 0 20px;
}

.year-nav > :last-child,
.calendar-nav > :last-child {
    text-align: right;
}

.season-block {
    margin: 24px 0;
}

.season-block h3 {
    padding-bottom: 8px;
    border-bottom: 2px solid var(--line);
}

.month-block {
    margin: 18px 0 0;
}

.archive-item {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
}

.archive-item-cancelled {
    background: #fff8f6;
    border-color: #e0b9b1;
}

.archive-date {
    font-weight: bold;
    color: var(--accent);
}

.archive-content h5 {
    font-size: 1.08rem;
    margin-bottom: 6px;
}

.calendar-shell {
    padding: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

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

.calendar-table th,
.calendar-table td {
    width: 14.28%;
}

.calendar-day {
    min-height: 110px;
}

.calendar-day-number {
    font-weight: bold;
    margin-bottom: 8px;
}

.calendar-events {
    margin: 0;
    padding-left: 18px;
}

.calendar-muted {
    background: #f3eee3;
    color: #8d806d;
}

.pagination {
    margin: 16px 0;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.status-pending,
.status-published,
.status-rejected,
.status-cancelled {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    font-size: .9rem;
}

.inline-form {
    display: inline;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
}

.inline-form button {
    margin: 0 0 0 6px;
    padding: 4px 8px;
}

@media (max-width: 800px) {
    .home-grid,
    .archive-item,
    .year-nav,
    .calendar-nav {
        grid-template-columns: 1fr;
    }

    .year-nav > :last-child,
    .calendar-nav > :last-child {
        text-align: left;
    }

    .calendar-table {
        font-size: .92rem;
    }
}

@media (max-width: 620px) {
    body {
        font-size: 16px;
    }

    .site-header h1 {
        font-size: 1.45rem;
    }

    .hero,
    .panel,
    .card,
    .archive-item,
    .calendar-shell {
        padding: 14px;
    }

    .calendar-day {
        min-height: 80px;
    }

    .calendar-events {
        padding-left: 16px;
    }
}
