/* Fraunces and Outfit, latin subsets, SIL Open Font License. */
@font-face {
    font-family: "Fraunces";
    src: url("../fonts/fraunces-latin.woff2") format("woff2");
    font-weight: 500 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Outfit";
    src: url("../fonts/outfit-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #1c2430;
    --ink-soft: #4c5968;
    --paper: #f3eee4;
    --paper-deep: #e7dccb;
    --card: #fffdf9;
    --sea: #0e3b48;
    --sea-mid: #1b6572;
    --foam: #d7ebe6;
    --coral: #e15a32;
    --coral-dark: #c2411c;
    --sand: #f0c9a0;
    --gold: #8a5a12;
    --gold-bg: #f8ead2;
    --moss: #1d6b45;
    --moss-bg: #e3f5eb;
    --rose: #9d1c2e;
    --rose-bg: #fde8ea;
    --line: #e3d8c6;
    --shadow: 0 18px 40px rgba(28, 36, 48, 0.08);
    --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
    --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
    --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(1200px 400px at 10% -10%, rgba(215, 235, 230, 0.9), transparent 50%),
        var(--paper);
    font-family: var(--sans);
    font-size: 1.05rem;
    line-height: 1.55;
}
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.12;
}
h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); margin-bottom: 0.6rem; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }
a { color: var(--sea-mid); }
a:hover { color: var(--coral-dark); }
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: var(--paper-deep);
    padding: 0.1em 0.35em;
    border-radius: 6px;
}
code.secret {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.55rem 0.7rem;
    background: var(--sea);
    color: var(--sand);
    word-break: break-all;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--coral);
    color: white;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    z-index: 30;
}
.skip-link:focus { top: 0.7rem; color: white; }

.wrap {
    width: min(var(--wrap), calc(100% - 2rem));
    margin-inline: auto;
}
.narrow { width: min(720px, 100%); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(243, 238, 228, 0.92);
    border-bottom: 1px solid rgba(227, 216, 198, 0.9);
    backdrop-filter: blur(12px);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--ink);
    text-decoration: none;
    font-family: var(--serif);
    font-weight: 650;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}
.logo:hover { color: var(--ink); }
.logo-mark { width: 2rem; height: 2rem; flex: none; }

.nav-toggle {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.nav-button {
    display: none;
    cursor: pointer;
    border: 1.5px solid var(--sea);
    color: var(--sea);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-weight: 650;
}
.nav-links {
    display: flex;
    gap: 0.35rem 1rem;
    align-items: center;
}
.nav-links a:not(.button), .nav-links .linkish { padding: 0.35rem 0; }
.nav-links a, .linkish {
    color: var(--ink);
    text-decoration: none;
    font-weight: 560;
}
.nav-links a.is-current { color: var(--coral-dark); }
.nav-links form { margin: 0; }
.linkish {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}
.count {
    display: inline-grid;
    place-items: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--coral);
    color: white;
    font-size: 0.75rem;
}

