:root {
    --ink: #1c1612;
    --ink-soft: #3c332b;
    --paper: #f3eee6;
    --paper-2: #fffaf3;
    --line: #e4d6c6;
    --gold: #e0a11a;
    --stamp: #d24b2e;
    --stamp-dark: #b33b22;
    --pine: #1f6f62;
    --muted: #6f655b;
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Outfit", "Segoe UI", sans-serif;
    --shadow: 0 18px 40px rgba(48, 32, 14, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.05rem;
    line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--stamp-dark); }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.35rem; }
p { margin: 0 0 0.8rem; }
code { font-family: Consolas, monospace; font-size: 0.92em; }

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--gold);
    color: var(--ink);
    padding: 0.5rem 0.8rem;
    z-index: 30;
}
.skip-link:focus { top: 0.5rem; }

.wrap { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.narrow { width: min(720px, calc(100% - 2rem)); }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.site-header {
    background: var(--ink);
    color: var(--paper);
    position: sticky;
    top: 0;
    z-index: 20;
}
.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.4rem;
    position: relative;
}
.brand { display: flex; align-items: center; gap: 0.7rem; color: inherit; text-decoration: none; }
.brand-mark {
    width: 1.8rem;
    height: 1.35rem;
    border-radius: 0.35rem;
    background:
        radial-gradient(circle at 50% 50%, transparent 0.28rem, var(--stamp) 0.32rem 0.48rem, transparent 0.52rem),
        linear-gradient(var(--paper), var(--paper));
    box-shadow: inset 0 0 0 2px var(--paper);
}
.brand-name { font-family: var(--serif); font-size: clamp(1rem, 2.5vw, 1.28rem); letter-spacing: -0.03em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav a, .nav-logout button {
    color: var(--paper);
    text-decoration: none;
    font-size: 0.98rem;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}
.site-nav a.is-active { color: var(--gold); }
.nav-toggle {
    display: none;
    background: transparent;
    color: var(--paper);
    border: 1px solid rgba(243, 238, 230, 0.35);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font: inherit;
    cursor: pointer;
}

.hero { background: var(--ink); color: var(--paper); padding: 1.5rem 0 3.5rem; }
.hero h1, .hero p { color: var(--paper); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 2rem; align-items: end; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.8rem;
}
.lede { font-size: 1.15rem; max-width: 42rem; color: var(--ink-soft); }
.hero .lede { color: #e7dccc; }
.search-bar {
    display: flex;
    gap: 0.4rem;
    background: var(--paper-2);
    border-radius: 999px;
    padding: 0.35rem 0.35rem 0.35rem 1.1rem;
    margin: 1.3rem 0 0.9rem;
}
.search-bar input {
    flex: 1;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 1.05rem;
    min-width: 0;
    color: var(--ink);
}
.search-bar input:focus { outline: none; }
.search-bar:focus-within { box-shadow: 0 0 0 3px rgba(224, 161, 26, 0.55); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chips a {
    color: var(--paper);
    text-decoration: none;
    border: 1px solid rgba(243, 238, 230, 0.28);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.92rem;
}
.chips a:hover { border-color: var(--gold); color: var(--gold); }
.hero-ticket {
    background: var(--paper-2);
    color: var(--ink);
    border-radius: 1.2rem;
    padding: 1.3rem 1.3rem 1.1rem;
    box-shadow: var(--shadow);
    transform: rotate(1.5deg);
}
.hero .hero-ticket p { color: var(--ink-soft); }
.hero .hero-ticket .hero-ticket-kicker { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem; font-weight: 700; color: var(--stamp-dark); }
.hero .hero-ticket .hero-ticket-title { font-family: var(--serif); font-size: 1.7rem; line-height: 1.15; color: var(--ink); }

.page-intro { padding: 2.5rem 0 0.5rem; }
.page-intro .lede, .prose, .letter p { color: var(--ink-soft); }
.results { padding: 2rem 0 4rem; }
.result-head h2 { margin-bottom: 0.25rem; }
.result-count, .fine, .place { color: var(--muted); }
.fine { font-size: 0.92rem; }
.ticket-grid { display: grid; gap: 1rem; }
.ticket {
    display: grid;
    grid-template-columns: 92px 1fr;
    background: var(--paper-2);
    border-radius: 1.1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.ticket-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--paper-2);
    gap: 0.35rem;
}
.ticket-rail strong { font-family: var(--serif); font-size: 1.45rem; letter-spacing: 0.04em; }
.ticket-rail small { letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.68rem; }
.ticket-body { padding: 1.05rem 1.15rem 1rem; border-left: 1px dashed var(--line); }
.ticket h3 { margin-top: 0.35rem; }
.ticket h3 a { color: inherit; text-decoration: none; }
.ticket h3 a:hover { color: var(--stamp-dark); }
.summary { min-height: 3.2rem; }
.meta-row, .ticket-actions, .list-actions, .inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
    background: #efe6da;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.badge-direct { background: #e5f3ef; color: var(--pine); }
.badge-link { background: #f8ead8; color: #8a5a16; }
.join-form { display: grid; gap: 0.55rem; margin-top: 0.4rem; }
.join-form input[type="email"] {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 0.7rem 0.9rem;
    font: inherit;
}
.joining-as { margin: 0; font-size: 0.95rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.72rem 1.05rem;
    font: inherit;
    font-weight: 650;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1;
}
.btn-primary { background: var(--stamp); color: white; }
.btn-primary:hover { background: var(--stamp-dark); color: white; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; }
.hero .btn-primary { background: var(--stamp); }

.flash-stack { padding-top: 1rem; display: grid; gap: 0.5rem; }
.flash, .notice, .form-result p, .empty-state {
    border-radius: 0.9rem;
    padding: 0.8rem 1rem;
}
.flash-success, .form-result.is-ok { background: #e7f3ec; color: #14553a; }
.flash-error, .form-result.is-error { background: #fde8e2; color: #8a2d18; }
.flash-info, .notice { background: #f8ead8; color: #6d4b16; }
.empty-state { background: var(--paper-2); box-shadow: var(--shadow); margin-top: 1rem; }
.form-result { margin-top: 0.35rem; }
.form-result p { margin: 0 0 0.35rem; padding: 0; background: transparent; }
.joined-note { font-weight: 600; }

.flow, .split-panels, .stat-grid { display: grid; gap: 1rem; margin: 1.5rem auto 2rem; }
.flow { grid-template-columns: repeat(3, 1fr); }
.flow div, .split-panels article, .stat-grid article, .form-card, .list-card {
    background: var(--paper-2);
    border-radius: 1.1rem;
    padding: 1.15rem 1.2rem;
    box-shadow: var(--shadow);
}
.flow span {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--ink);
    color: var(--gold);
    font-weight: 700;
}
.split-panels { grid-template-columns: 1fr 1fr; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { padding-left: 0.2rem; }
.letter { padding: 2.5rem 0 4rem; }
.letter .drop::first-letter {
    font-family: var(--serif);
    float: left;
    font-size: 3.4rem;
    line-height: 0.8;
    padding-right: 0.45rem;
    color: var(--stamp);
}
.signature { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); }

.form-card, .prose { margin-bottom: 1.2rem; }
.form-card.narrow, .prose.narrow { margin-inline: auto; }
form.form-card, .form-card form, .join-panel { display: grid; gap: 0.45rem; }
label { font-weight: 650; font-size: 0.95rem; }
.optional { font-weight: 500; color: var(--muted); }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    background: white;
    border-radius: 0.8rem;
    padding: 0.75rem 0.85rem;
    font: inherit;
    color: inherit;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); border-color: transparent; }
.check { display: flex; gap: 0.5rem; align-items: center; font-weight: 500; }
.check input { width: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 1rem; }
.amounts { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.4rem; }
.amounts legend { font-weight: 700; margin-bottom: 0.4rem; }
.amount { position: relative; }
.amount input { position: absolute; opacity: 0; }
.amount span {
    display: inline-flex;
    min-width: 4.5rem;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    padding: 0.55rem 0.8rem;
    background: white;
    cursor: pointer;
}
.amount:has(input:checked) span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.turnstile-row { padding-top: 1rem; }

.venue-hero { padding: 2.2rem 0 0.4rem; }
.venue-layout { display: grid; grid-template-columns: 1.5fr 0.8fr; gap: 1.2rem; padding-bottom: 3rem; align-items: start; }
.join-panel { position: sticky; top: 5.4rem; }
.cover, .cover-photo {
    border-radius: 1.1rem;
    min-height: 240px;
    margin-bottom: 1rem;
}
.cover {
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 40%),
        var(--rail, var(--pine));
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.4rem;
}
.cover strong { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.cover-photo { width: 100%; height: 360px; object-fit: cover; }
.event-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.7rem; }
.event-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--line);
}
.event-list span, .venue-facts { color: var(--muted); }
.venue-facts { display: grid; gap: 0.7rem; margin: 0.6rem 0 0; }
.venue-facts div { margin: 0; }
.venue-facts dt { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.7rem; }
.photo-grid img { height: 160px; width: 100%; object-fit: cover; border-radius: 0.8rem; }
.list-stack { display: grid; gap: 0.8rem; padding-bottom: 3rem; }
.list-card { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.list-card h2 { font-size: 1.5rem; }
.list-actions { justify-content: flex-end; }
.unsub-form { display: grid; gap: 0.4rem; }

.stat-grid { grid-template-columns: repeat(4, 1fr); }
.stat-grid strong { display: block; font-family: var(--serif); font-size: 1.8rem; }
.admin-subnav { display: flex; gap: 0.8rem; width: min(1120px, calc(100% - 2rem)); margin: 0 auto 1rem; }
.admin-subnav a { color: var(--ink-soft); text-decoration: none; font-weight: 650; }
.admin-subnav a.is-active { color: var(--stamp-dark); }
.check-list { list-style: none; padding: 0; }
.check-list .is-set { color: var(--pine); }
.check-list .is-missing { color: var(--stamp-dark); }
.table-wrap { overflow-x: auto; width: min(1120px, calc(100% - 2rem)); margin: 0 auto 2rem; }
table { width: 100%; border-collapse: collapse; background: var(--paper-2); border-radius: 1rem; overflow: hidden; }
th, td { text-align: left; padding: 0.75rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.table-actions { display: flex; gap: 0.4rem; }
.table-actions form { margin: 0; }
.admin-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1rem; padding-bottom: 3rem; }
.message-body { white-space: pre-wrap; }
.debug { white-space: pre-wrap; background: white; padding: 1rem; border-radius: 0.8rem; }

.site-footer { background: var(--ink); color: #e7dccc; padding: 2.5rem 0 1.4rem; margin-top: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem; }
.footer-grid a { display: block; color: #e7dccc; text-decoration: none; margin: 0.25rem 0; }
.footer-grid a:hover { color: var(--gold); }
.footer-label { letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.75rem; color: var(--gold); }
.footer-note { border-top: 1px solid rgba(243, 238, 230, 0.15); margin-top: 1.4rem; padding-top: 0.8rem; color: #b7ab9e; font-size: 0.92rem; }
.prose { padding-bottom: 2rem; }
.page .prose:last-child { padding-bottom: 3rem; }

@media (max-width: 900px) {
    .hero-grid, .venue-layout, .split-panels, .flow, .footer-grid, .admin-layout, .form-grid, .stat-grid { grid-template-columns: 1fr; }
    .hero-ticket { display: none; }
    .join-panel { position: static; }
    .list-card { flex-direction: column; align-items: stretch; }
    .nav-toggle { display: inline-flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--ink);
        padding: 0.4rem 1rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .site-nav.is-open { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-ticket { transform: none; }
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
