/* ClubmanOS: staff console and member panel. Brand tokens match the marketing site (see CLAUDE.md). */
:root {
  --ink: #0A0A0A;
  --paper: #FFFFFF;
  --stone: #F4F4F2;
  --concrete: #E4E4E0;
  --graphite: #3D3D3D;
  --muted: #5A5A5A;
  --hairline: #E6E6E6;
  --mint: #12FFBE;
  --error: #A4231B;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', 'Helvetica Neue', Helvetica, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;
  --soft: 'SOFT' 100, 'WONK' 1, 'opsz' 144;
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--stone); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--mint); border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shell */
.top { background: var(--ink); color: var(--paper); }
.top-inner { max-width: 1180px; margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 36px; height: 36px; }
.wordmark { font-family: var(--font-display); font-variation-settings: var(--soft); font-weight: 900; font-size: 22px; letter-spacing: -0.025em; line-height: 1; }
.brand-sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: #BDBDBD; text-transform: uppercase; }
.nav { display: flex; gap: 4px; overflow-x: auto; margin-left: auto; scrollbar-width: none; }
.nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; color: #D6D6D6; white-space: nowrap; }
.nav a:hover { color: var(--paper); }
.nav a[aria-current='page'] { background: var(--paper); color: var(--ink); }
.signout { margin: 0; }
.signout button { background: none; border: 1px solid #3A3A3A; color: #D6D6D6; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 14px; cursor: pointer; }
@media (max-width: 720px) { .nav { order: 3; width: 100%; margin-left: -10px; } .nav a { padding: 7px 10px; font-size: 14px; } .signout { margin-left: auto; } }

.staff-bar { background: var(--mint); color: var(--ink); font-size: 14px; font-weight: 600; text-align: center; padding: 8px var(--gutter); }
.staff-bar a { font-weight: 800; }
main { max-width: 1180px; margin: 0 auto; padding: 28px var(--gutter) 64px; }
main.narrow { max-width: 680px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head p { margin: 6px 0 0; color: var(--graphite); }

/* Type */
h1, .h1 { font-family: var(--font-display); font-variation-settings: var(--soft); font-weight: 800; letter-spacing: -0.025em; line-height: 1.02; font-size: clamp(2rem, 5vw, 2.8rem); margin: 0; }
h2, .h2 { font-family: var(--font-display); font-variation-settings: var(--soft); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-size: 1.5rem; margin: 0 0 12px; }
h3 { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono, .label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em; }
.label { text-transform: uppercase; color: var(--muted); }
code { font-family: var(--font-mono); font-size: 13px; background: var(--stone); padding: 2px 6px; border-radius: 6px; word-break: break-all; }

/* Cards and layout */
.card { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); margin-bottom: 20px; }
.card.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.card.dark .muted { color: #BDBDBD; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid > .card { margin-bottom: 0; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.split { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
hr { border: 0; border-top: 1px solid var(--hairline); margin: 20px 0; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.facts { grid-template-columns: 1fr; } dl.facts dd { margin-bottom: 8px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.mint { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.card.dark .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.card.dark .btn.mint { background: var(--mint); border-color: var(--mint); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
form.inline { display: inline; margin: 0; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--concrete); color: var(--ink); white-space: nowrap; }
.pill.live, .pill.done, .pill.mint { background: var(--mint); }
.pill.in_review, .pill.in_progress { background: var(--ink); color: var(--paper); }
.pill.paused, .pill.cancelled, .pill.declined { background: transparent; border: 1px solid #BDBDBD; color: var(--muted); }
.pill.ai { background: var(--mint); font-family: var(--font-mono); font-weight: 500; font-size: 12px; }

/* Flash and notices */
.flash { background: var(--ink); color: var(--paper); border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; display: flex; gap: 10px; align-items: center; }
.flash::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); flex: none; }
.issues { list-style: none; padding: 0; margin: 0; }
.issues li { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--hairline); }
.issues li:first-child { border-top: 0; }
.issues .tag { flex: none; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 6px; background: var(--concrete); height: fit-content; }
.issues .error .tag { background: var(--ink); color: var(--paper); }
.error-text { color: var(--error); font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td a { font-weight: 700; }

/* Progress */
.progress { height: 12px; border-radius: 999px; background: var(--concrete); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--mint); border-right: 2px solid var(--ink); min-width: 6px; }
.card.dark .progress { background: #2A2A2A; }

/* Forms */
.field { margin-bottom: 22px; }
.field > label, .field > legend { display: block; font-weight: 700; margin-bottom: 6px; padding: 0; }
.field .help { color: var(--muted); font-size: 14px; margin: -2px 0 8px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
input[type='text'], input[type='email'], input[type='tel'], input[type='url'], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1.5px solid #CFCFCA; border-radius: 12px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; box-shadow: 0 0 0 5px var(--mint); }
.field.invalid input, .field.invalid select { border-color: var(--error); }
.choices { display: grid; gap: 8px; }
.choices.cols { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.choice { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1.5px solid #CFCFCA; border-radius: 12px; background: var(--paper); cursor: pointer; font-weight: 600; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); flex: none; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #F7FFFC; }
.choice:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.swatch { width: 26px; height: 26px; border-radius: 50%; flex: none; border: 2px solid rgba(0, 0, 0, 0.12); }

/* Setup questionnaire */
.steps-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.save-state { font-family: var(--font-mono); font-size: 12px; color: var(--muted); min-height: 1em; }
.step-nav { position: sticky; bottom: 0; display: flex; gap: 10px; justify-content: space-between; padding: 14px 0; background: var(--stone); border-top: 1px solid var(--hairline); }
.step-list { list-style: none; padding: 0; margin: 0; }
.step-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hairline); }
.step-list li:first-child { border-top: 0; }
.tick { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; border: 1.5px solid #BDBDBD; font-size: 13px; flex: none; }
.tick.on { background: var(--mint); border-color: var(--ink); }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--hairline); }
.checklist li:first-child { border-top: 0; }
.checklist button.box { width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid var(--ink); background: var(--paper); cursor: pointer; flex: none; display: grid; place-items: center; font-weight: 800; }
.checklist button.box[aria-pressed='true'] { background: var(--mint); }

/* Answers and previews */
details.block { border-top: 1px solid var(--hairline); padding: 12px 0; }
details.block:first-of-type { border-top: 0; }
details.block summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.block summary::-webkit-details-marker { display: none; }
details.block summary::after { content: '+'; font-family: var(--font-mono); }
details.block[open] summary::after { content: '–'; }
.qa { margin: 0; }
.qa dt { font-weight: 700; margin-top: 12px; }
.qa dd { margin: 2px 0 0; color: var(--graphite); white-space: pre-line; }
.page-card { border: 1px solid var(--hairline); border-radius: 12px; padding: 14px 16px; }
.page-card + .page-card { margin-top: 10px; }
.serp-title { font-weight: 700; color: #1A0DAB; }
.serp-url { font-family: var(--font-mono); font-size: 12px; color: #2E7D32; overflow-wrap: anywhere; }
.bubble { background: var(--stone); border-radius: 14px 14px 14px 4px; padding: 10px 14px; margin: 8px 0; max-width: 46ch; }
pre.json { background: var(--ink); color: #E8E8E8; border-radius: 12px; padding: 16px; overflow: auto; font-family: var(--font-mono); font-size: 12px; max-height: 480px; }

/* Sign-in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gutter); background: var(--ink); }
.auth .card { width: 100%; max-width: 440px; margin: 0; }
.auth .brand { color: var(--paper); justify-content: center; margin-bottom: 20px; }