.button, button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--coral);
    color: white;
    border: 1.5px solid var(--coral);
    border-radius: 999px;
    padding: 0.85rem 1.25rem;
    font: inherit;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
}
.button:hover, button.button:hover { background: var(--coral-dark); border-color: var(--coral-dark); color: white; }
.button.secondary, button.button.secondary {
    background: transparent;
    color: var(--sea);
    border-color: var(--sea);
}
.button.secondary:hover, button.button.secondary:hover { background: var(--sea); color: white; }
.button.small, button.button.small { padding: 0.65rem 0.95rem; font-size: 0.95rem; }
.button.tiny, button.button.tiny { padding: 0.4rem 0.7rem; font-size: 0.85rem; }
.button.sea { background: var(--sea); border-color: var(--sea); color: white; }
.button.ghost { background: transparent; color: #f6f1e7; border-color: rgba(246, 241, 231, 0.55); }
.button.ghost:hover { background: rgba(246, 241, 231, 0.12); color: white; }
.text-link { font-weight: 650; text-decoration: none; }

.hero {
    background: var(--sea);
    color: #f6f1e7;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
    padding: 4.2rem 0 4.6rem;
}
.hero h1, .hero .lede { color: #f6f1e7; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 40rem; }
.hero .lede { color: #d5e4e1; }
.eyebrow {
    margin-bottom: 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--coral);
}
.hero .eyebrow { color: var(--sand); }
.hero-actions, .row-actions, .filter-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.hero-actions { margin: 1.4rem 0 0.8rem; }
.hero-note { color: #d5e4e1; margin: 0; }

.ticket {
    --notch: var(--sea);
    position: relative;
    background: var(--card);
    color: var(--ink);
    border-radius: 18px;
    padding: 1.4rem 1.4rem 1.2rem;
    box-shadow: var(--shadow);
}
.ticket::before, .ticket::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--notch);
    top: 58%;
}
.ticket::before { left: -11px; }
.ticket::after { right: -11px; }
.ticket-paper { --notch: var(--paper); }
.ticket-kicker, .ticket-place { color: var(--ink-soft); }
.ticket h2 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.perf {
    border-top: 2px dashed var(--line);
    margin: 1rem 0;
}
.ticket-facts, .deal-meta { margin: 0; }
.ticket-facts div, .deal-meta div { margin-bottom: 0.7rem; }
.ticket-facts dt, .deal-meta dt {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.ticket-facts dd, .deal-meta dd { margin: 0; font-weight: 600; }

.section { padding: 4rem 0; }
.section-tight { padding-top: 1.5rem; }
.section-head { margin-bottom: 1.5rem; }
.section-head.split, .split {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
}
.spaced { margin-top: 2.4rem; }
.steps, .type-grid, .deal-grid, .stat-grid, .faq {
    display: grid;
    gap: 1rem;
}
.steps { grid-template-columns: repeat(3, 1fr); list-style: none; padding: 0; margin: 0; }
.steps li, .type-grid article, .stat-grid article, .form-card, .filter-card, .watch-card, .faq article {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.2rem 1.25rem 1.3rem;
}
.steps span {
    display: block;
    font-family: var(--serif);
    font-size: 1.6rem;
    color: var(--coral);
    margin-bottom: 0.4rem;
}
.type-grid { grid-template-columns: repeat(5, 1fr); }
.type-grid h3, .stat-grid p { margin-bottom: 0.35rem; }
.stat-grid { grid-template-columns: repeat(4, 1fr); }
.stat-grid strong {
    font-family: var(--serif);
    font-size: 2.2rem;
    letter-spacing: -0.03em;
}
.deal-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.deal-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.15rem 1.15rem 1rem;
    box-shadow: 0 10px 24px rgba(28, 36, 48, 0.04);
}
.deal-card h3 { font-size: 1.35rem; margin: 0.7rem 0; }
.deal-card h3 a { color: var(--ink); text-decoration: none; }
.deal-card h3 a:hover { color: var(--coral-dark); }
.deal-card .summary { color: var(--ink-soft); flex: 1; }
.deal-card-top, .deal-card-foot, .watch-card header {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: center;
}
.deal-place { margin: 0; color: var(--ink-soft); font-size: 0.92rem; text-align: right; }
.deal-card-foot { margin-top: 0.4rem; align-items: end; }
.price {
    font-family: var(--serif);
    font-size: 1.8rem;
    margin: 0;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.price span, .price-lg span { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0; }
.price-lg { font-size: 2.6rem; }
.pill, .badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--foam);
    color: var(--sea);
    white-space: nowrap;
}
.badge-active, .badge-published, .badge-sent { background: var(--moss-bg); color: var(--moss); }
.badge-paused, .badge-draft, .badge-pending { background: var(--gold-bg); color: var(--gold); }
.badge-archived, .badge-disabled, .badge-failed { background: var(--rose-bg); color: var(--rose); }

.page-hero { padding: 2.6rem 0 0.4rem; }
.closing {
    background: var(--sea);
    color: #f6f1e7;
    padding: 3.5rem 0;
}
.closing h2, .closing p { color: #f6f1e7; }
.closing p { max-width: 40rem; }
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2rem; }
.faq { margin-top: 1rem; }
.detail-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.5rem;
}

