:root {
    --bg: #fafaf7;
    --fg: #1a1a1a;
    --muted: #666;
    --accent: #2e6cdf;
    --border: #e2e2dc;
    --card: #ffffff;
}

* { box-sizing: border-box; }

body {
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--fg);
    margin: 0;
}

main {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}

nav.topnav {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: baseline;
}

nav.topnav .brand {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fg);
    text-decoration: none;
    margin-right: auto;
}

nav.topnav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

nav.topnav a:hover,
nav.topnav a.active {
    color: var(--accent);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem 0; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; margin-top: 2rem; }
h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }

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

.muted { color: var(--muted); }
.small { font-size: 13px; }

.card {
    background: var(--card);
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.card > h2:first-child,
.card > h3:first-child { margin-top: 0; }

.flash {
    background: #e8f4ea;
    border: 1px solid #b8d9c0;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.flash.error { background: #f8e0e0; border-color: #e0b0b0; }

label {
    display: block;
    margin: 1rem 0 0.25rem;
    font-weight: 500;
    font-size: 13px;
}

input, textarea, select {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font: inherit;
    background: white;
}

textarea { min-height: 5rem; resize: vertical; }

.actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.25rem;
}

button, .btn {
    background: var(--accent);
    color: white;
    border: 0;
    padding: 0.55rem 1.1rem;
    border-radius: 4px;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button.secondary, .btn.secondary {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border);
}

button.danger, .btn.danger { background: #c04040; }

table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 0.55rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 500;
}

tbody tr:last-child td { border-bottom: 0; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #eee;
    color: var(--fg);
}
.badge.YES      { background: #d0e9d0; }
.badge.NO       { background: #f0d0d0; }
.badge.MAYBE    { background: #f0e5c0; }
.badge.WAITLIST { background: #d0d9f0; }
.badge.PENDING  { background: #eeeeee; color: var(--muted); }
.badge.DRAFT    { background: #e5e5e5; }
.badge.OPEN     { background: #d0e9d0; }
.badge.CLOSED   { background: #d0d9f0; }
.badge.CANCELLED{ background: #f0d0d0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.stats .stat { min-width: 4rem; }
.stats .stat .n { font-size: 1.5rem; font-weight: 600; display: block; }
.stats .stat .l { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }

.token-link { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; word-break: break-all; }

form.inline { display: inline; margin: 0; }
form.inline button { padding: 0.25rem 0.5rem; font-size: 12px; }

.rsvp-hero {
    text-align: center;
    padding: 2rem 1rem;
}
.rsvp-hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.rsvp-choices {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}
.rsvp-choices button { min-width: 5rem; font-size: 1rem; padding: 0.75rem 1.25rem; }
