/* ==========================================================================
   local.css — Bored Club local meetup pages (/local/**)

   Loaded AFTER /sections.css. Adds only what the meetup pages need on top of
   the shared network chrome: the local section accent, the third-party policy
   band, schedule lists, venue fact grids and the RSVP card.

   Tokens are inherited from sections.css / index.html (see DESIGN.md). Do not
   redeclare a token here — extend with new component classes only.
   ========================================================================== */

/* Section accent. Follows the same pattern as .section-history / .section-try
   in sections.css; scoped here so sections.css stays untouched. */
.section-local { --accent: #7c3aed; --accent-dark: #6d28d9; --accent-tint: #f5f3ff; }

/* --------------------------------------------------------------------------
   Policy band — third-party / endorsement notice.
   Persistent, above the fold on every page that can surface non-pilot events.
   -------------------------------------------------------------------------- */
.policy-band {
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    color: #713f12;
    font-size: var(--font-size-sm);
    line-height: var(--leading-snug);
    padding: 0.7rem 1.5rem;
}

.policy-band-inner {
    max-width: var(--grid-max);
    margin: 0 auto;
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.policy-band strong { color: #78350f; }

.policy-band .mark {
    flex: none;
    font-weight: 700;
    font-size: var(--font-size-sm);
    line-height: inherit;
}

.policy-band a { color: #78350f; }

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.crumbs {
    max-width: var(--grid-max);
    margin: 0 auto;
    padding: 1rem 1.5rem 0;
    font-size: var(--font-size-sm);
    color: #64748b;
}

.crumbs a { color: #475569; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { padding: 0 0.4rem; color: #94a3b8; }

/* --------------------------------------------------------------------------
   Venue fact grid — the six things a parent needs before they commit
   -------------------------------------------------------------------------- */
/* Column count is set per page from the number of facts, so the last row is
   always full. auto-fit leaves an orphan cell whenever the count and the
   computed column count disagree, and an empty cell in a hairline grid reads
   as a rendering bug. Six facts → 3 across; four facts → 4 across. */
.facts {
    max-width: var(--grid-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(var(--facts-cols, 2), 1fr);
    gap: 1px;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: -1.75rem;
    position: relative;
    z-index: 2;
    max-width: calc(var(--grid-max) - 3rem);
}

.facts-4 { --facts-cols: 4; }
.facts-6 { --facts-cols: 3; }

.fact {
    background: #fff;
    padding: 1.15rem 1.25rem;
}

.fact dt {
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.fact dd {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--color-ink);
    line-height: var(--leading-snug);
}

.fact dd .sub {
    display: block;
    font-weight: 400;
    font-size: var(--font-size-sm);
    color: #475569;
    margin-top: 0.15rem;
}

/* --------------------------------------------------------------------------
   Rule callout — the chaperone requirement. Deliberately loud.
   -------------------------------------------------------------------------- */
.rule {
    max-width: var(--content-max);
    margin: 2rem auto 0;
    padding: 1.25rem 1.4rem;
    background: var(--accent-tint);
    border: 1px solid color-mix(in srgb, var(--accent) 28%, #e2e8f0);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
}

.rule h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--color-ink);
}

.rule p { color: #334155; font-size: var(--font-size-md); }
.rule p + p { margin-top: 0.6rem; }
.rule .cite { font-size: var(--font-size-sm); color: #475569; }

/* --------------------------------------------------------------------------
   Schedule list
   -------------------------------------------------------------------------- */
.schedule {
    max-width: var(--content-max);
    margin: 0 auto;
    list-style: none;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    background: #fff;
    overflow: hidden;
}

.schedule li + li { border-top: 1px solid #eef2f7; }

.schedule a.row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
}

.schedule a.row:hover { background: var(--accent-tint); }
.schedule a.row:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.schedule .when {
    flex: none;
    width: 4.25rem;
    text-align: center;
    font-family: var(--font-display);
    line-height: 1.05;
}

.schedule .when .mon {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

.schedule .when .day {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-ink);
}

.schedule .what { flex: 1; min-width: 0; }

.schedule .what strong {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: 600;
    line-height: var(--leading-snug);
}

.schedule .what span {
    display: block;
    font-size: var(--font-size-sm);
    color: #475569;
}

.schedule .go {
    flex: none;
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--accent-dark);
}

/* --------------------------------------------------------------------------
   Change note — "dates can move, check before you come".

   Deliberately not styled as a warning. This is a standing condition of a free
   volunteer-run meetup, not an alert, and a red box would train people to
   ignore it. Quiet, permanent, and always adjacent to a date — never a
   footnote at the bottom of the page, because the people who most need it are
   the ones who scanned a flyer and never scrolled.
   -------------------------------------------------------------------------- */
.change-note {
    max-width: var(--content-max);
    margin: 1.25rem auto 0;
    padding: 0.9rem 1.1rem;
    background: var(--surface-tint);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    line-height: var(--leading-normal);
    color: #475569;
}

.change-note strong { color: var(--color-ink); font-weight: 600; }
.change-note a { color: var(--accent-dark); }

/* Standalone wrapper for a change note that sits directly under <main> rather
   than inside a .section — .section's top padding is far too large here. */
.note-wrap { max-width: var(--grid-max); margin: 0 auto; padding: 2rem 1.5rem 0; }
.note-wrap .change-note { margin-top: 0; }

/* Inside the tinted CTA band, invert to stay legible on the dark gradient. */
.cta-card .change-note {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.92);
    text-align: left;
}

.cta-card .change-note strong { color: #fff; }
.cta-card .change-note a { color: #fff; }

/* --------------------------------------------------------------------------
   RSVP card
   -------------------------------------------------------------------------- */
.rsvp {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 2rem 1.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    text-align: center;
}

.rsvp h2 {
    font-family: var(--font-display);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.rsvp p { color: #475569; max-width: 48ch; margin: 0 auto 1.4rem; }

.rsvp .btn-primary {
    background: var(--gradient-cta);
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
}

.rsvp .fineprint {
    margin-top: 1rem;
    font-size: var(--font-size-sm);
    color: #64748b;
}

/* RSVP form (progressive enhancement; mailto remains the fallback) */
.rsvp-form {
    text-align: left;
    max-width: 28rem;
    margin: 0 auto 1rem;
    display: grid;
    gap: 0.85rem;
}

.rsvp-form label {
    display: grid;
    gap: 0.3rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-ink);
}

.rsvp-form .hint {
    font-weight: 400;
    color: #64748b;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    font: inherit;
    font-weight: 400;
    font-size: var(--font-size-md);
    color: var(--color-ink);
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    width: 100%;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: var(--shadow-brand-focus);
}

.rsvp-form textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.rsvp-form .row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.rsvp-form .hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.rsvp-form .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.25rem;
}

.rsvp-form .actions .btn-primary {
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 0.7rem 1.15rem;
    border-radius: var(--radius-full);
}

.rsvp-form [data-rsvp-status] {
    font-size: var(--font-size-sm);
    margin: 0;
}

.rsvp-form [data-rsvp-status][data-kind="error"] { color: #b91c1c; }
.rsvp-form [data-rsvp-status][data-kind="ok"] { color: #166534; }

.rsvp-form [data-rsvp-mailto] {
    margin-top: 0.35rem;
    padding: 0.75rem 0.85rem;
    background: var(--accent-tint);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
}

.rsvp-form [data-rsvp-mailto] a {
    color: var(--color-brand);
    font-weight: 600;
}

.rsvp [data-rsvp-success] {
    margin: 0 auto 1rem;
    max-width: 36ch;
    color: #166534;
    font-weight: 600;
}

@media (max-width: 480px) {
    .rsvp-form .row-2 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Prose blocks — recipe, supply lists, what to expect
   -------------------------------------------------------------------------- */
.prose { max-width: var(--content-max); margin: 0 auto; }

.prose h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin: 1.75rem 0 0.6rem;
}

.prose p { color: #334155; }
.prose p + p { margin-top: 0.75rem; }

.prose ul, .prose ol { margin: 0.6rem 0 0 1.25rem; color: #334155; }
.prose li + li { margin-top: 0.35rem; }

.prose .lead { font-size: var(--font-size-lg); color: #475569; }

/* Two-column supply split */
.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.split .panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
}

.split .panel h4 {
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin-bottom: 0.5rem;
}

.split .panel ul { margin-left: 1.1rem; font-size: var(--font-size-sm); }

/* --------------------------------------------------------------------------
   Age badge
   -------------------------------------------------------------------------- */
.ages {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.7rem;
    border-radius: var(--radius-full);
    background: var(--accent-tint);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, #e2e8f0);
    color: var(--accent-dark);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Market list (/local/ hub)
   -------------------------------------------------------------------------- */
.markets {
    max-width: var(--content-max);
    margin: 0 auto;
    list-style: none;
}

.markets li + li { margin-top: 0.75rem; }

.markets a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.35rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.markets a:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, #e2e8f0);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.markets a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.markets .place { flex: 1; }
.markets .place strong { display: block; font-size: var(--font-size-lg); font-weight: 600; }
.markets .place span { display: block; font-size: var(--font-size-sm); color: #475569; }

.pill {
    flex: none;
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
}

.pill-run { background: #dcfce7; color: #166534; }
.pill-open { background: #f1f5f9; color: #475569; }

/* Empty-state row for markets with nothing scheduled */
.markets .empty {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.35rem;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    color: #64748b;
    font-size: var(--font-size-sm);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .facts-4, .facts-6 { --facts-cols: 2; }
}

@media (max-width: 640px) {
    .facts-4, .facts-6 { --facts-cols: 1; }
    .facts { margin-top: 0; border-radius: 0; border-left: 0; border-right: 0; max-width: 100%; }
    .schedule .when { width: 3.4rem; }
    .schedule a.row { padding: 0.9rem 1rem; gap: 0.75rem; }
    .policy-band { padding: 0.65rem 1.1rem; }
}