.filter-card { margin-bottom: 1.2rem; }
.filter-grid, .split-fields {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}
.filter-grid .span-2 { grid-column: span 2; }
.filter-actions { margin-top: 0.9rem; }
.result-count { color: var(--ink-soft); }
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
.filter-grid .field, .split-fields .field { margin-bottom: 0; }
label { font-weight: 650; font-size: 0.95rem; }
.optional { font-weight: 500; color: var(--ink-soft); }
input, select, textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    background: white;
    color: var(--ink);
    border-radius: 12px;
    padding: 0.75rem 0.8rem;
    font: inherit;
    font-size: 1rem;
}
textarea { resize: vertical; min-height: 9rem; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 2px;
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--rose); }
.field-error { color: var(--rose); margin: 0; font-size: 0.92rem; }
.fine { color: var(--ink-soft); font-size: 0.92rem; }
.form-card .button, .auth-card .button { margin-top: 0.4rem; }

.auth-section { padding: 2.5rem 0 4rem; }
.auth-card {
    width: min(34rem, 100%);
    margin-inline: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 1.5rem 1.4rem 1.6rem;
    box-shadow: var(--shadow);
}
.auth-links { margin: 1rem 0 0; }

.flash-wrap { padding-top: 1rem; }
.flash {
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    margin: 0 0 0.7rem;
}
.flash a { font-weight: 700; }
.flash-success { background: var(--moss-bg); color: var(--moss); }
.flash-error { background: var(--rose-bg); color: var(--rose); }
.flash-info { background: var(--gold-bg); color: var(--gold); }

.empty {
    border: 1.5px dashed var(--sea-mid);
    border-radius: 18px;
    padding: 1.4rem;
    background:
        radial-gradient(circle at 0 50%, transparent 12px, var(--card) 13px) left / 24px 100% repeat-y,
        var(--card);
}
.stack { display: grid; gap: 1rem; }
.watch-card header h3 { margin-bottom: 0; }
.alert-list { list-style: none; padding: 0; margin: 0; }
.alert-list li {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 0.2rem;
}
.alert-list a { font-weight: 700; color: var(--ink); text-decoration: none; }
.alert-list span { color: var(--ink-soft); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
tr:last-child td { border-bottom: 0; }
.inline-form { display: flex; gap: 0.4rem; align-items: center; }
.inline-form select { width: auto; padding: 0.35rem 0.5rem; }

.admin-nav { background: var(--sea); }
.admin-nav-inner { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.55rem 0; }
.admin-nav a {
    color: #d5e4e1;
    text-decoration: none;
    font-weight: 650;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}
.admin-nav a.is-current, .admin-nav a:hover { background: rgba(246, 241, 231, 0.14); color: white; }

.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1.2rem; }
.pager a { font-weight: 700; }

.site-footer {
    border-top: 1px solid var(--line);
    padding: 2.2rem 0 2.8rem;
    color: var(--ink-soft);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 1fr; gap: 1.5rem; }
.footer-name { font-family: var(--serif); color: var(--ink); font-size: 1.4rem; margin-bottom: 0.4rem; }
.footer-label { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
.footer-grid a { display: block; text-decoration: none; margin-bottom: 0.3rem; }
.cf-turnstile { margin: 0.4rem 0 0.8rem; }

@media (max-width: 980px) {
    .hero-grid, .detail-grid, .steps, .deal-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
    .type-grid, .stat-grid { grid-template-columns: 1fr 1fr; }
    .type-grid article:last-child { grid-column: 1 / -1; }
}
@media (max-width: 859px) {
    .header-inner { position: relative; }
    .nav-button { display: inline-flex; }
    .nav-links { display: none; }
    .nav-toggle:checked ~ .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        right: 0;
        top: calc(100% + 0.35rem);
        z-index: 30;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 0.85rem 1rem;
        min-width: 15rem;
        box-shadow: var(--shadow);
    }
    .nav-toggle:focus-visible + .nav-button {
        outline: 3px solid var(--coral);
        outline-offset: 2px;
    }
}
@media (max-width: 720px) {
    .hero-grid, .detail-grid, .steps, .deal-grid, .footer-grid, .type-grid, .stat-grid, .filter-grid, .split-fields {
        grid-template-columns: 1fr;
    }
    .filter-grid .span-2 { grid-column: auto; }
    .section-head.split, .split { flex-direction: column; align-items: start; }
    .hero-grid { padding: 2.4rem 0 2.6rem; }
    .section { padding: 2.6rem 0; }
    .deal-place { text-align: left; }
    .deal-card-top { flex-direction: column; align-items: start; }
    table { min-width: 640px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
::selection { background: var(--sand); color: var(--ink); }
