/* NerdyBeard club sites. Colors and fonts come from /theme.css (per club). */

:root {
  --brand: #1f4e8c; --brand-ink: #fff; --brand-dark: #193f72; --brand-tint: #eef2f8;
  --accent: #e0a526; --accent-ink: #16181d; --accent-dark: #be8c20;
  --header-bg: #fff; --header-ink: #16181d;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: var(--font-body);
  --ink: #16181d; --muted: #5d6470; --line: #e3e6eb; --bg: #ffffff; --bg-soft: #f6f7f9;
  --radius: 14px; --shadow: 0 1px 2px rgb(16 24 40 / .06), 0 8px 24px rgb(16 24 40 / .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 1.0625rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .15em; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { width: min(72rem, 100% - 2rem); margin-inline: auto; }
.container--narrow { width: min(46rem, 100% - 2rem); }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 42rem; margin-inline: auto; }
.muted { color: var(--muted); }
.rounded { border-radius: var(--radius); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .4em; padding: .75em 1.4em; border-radius: 999px; border: 2px solid transparent;
  background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-dark); }
.btn--light { background: #fff; color: #16181d; }
.btn--light:hover { background: #f1f1f1; }
.btn--outline { background: transparent; border-color: currentColor; color: inherit; }
.btn--outline:hover { background: rgb(127 127 127 / .12); }
.btn--small { padding: .4em 1em; font-size: .9rem; }

/* Header */
.site-header { background: var(--header-bg); color: var(--header-ink); border-bottom: 1px solid rgb(127 127 127 / .18); position: sticky; top: 0; z-index: 20; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; font-family: var(--font-head); font-weight: 750; font-size: 1.25rem; }
.brand__logo { height: 2.6rem; width: auto; }
.site-header__inner { position: relative; }
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.site-nav__toggle { display: none; cursor: pointer; padding: .5rem; }
.site-nav__toggle span { display: block; width: 1.4rem; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; }
.nav-toggle:focus-visible + .site-nav__toggle { outline: 3px solid var(--accent); border-radius: 6px; }
.site-nav__links { display: flex; align-items: center; gap: 1.4rem; }
.site-nav__links a:not(.btn) { color: inherit; text-decoration: none; font-weight: 550; opacity: .85; }
.site-nav__links a:not(.btn):hover, .site-nav__links a[aria-current] { opacity: 1; text-decoration: underline; }
@media (max-width: 820px) {
  .site-nav__toggle { display: block; }
  .site-nav__links { display: none; position: absolute; left: -1rem; right: -1rem; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--header-bg); border-bottom: 1px solid rgb(127 127 127 / .18); padding: .5rem 1rem 1rem; box-shadow: var(--shadow); }
  .nav-toggle:checked ~ .site-nav__links { display: flex; }
  .site-nav__links a:not(.btn) { padding: .75rem .25rem; border-bottom: 1px solid rgb(127 127 127 / .15); }
  .site-nav__links .btn { margin-top: .75rem; justify-content: center; }
}

/* Messages */
.messages { list-style: none; padding: 0; margin: 1rem auto; }
.message { padding: .8rem 1rem; border-radius: 10px; margin-bottom: .5rem; background: var(--bg-soft); border: 1px solid var(--line); }
.message--success { background: #e9f7ef; border-color: #b9e4c9; }
.message--error { background: #fdecec; border-color: #f5c2c2; }
.message--warning { background: #fff6e0; border-color: #f3dc9a; }

/* Page header (pages that don't start with a hero) */
.page-head { background: var(--brand-tint); padding: 3.5rem 0 2.5rem; }
.page-head h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }

/* Sections */
main > section, .s-text, .s-split, .s-cards, .s-people, .s-gallery, .s-faq, .s-contact { padding: 4rem 0; }
main > section + section:not(.s-cta):not(.s-hero) { padding-top: 1rem; }
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 1.2em 0; padding: .2em 1em; border-left: 4px solid var(--accent); color: var(--muted); }

.s-hero { position: relative; overflow: hidden; padding: clamp(4rem, 12vw, 8rem) 0; isolation: isolate; }
.s-hero--color { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: var(--brand-ink); }
.s-hero--light { background: var(--brand-tint); }
.s-hero--photo { color: #fff; }
.s-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.s-hero--photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(0 0 0 / .65), rgb(0 0 0 / .25)); }
.s-hero__inner { max-width: 72rem; }
.s-hero h1, .s-hero__title { max-width: 18ch; font-size: clamp(2.2rem, 5.5vw, 4rem); }
.s-hero__sub { font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 40rem; opacity: .92; margin-bottom: 1.8rem; }

.s-split__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.s-split__grid--solo { grid-template-columns: minmax(0, 46rem); }
.s-split--left .s-split__media { order: -1; }
.s-split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: var(--shadow); }
.s-split .btn { margin-top: 1.2rem; }
@media (max-width: 820px) { .s-split__grid { grid-template-columns: 1fr; } .s-split--left .s-split__media { order: 0; } }

