:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #65737e;
  --paper: #f6f7f8;
  --surface: #ffffff;
  --line: #d7dde2;
  --accent: var(--club-primary, #0b6e69);
  --accent-dark: var(--club-accent, #07514e);
  --accent-soft: #dff1ef;
  --warn: #986115;
  --shadow: 0 8px 24px rgba(31, 41, 51, .08);
}

* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 320px; }
a { color: var(--accent-dark); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.shell { width: min(100% - 2rem, 1120px); margin: 0 auto; }
.header-inner { min-height: 4.25rem; display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .6rem; padding: .55rem 0; }
.brand { align-items: center; color: var(--ink); display: inline-flex; font-weight: 800; gap: .55rem; letter-spacing: -.02em; text-decoration: none; font-size: 1.15rem; min-width: 0; }
.brand-mark { align-items: center; background: var(--club-primary, var(--accent)); border-radius: .45rem; color: #fff; display: inline-flex; flex: 0 0 auto; font-size: .78rem; font-weight: 850; height: 2.15rem; justify-content: center; letter-spacing: .04em; width: 2.15rem; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong { line-height: 1.1; }
.brand-copy small { color: var(--muted); font-size: .68rem; font-weight: 650; letter-spacing: 0; line-height: 1.2; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { align-items: center; display: flex; flex: 0 0 auto; gap: .75rem; margin-left: auto; }
.nav-actions { display: flex; align-items: center; gap: .9rem; }
.nav-actions form { margin: 0; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--accent-dark); cursor: pointer; font: inherit; }
.language-selector { align-items: center; display: flex; flex: 0 0 auto; gap: .35rem; margin-left: auto; white-space: nowrap; }
.language-form { flex: 0 0 auto; margin: 0; }
.language-button { align-items: center; background: transparent; border: 1px solid transparent; border-radius: .35rem; cursor: pointer; display: inline-flex; font-size: 1.75rem; justify-content: center; line-height: 1; min-height: 2.85rem; min-width: 2.85rem; padding: .3rem; }
.language-button:hover, .language-button:focus-visible, .language-button.is-active { background: var(--accent-soft); border-color: var(--accent); outline: none; }
.main-content { padding: 2rem 0 4rem; }
.hero { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: clamp(1.5rem, 5vw, 3rem); }
.compact-hero { max-width: 760px; }
.eyebrow { color: var(--accent-dark); font-size: .75rem; font-weight: 800; letter-spacing: .1em; margin: 0 0 .8rem; text-transform: uppercase; }
h1, h2 { line-height: 1.15; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 7vw, 3.6rem); margin: 0 0 1rem; max-width: 16ch; }
h2 { font-size: 1.25rem; margin: 0; }
.lede { color: var(--muted); font-size: 1.1rem; line-height: 1.55; max-width: 58ch; }
.hero-actions, .form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.button { align-items: center; background: var(--accent); border: 1px solid var(--accent); border-radius: .45rem; color: #fff; cursor: pointer; display: inline-flex; font: inherit; font-weight: 750; justify-content: center; min-height: 2.85rem; padding: .65rem 1rem; text-decoration: none; }
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.secondary { background: var(--surface); color: var(--accent-dark); }
.button-small { min-height: 2.35rem; padding: .45rem .75rem; font-size: .9rem; }
.feature-grid, .dashboard-grid, .event-layout { display: grid; gap: 1rem; margin-top: 1rem; }
.feature-grid { grid-template-columns: 1fr; }
.feature-grid article, .panel, .form-panel { background: var(--surface); border: 1px solid var(--line); padding: 1.25rem; }
.feature-grid p, .muted, .empty-state, .field small { color: var(--muted); }
.feature-grid p { line-height: 1.5; }
.page-heading { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; }
.page-heading h1 { font-size: clamp(1.8rem, 6vw, 2.7rem); margin-bottom: .35rem; }
.page-heading .eyebrow { margin-bottom: .4rem; }
.panel-heading { align-items: center; display: flex; gap: .75rem; justify-content: space-between; margin-bottom: .75rem; }
.item-list, .roster { list-style: none; margin: 0; padding: 0; }
.list-row, .roster-row { align-items: flex-start; border-top: 1px solid var(--line); display: flex; gap: .75rem; justify-content: space-between; padding: .85rem 0; }
.list-row > div, .roster-row > div { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.row-actions { align-items: flex-end; display: flex; flex-wrap: wrap; gap: .65rem; justify-content: flex-end; }
.badge, .status { background: var(--accent-soft); border-radius: 999px; color: var(--accent-dark); font-size: .78rem; font-weight: 750; padding: .25rem .55rem; white-space: nowrap; }
.status-waitlisted { background: #fff0d8; color: var(--warn); }
.note { color: var(--muted); font-size: .85rem; max-width: 30ch; text-align: right; }
.roster-actions { align-items: flex-end; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.roster-actions form { margin: 0; }
.button-danger { background: #a32929; border-color: #a32929; }
.button-danger:hover { background: #7d2020; border-color: #7d2020; }
.form-panel { margin: 0 auto; max-width: 700px; box-shadow: var(--shadow); }
.form-panel.narrow { max-width: 460px; }
.form-panel h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
.stacked-form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea { background: #fff; border: 1px solid #aeb8c0; border-radius: .35rem; color: var(--ink); font: inherit; min-height: 2.8rem; padding: .65rem .7rem; width: 100%; }
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.error, .form-errors { color: #a32929; font-size: .9rem; }
.form-errors { background: #fff0f0; border: 1px solid #e3b2b2; padding: .7rem; }
.messages { margin-bottom: 1rem; }
.message { background: var(--accent-soft); border: 1px solid #a6d7d2; color: var(--accent-dark); padding: .75rem 1rem; }
.facts { display: grid; gap: .8rem; margin: 1.5rem 0 0; }
.facts div { border-top: 1px solid var(--line); padding-top: .7rem; }
.facts dt { color: var(--muted); font-size: .8rem; }
.facts dd { margin: .2rem 0 0; font-weight: 700; }
.lifecycle-panel, .managed-events-panel { margin-top: 1rem; }
.transition-form { align-items: end; display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; }
.transition-form .field { min-width: 0; }
@media (max-width: 680px) {
  .transition-form { grid-template-columns: 1fr; }
}

.status-history { display: grid; gap: .7rem; margin: 0; padding-left: 1.4rem; }
.status-history li { display: flex; gap: 1rem; justify-content: space-between; }
.status-history li .muted { display: block; }
.history-entry { border-top: 1px solid var(--line); padding-top: 1rem; }
.history-entry:first-child { border-top: 0; padding-top: 0; }
.history-entry h3 { font-size: 1.05rem; margin: 0; }
.history-entry p { line-height: 1.5; margin: .65rem 0 0; }
.history-entry-heading { align-items: flex-start; display: flex; gap: .75rem; justify-content: space-between; }
.record-meta { font-size: .85rem; }
@media (max-width: 480px) {
  .row-actions { align-items: flex-start; flex-direction: column; gap: .35rem; }
}
@media (min-width: 700px) {
  .shell { width: min(100% - 3rem, 1120px); }
  .feature-grid, .dashboard-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .event-layout { grid-template-columns: minmax(220px, .8fr) minmax(0, 1.5fr); }
  .main-content { padding-top: 3rem; }
}