.grid { display: grid; gap: 1.5rem; margin-top: 2rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card__body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card__body p { color: var(--muted); }
.card__link { margin-top: auto; font-weight: 650; text-decoration: none; }
.card--link { text-decoration: none; color: inherit; transition: transform .15s; }
.card--link:hover { transform: translateY(-3px); }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 2rem 1.5rem; margin-top: 2rem; }
.person { text-align: center; }
.person__photo { width: 9rem; height: 9rem; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; box-shadow: var(--shadow); }
.person__initials { display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-weight: 750; font-size: 2.2rem; }
.person h3 { margin-bottom: .2em; }
.person__role { color: var(--brand); font-weight: 600; margin-bottom: .5em; }
.person__bio { color: var(--muted); font-size: .95rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin-top: 2rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; transition: opacity .15s; }
.gallery a:hover img { opacity: .88; }
.gallery figcaption { font-size: .9rem; color: var(--muted); margin-top: .4rem; }

.s-cta { padding: 4.5rem 0; }
.s-cta--brand { background: var(--brand); color: var(--brand-ink); }
.s-cta--accent { background: var(--accent); color: var(--accent-ink); }
.s-cta--dark { background: #15171c; color: #fff; }
.s-cta .lead { color: inherit; opacity: .9; margin-bottom: 1.8rem; }

.faq { border: 1px solid var(--line); border-radius: 12px; padding: 0 1.2rem; margin-bottom: .75rem; background: #fff; }
.faq summary { cursor: pointer; font-weight: 650; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); }
.faq[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--muted); padding-bottom: 1rem; margin: 0; }

.s-contact__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: start; }
.contact-list { list-style: none; padding: 1.6rem; margin: 0; background: var(--bg-soft); border-radius: var(--radius); display: grid; gap: 1rem; }
.contact-list li { display: grid; gap: .1rem; }
.contact-list__label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
@media (max-width: 820px) { .s-contact__grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: #15171c; color: #c9ccd2; padding: 2.5rem 0; margin-top: 2rem; }
.site-footer strong { color: #fff; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: flex-end; }
.site-footer p { margin: .3rem 0 0; }
.site-footer__small { font-size: .85rem; opacity: .7; }

/* Editor helpers on the public page */
.edit-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; background: #15171c; color: #fff; padding: .7rem 1.2rem; border-radius: 999px; text-decoration: none; font-weight: 650; box-shadow: var(--shadow); z-index: 30; }
.preview-bar { background: #fff4d6; color: #5c4400; text-align: center; padding: .5rem; font-size: .9rem; font-weight: 600; }

/* Simple content pages (invitations, notices) and sign-in screens */
.content-page { padding: 3rem 0; }
.auth-page { padding: 3rem 0 4rem; display: grid; justify-items: center; gap: 1rem; }
.auth-card { width: min(30rem, 100%); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.auth-card h1 { font-size: 1.8rem; }
.account-links { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center; font-size: .95rem; }

/* Forms (sign-in screens and simple pages) */
label { font-weight: 600; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input:not([type]), select, textarea {
  width: 100%; font: inherit; padding: .65rem .8rem; border: 1px solid #cfd4dc; border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); border-color: var(--brand); }
form p, form .field { margin-bottom: 1rem; }
button, input[type=submit] { font: inherit; }
.auth-card button, .content-page button { display: inline-flex; padding: .7em 1.4em; border-radius: 999px; border: 0; background: var(--brand); color: var(--brand-ink); font-weight: 650; cursor: pointer; }
.auth-card button:hover, .content-page button:hover { background: var(--brand-dark); }
.helptext, .auth-card small { color: var(--muted); font-size: .88rem; }
.errorlist { color: #b42318; padding-left: 1.1em; margin: .3rem 0; font-size: .92rem; }
.auth-card ul:not(.errorlist) { padding-left: 1.2em; }

/* 2FA reminder */
.reminder { background: #fff8e6; border-bottom: 1px solid #f3dc9a; color: #4d3800; font-size: .95rem; }
.reminder__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; flex-wrap: wrap; }
.reminder__actions { display: flex; gap: .5rem; align-items: center; }
.reminder__actions form { margin: 0; }
.reminder .btn--outline { color: #4d3800; }

/* Your account */
.account { padding: 2.5rem 0 4rem; }
.account h1 { font-size: 2rem; margin-bottom: .3rem; }
.account__intro { color: var(--muted); margin-bottom: 2rem; }
.account-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem; overflow: hidden; }
.account-section > h2 { font-size: 1.1rem; margin: 0; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); }
.account-row { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); }
.account-row:last-child { border-bottom: 0; }
.account-row__text { flex: 1; min-width: 0; }
.account-row__text strong { display: block; }
.account-row__text span { color: var(--muted); font-size: .92rem; }
.status { display: inline-block; font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; margin-left: .4rem; vertical-align: middle; }
.status--on { background: #e3f5ea; color: #17663a; }
.status--off { background: #eceef2; color: #4b5260; }
.status--rec { background: #e6eefc; color: #1f4e8c; }
.account-callout { padding: 1rem 1.4rem; background: #e9f7ef; color: #17663a; font-weight: 600; }
.account-callout--warn { background: #fff8e6; color: #4d3800; }
@media (max-width: 600px) { .account-row { flex-direction: column; align-items: flex-start; } }

/* Family screens */
.form-body { padding: 1.2rem 1.4rem; }
.form-body p { margin-bottom: 1rem; }
.form-body label:not(.radio):not(.check) { display: block; margin-bottom: .3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.input--short { max-width: 9rem; }
.radio, .check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; margin-bottom: .6rem; }
.radio input, .check input { width: auto; margin-top: .35rem; }
.terms { background: var(--bg-soft); border-radius: 10px; padding: 1rem; font-size: .95rem; color: #39404b; }
.family-form:has(input[value=profile]:checked) .sign-in-fields { display: none; }
code { font-family: ui-monospace, monospace; background: var(--bg-soft); padding: .05rem .35rem; border-radius: 5px; font-size: .92em; }
.btn--danger-solid { background: #b42318; color: #fff; }
.btn--danger-solid:hover { background: #8f1c13; }
.account a.btn--danger { color: #b42318; }
.form-body .helptext { display: block; margin-top: .3rem; }

/* Training */
.training { padding: 2.5rem 0 4rem; }
.training h1 { font-size: 2rem; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin: 1rem 0 1.5rem; overflow-x: auto; }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a[aria-current] { color: var(--brand); border-bottom-color: var(--brand); }
.stat-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.4rem; margin-bottom: 1.5rem; }
.stat-panel__head { display: flex; justify-content: space-between; align-items: baseline; }
.stat-panel__head h2 { font-size: 1.2rem; margin: 0 0 .8rem; }
.training .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.training .stat { background: var(--bg-soft); border-radius: 12px; padding: .9rem 1rem; display: grid; }
.training .stat__value { font-size: 1.7rem; font-weight: 750; line-height: 1.1; }
.training .stat__label { color: var(--muted); font-size: .85rem; }
.chart { width: 100%; height: auto; display: block; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__label { fill: var(--muted); font-size: 11px; }
.chart__line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; }
.chart__dot { fill: #fff; stroke: var(--brand); stroke-width: 2; }
.chart__dot--match { fill: var(--accent); stroke: var(--accent-dark); }
.chart__key { font-size: .85rem; display: flex; align-items: center; gap: .4rem; }
.chart__swatch { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid var(--brand); background: #fff; }
.chart__swatch--match { background: var(--accent); border-color: var(--accent-dark); margin-left: .6rem; }
.section-title { font-size: 1.3rem; margin-top: 2rem; }
.score-format { font-size: 1.1rem; font-weight: 500; }
.series { display: flex; flex-wrap: wrap; gap: .4rem; }
.series span { background: var(--bg-soft); border-radius: 6px; padding: .1rem .5rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.form-body select { width: 100%; font: inherit; padding: .6rem .7rem; border: 1px solid #cfd4dc; border-radius: 10px; background: #fff; }
.form-body textarea { width: 100%; }
fieldset.match-only { border: 0; padding: 0; margin: 0; }
form:has(input[name=kind][value=practice]:checked) fieldset.match-only { display: none; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.inline-form .input { width: auto; flex: 1 1 10rem; }
.input--tiny { width: 5rem !important; }
.formats td { padding: .4rem .5rem; }
.training .table, .account .table { background: #fff; }
.training .table-wrap { overflow-x: auto; }

/* Shared components (site and Manage) */
.badge { display: inline-block; font-size: .78rem; font-weight: 650; padding: .2rem .6rem; border-radius: 999px; background: #eceef2; color: #39404b; white-space: nowrap; }
.badge--live { background: #e3f5ea; color: #17663a; }
.badge--draft { background: #fff1d1; color: #7a5300; }
.badge--changes { background: #e6eefc; color: #1f4e8c; }
.badge--members { background: #f1e8fb; color: #5b2b8c; }

/* Tables */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fafbfc; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
/* Page cards (Manage -> Pages) */
.page-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.page-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.page-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.page-card h3 { margin: 0; font-size: 1.15rem; }
.page-card__url { color: var(--muted); font-size: .9rem; font-family: ui-monospace, monospace; }
.page-card__meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: auto; padding-top: .5rem; }
.page-card__when { color: var(--muted); font-size: .82rem; }


/* Scorecard (full shot entry) */
.scorecard { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; background: var(--bg-soft); }
.scorecard > summary { cursor: pointer; font-weight: 650; }
.scorecard[open] > summary { margin-bottom: .6rem; }
.scorecard [data-scoring] { display: none; }
.scorecard[data-scoring="whole"] [data-scoring="whole"], .scorecard[data-scoring="decimal"] [data-scoring="decimal"],
.scorecard[data-scoring="hit_miss"] [data-scoring="hit_miss"] { display: inline; }
.scorecard__grid { display: grid; gap: .35rem; overflow-x: auto; padding-bottom: .3rem; }
.scorecard__row { display: flex; align-items: center; gap: .25rem; }
.scorecard__label { width: 4.6rem; flex: none; font-size: .82rem; color: var(--muted); font-weight: 600; }
.scorecard__shot { width: 2.9rem !important; flex: none; text-align: center; padding: .35rem .2rem !important; font-variant-numeric: tabular-nums; }
.scorecard__shot.is-bad { border-color: #b42318 !important; background: #fdecec !important; }
.scorecard__sum { margin-left: .4rem; min-width: 3.5rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.scorecard__total { margin: .6rem 0 0; }
.scorecard__raw { margin-top: .6rem; font-size: .9rem; }
.scorecard__raw textarea { font-family: ui-monospace, monospace; }
.shots-table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.shots-table td, .shots-table th { padding: .2rem .45rem; text-align: center; border-bottom: 1px solid var(--line); }
.shots-table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-align: left; }
.shots-table td.shots-table__sum { font-weight: 750; text-align: right; }
.scorecard__cell { display: inline-flex; flex-direction: column; gap: .15rem; flex: none; }
.scorecard__time { width: 2.9rem !important; text-align: center; padding: .15rem .1rem !important; font-size: .75rem; color: var(--muted); }
.scorecard.is-timed .scorecard__row { align-items: flex-start; }
.scorecard.is-timed .scorecard__label, .scorecard.is-timed .scorecard__sum { padding-top: .45rem; }
.scorecard__timed-note, .scorecard__times-raw { display: none; }
.scorecard.is-timed .scorecard__timed-note { display: inline; }
.scorecard.is-timed .scorecard__times-raw { display: block; }
.shots-table__times td, .shots-table__times th { font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--line); }

/* Calendar */
.calendar-page { padding: 2.5rem 0 4rem; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 1.5rem; align-items: start; }
@media (max-width: 960px) { .cal-layout { grid-template-columns: 1fr; } }
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal__head { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.cal__head h2 { margin: 0; font-size: 1.25rem; }
.cal__head .iconbtn { text-decoration: none; font-size: 1.6rem; }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal__dow { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: .4rem 0; border-bottom: 1px solid var(--line); }
.cal__day { min-height: 6.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .3rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cal__day:nth-child(7n) { border-right: 0; }
.cal__day--out { background: var(--bg-soft); }
.cal__day--out .cal__num { color: #a0a6b0; }
.cal__num { font-size: .8rem; font-weight: 650; }
.cal__day--today .cal__num { background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: .05rem .45rem; align-self: flex-start; }
.cal__event { display: block; font-size: .75rem; line-height: 1.25; padding: .2rem .35rem; border-radius: 6px; background: var(--brand-tint); color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--brand); }
.cal__event--match { border-left-color: var(--accent); background: #fff6e0; }
.cal__event--social, .cal__event--meeting { border-left-color: #6b7280; background: #f1f3f6; }
.cal__event--cancelled { text-decoration: line-through; opacity: .6; }
.cal__time { font-weight: 700; }
@media (max-width: 700px) { .cal__day { min-height: 3.5rem; } .cal__event { font-size: 0; padding: 0; height: .4rem; border-left-width: 0; background: var(--brand); } }
.cal-upcoming { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.cal-upcoming h2 { font-size: 1.1rem; }
.upcoming { display: flex; gap: .8rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.upcoming__date { display: grid; place-items: center; width: 3rem; flex: none; background: var(--brand-tint); color: var(--brand); border-radius: 10px; padding: .25rem 0; font-size: .75rem; text-transform: uppercase; }
.upcoming__date strong { font-size: 1.2rem; line-height: 1; }
.upcoming__text { display: grid; font-size: .92rem; }
.rsvp-counts { font-size: .9rem; font-weight: 500; }
.segmented { display: inline-flex; flex-wrap: wrap; }
.segmented__opt { font: inherit; font-size: .88rem; padding: .35rem .8rem; border: 1px solid #cfd4dc; background: #fff; cursor: pointer; margin-left: -1px; }
.segmented__opt:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.segmented__opt:last-child { border-radius: 0 8px 8px 0; }
.segmented__opt[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.segmented__opt:disabled { opacity: .45; cursor: default; }
.input--username { margin-top: .4rem; max-width: 16rem; }

/* Volunteers */
.volunteer__slot { flex-wrap: wrap; }
.volunteer__form { display: flex; gap: .4rem; align-items: center; }
.volunteer__form .input { width: 12rem; padding: .4rem .6rem; }
.volunteer-builder .slots td { padding: .4rem .35rem; vertical-align: top; }
.volunteer-builder .slots .input { width: 100%; min-width: 6rem; padding: .4rem .5rem; }
.volunteer-builder .slots .input--tiny { min-width: 4rem; width: 4.5rem; }
.volunteer-builder .table { min-width: 72rem; }
.volunteer-opportunity { text-decoration: none; color: inherit; }
.volunteer-opportunity:hover { background: var(--bg-soft); }
.summary-table { background: #fff; }
.summary-open td { background: #fffaf0; }
.row-actions { display: flex; gap: .3rem; }
.row-actions form { margin: 0; }
@media print {
  .site-header, .site-footer, .no-print, .messages, .edit-fab, .reminder { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .volunteer-summary { padding: 0; width: 100%; }
  .table { box-shadow: none; border: 1px solid #999; }
  .table th, .table td { border-bottom: 1px solid #bbb; padding: .3rem .5rem; }
}

/* Shared buttons */
.btn--ghost { background: transparent; color: #39404b; border-color: transparent; }
.btn--ghost:hover { background: #eceef2; }
.btn--danger { color: #b42318; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.account-row__text > span { display: block; }
.volunteer__form { flex-wrap: wrap; justify-content: flex-end; }
.remind-me { margin: 0; font-size: .88rem; }
.remind-options { display: none; gap: .6rem; align-items: center; font-size: .85rem; }
.volunteer__form:has(input[name=remind_me]:checked) .remind-options { display: flex; flex-wrap: wrap; }
.remind-options .radio { margin: 0; align-items: center; }
.input--when { width: 12rem !important; padding: .25rem .4rem !important; font-size: .85rem; }
.timeline { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.5rem; }
.timeline__head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.timeline__head h2 { margin: 0; font-size: 1.15rem; }
.timeline__legend { display: flex; gap: .4rem .8rem; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--muted); }
.timeline__key { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-right: .25rem; vertical-align: -1px; }
.timeline__chart { overflow-x: auto; }
.timeline__chart svg { max-width: 100%; height: auto; }
@media print { .timeline { border: 0; padding: 0; page-break-inside: avoid; } .timeline__chart svg { width: 100%; } }
.event-choices { display: grid; gap: .55rem; }
.event-choices label { display: flex; gap: .6rem; align-items: baseline; font-weight: 500; cursor: pointer; }
.event-choices .badge { margin-left: .3rem; }
.managers-panel__actions { display: flex; gap: .6rem; align-items: center; }
.name-inputs { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.name-inputs .input { flex: 1 1 10rem; }
.radio-list { display: flex; flex-direction: column; gap: .3rem; margin-top: .4rem; }
.name-share { display: flex; gap: .5rem; align-items: center; margin-top: .4rem; }
.plans-panel__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.plans-panel__head h2 { margin: 0; }
.plan-session { border-top: 1px solid var(--line); padding: 1rem 1.4rem; }
.plan-session--done { background: #f5fbf7; }
.plan-session__head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.plan-session__head strong { display: block; }
.plan-session__notes, .plan-session__note { margin: .5rem 0; color: var(--muted); }
.plan-session__done { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; }
.plan-session__done .input { flex: 1 1 14rem; }
.plan-session__edit { margin-top: .6rem; }
.plan-session__edit summary, .plan-details-edit summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.plan-add { padding: 1rem 1.4rem; border-top: 1px solid var(--line); }
.plan-details-edit { padding: 1rem 1.4rem; }
.plan-items { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .35rem; }
.plan-items li { display: flex; gap: .55rem; align-items: center; }
.plan-items form { display: contents; }
.plan-items__done { text-decoration: line-through; color: var(--muted); }
.plan-check { width: 1.25rem; height: 1.25rem; border: 2px solid var(--line); border-radius: 5px; background: #fff; padding: 0; cursor: pointer; flex: none; position: relative; }
.plan-check--on { background: var(--brand); border-color: var(--brand); }
.plan-check--on::after { content: ""; position: absolute; left: .3rem; top: .08rem; width: .35rem; height: .65rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
span.plan-check { cursor: default; }
.choice-list { display: grid; gap: .35rem; }
.plan-boxes { display: inline-flex; gap: .3rem; flex: none; }
.plan-boxes form { display: contents; }
.form-builder { display: grid; gap: .45rem; margin: .5rem 0; }
.form-builder__row { display: grid; grid-template-columns: 7.5rem 1fr 6.5rem; gap: .5rem; align-items: center; }
.form-builder__checks { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted); }
.form-builder__checks .input { width: 4rem; }
@media (max-width: 600px) { .form-builder__row { grid-template-columns: 1fr 6.5rem; } .form-builder__row input[name="row_text"] { grid-column: 1 / -1; grid-row: 2; } }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.whole-event { display: flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
[data-time][hidden] { display: none !important; }
.share-warning { color: #8a4b00; font-weight: 600; }
.chart__line--faint { stroke-opacity: .35; stroke-width: 1.5; }
.chart__rolling { fill: none; stroke: var(--accent-dark, #8a5a00); stroke-width: 2.5; stroke-dasharray: 6 4; }
.chart__swatch--rolling { border-radius: 2px; height: .25rem; border: 0; background: var(--accent-dark, #8a5a00); margin-left: .6rem; }
.chart__bar { fill: var(--brand); fill-opacity: .85; }
.analytics__filters { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1rem; }
.analytics__filters label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.analytics__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; }
.analytics__grid .stat-panel__head { flex-direction: column; align-items: flex-start; gap: .2rem; }
.chart--bars .chart__label { font-size: 12px; }
.training .stats--wide { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.download { position: relative; }
.download summary { list-style: none; cursor: pointer; }
.download summary::-webkit-details-marker { display: none; }
.download__panel { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .8rem; display: grid; gap: .5rem; min-width: 16rem; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.download__panel label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.trend--up { color: #17663a; font-weight: 600; }
.trend--down { color: #a1281e; font-weight: 600; }
.survey-q { border: 0; padding: 0 0 1.2rem; margin: 0 0 1.2rem; border-bottom: 1px solid var(--line); min-width: 0; }
.survey-q legend { font-weight: 650; margin-bottom: .5rem; padding: 0; }
.survey-q__req { color: #a1281e; }
.survey-q--error legend { color: #a1281e; }
.survey-q__error { color: #a1281e; font-weight: 600; margin: .2rem 0 .5rem; }
.rating { display: flex; gap: .4rem; flex-wrap: wrap; }
.rating label { cursor: pointer; }
.rating input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating span { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; }
.rating input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.rating input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.nav-count { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .3rem; border-radius: 999px; background: #fff; color: var(--brand); font-size: .75rem; font-weight: 700; margin-left: .2rem; }
.thread { padding: 0; }
.post { padding: 1rem 1.4rem; border-top: 1px solid var(--line); }
.post:first-child { border-top: 0; }
.post__head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.post__actions { margin-left: auto; }
.post__body { overflow-wrap: anywhere; }
.new-thread { padding: 1rem 1.4rem; border-top: 1px solid var(--line); }
.new-thread summary { list-style: none; display: inline-block; cursor: pointer; }
.new-thread summary::-webkit-details-marker { display: none; }
.group-settings { padding: 1rem 1.4rem; }
.group-settings summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.slot-group { margin-top: .3rem; }
.add-people { padding: 1rem 1.4rem; }
.add-people summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.set-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; margin: .6rem 0 1rem; }
.set-section { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; margin: 0; min-width: 0; }
.set-section legend { font-weight: 700; font-size: .9rem; padding: 0 .3rem; }
.people-pick .input { margin-bottom: .5rem; }
.people-list { max-height: 18rem; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; display: grid; gap: .2rem; }
.people-list [hidden] { display: none; }
.people-pick input[type="search"] { width: 100%; font: inherit; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 9px; }
