/* ==========================================================================
   Rondo styles
   Brand colors and fonts come from each organization's theme as CSS
   variables (templates/ui/head.html): --ink, --paper, --accent,
   --accent-ink, --accent-text, --font-display, --font-body.
   Layouts: .layout-app (sidebar), .layout-portal (phone app), .layout-public.
   ========================================================================== */

:root {
  --text: #0A0A0A;
  --text-2: #39362F;
  --muted: #6E695E;
  --line: #ECE9E1;
  --line-2: #CFCABD;
  --surface: #FFFFFF;
  --surface-2: #F1EFE9;
  --good-bg: #E3F1E7; --good: #1F6B3A;
  --warn-bg: #F6EDCF; --warn: #5C4A12;
  --bad-bg: #FBE3E1;  --bad: #8E2219;
  --info-bg: #E4E9F7; --info: #2C3E86;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(10, 10, 10, .04), 0 6px 20px rgba(10, 10, 10, .05);
  --sidebar-w: 264px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent-text); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
code { font-size: .85em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 8px; }
.icon { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type --------------------------------------------------------- */
.display, .page-title { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .01em; font-weight: 400; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.05; margin: 0 0 .25em; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .4em; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent-text); }
.lead { font-size: 1.08rem; color: var(--text-2); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.section-title, .label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 28px 0 12px; }
.panel > .section-title:first-child, .panel-head .section-title { margin-top: 0; margin-bottom: 0; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ------------------------------------------------------ */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button:hover { filter: brightness(.96); }
.button:disabled, .button[aria-disabled="true"] { cursor: not-allowed; filter: none; }
.button-sm { min-height: 38px; padding: 0 14px; font-size: .86rem; }
.button:disabled, .button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; }
.button-lg { min-height: 52px; padding: 0 22px; font-size: 1rem; border-radius: 12px; }
.button-ghost, .button-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); }
.button-ghost:hover, .button-secondary:hover { background: var(--surface-2); filter: none; }
.button-dark { background: var(--ink); color: #fff; }
.button-block { width: 100%; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; color: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }

/* ---------- Page header -------------------------------------------------- */
.page-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; margin: 0 0 24px; }
.page-head .display { margin: 0; }
.page-head .page-sub { color: var(--muted); font-size: .95rem; margin: 4px 0 0; }
.page-head .actions { margin: 0; }

/* ---------- KPI tiles ---------------------------------------------------- */
.stats, .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 0 0 24px; }
.stat, .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; }
.stat-label { font-size: .84rem; font-weight: 600; color: var(--muted); }
.stat-value { font-family: var(--font-display); font-size: 2.4rem; line-height: 1.08; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .84rem; color: var(--muted); }
.stat-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.stat-dark .stat-label, .stat-dark .stat-sub { color: #CFCABD; }
.stat-dark .stat-value { color: var(--accent-on-ink); }
a.stat:hover { border-color: var(--accent); box-shadow: var(--shadow); }
a.stat-dark:hover { border-color: var(--ink); }

/* ---------- Panels, cards, lists ----------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.grid-2 > *, .grid-3 > *, .stack > * { margin-top: 0 !important; }
/* Grid columns never grow past their share because of long content: wide tables scroll inside .table-wrap instead of widening the page. */
.grid-2 > *, .grid-3 > *, .grid-main-aside > *, .stack > * { min-width: 0; }
.grid-main-aside { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .grid-main-aside { grid-template-columns: minmax(0, 1fr); } }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 8px; }
.panel-head a { font-size: .85rem; font-weight: 700; text-decoration: none; }
.panel-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.panel-dark .muted, .panel-dark .section-title { color: #CFCABD; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

.card-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.card a { font-weight: 700; color: var(--text); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }

/* Row list inside a panel: name + meta on the left, chip/action right */
.list-plain, .rows { list-style: none; padding: 0; margin: 0; }
.list-plain li, .rows > li, .rows > .row-item { padding: 12px 0; border-top: 1px solid var(--line); }
.list-plain li:first-child, .rows > :first-child { border-top: 0; }
.panel .rows > :first-child { padding-top: 6px; }
.row-item { display: flex; align-items: center; gap: 14px; }
.row-item .grow { flex: 1; min-width: 0; }
.row-title { font-weight: 700; color: var(--text); text-decoration: none; }
a.row-title:hover { color: var(--accent-text); }
.row-sub { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }

.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--ink); color: var(--accent-on-ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.05rem; text-transform: uppercase; }
.avatar-sm { width: 32px; height: 32px; font-size: .9rem; }

/* Date block (schedule) */
.date-block { width: 54px; flex: none; text-align: center; background: var(--ink); color: #fff; border-radius: 10px; padding: 6px 0; }
.date-block .m { font-size: .68rem; font-weight: 700; letter-spacing: .06em; color: var(--accent-on-ink); text-transform: uppercase; }
.date-block .d { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.05; }
.date-block .w { font-size: .68rem; color: #CFCABD; }

/* ---------- Badges ------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .01em; background: var(--surface-2); color: var(--text-2); white-space: nowrap; vertical-align: middle; text-transform: capitalize; }
.badge-approved, .badge-in_progress, .badge-paid, .badge-going, .badge-present, .badge-active, .badge-good { background: var(--good-bg); color: var(--good); }
.badge-pending, .badge-registration_open, .badge-due, .badge-maybe, .badge-late, .badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-withdrawn, .badge-overdue, .badge-not_going, .badge-absent, .badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-completed, .badge-upcoming, .badge-info { background: var(--info-bg); color: var(--info); }
.badge-dark { background: var(--ink); color: var(--accent); }
.badge-preview { background: transparent; border: 1px solid var(--line-2); color: var(--muted); font-size: .68rem; padding: 1px 8px; text-transform: none; }

/* ---------- Tables ------------------------------------------------------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel .table-wrap { border: 0; border-radius: 0; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .92rem; }
th, td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
thead th { border-top: 0; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
tbody tr:hover { background: #FCFBF8; }
td a { font-weight: 700; color: var(--text); text-decoration: none; }
td a:hover { color: var(--accent-text); text-decoration: underline; }
td.num, th.num { text-align: right; }

/* ---------- Pills (team / season / channel pickers) --------------------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; font-size: .86rem; text-decoration: none; }
.pill[aria-current="page"], .pill.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Notices ------------------------------------------------------ */
.notice, .proto-banner { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 10px 14px; margin: 0 0 20px; font-size: .84rem; line-height: 1.45; background: var(--warn-bg); color: var(--warn); border: 1px solid #E6C65C; }
.notice strong, .proto-banner strong { white-space: nowrap; }
.notice-success { background: var(--good-bg); color: var(--good); border-color: #A7D3B5; }
.notice-error { background: var(--bad-bg); color: var(--bad); border-color: #EAA9A3; }
.notice-info { background: var(--surface); color: var(--text-2); border-color: var(--line); }

/* ---------- Forms -------------------------------------------------------- */
.form-grid { display: grid; gap: 16px; max-width: 560px; }
.field[hidden], .form-grid label[hidden] { display: none; }
.form-grid label, .field { display: grid; gap: 6px; font-weight: 600; font-size: .88rem; color: var(--text-2); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="time"], input[type="password"], input[type="search"], input:not([type]), select, textarea, .input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-weight: 400; font-size: 1rem; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; border-color: var(--accent); }
.checkbox { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 500 !important; }
.checkbox input, .radio input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 1px 0 0; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; }
.choice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 600; }
.choice:has(input:checked) { border: 2px solid var(--accent); padding: 11px 13px; }
.choice input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ========================================================================
   App layout (sidebar)
   ======================================================================== */
.app-shell { display: flex; min-height: 100vh; }
@media (min-width: 901px) { .layout-app { background: linear-gradient(to right, var(--ink) var(--sidebar-w), var(--paper) var(--sidebar-w)); } }
.sidebar { width: var(--sidebar-w); flex: none; background: var(--ink); color: #fff; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 18px; color: #fff; text-decoration: none; }
.sidebar-brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-logo { object-fit: contain; }
.brand-initials { border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.05rem; }
.brand-name { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .02em; font-size: 1.05rem; line-height: 1.1; }
.brand-sub { font-size: .78rem; font-weight: 600; color: var(--accent-on-ink); margin-top: 2px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 14px; }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8C887E; padding: 0 12px 4px; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; color: #CFCABD; text-decoration: none; font-size: .9rem; font-weight: 500; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link[aria-current="page"] { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.nav-link[aria-current="page"] .icon { color: var(--accent-on-ink); }
.nav-tag { margin-left: auto; font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8C887E; border: 1px solid #39362F; border-radius: 6px; padding: 1px 6px; }
.sidebar-user { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .84rem; }
.sidebar-user-name { font-weight: 700; }
.sidebar-user-role { color: #8C887E; margin-bottom: 8px; }
.sidebar-user-links { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.sidebar-user-links a, .sidebar-signout { color: #CFCABD; font-size: .82rem; text-decoration: none; }
.sidebar-user-links a:hover, .sidebar-signout:hover { color: #fff; text-decoration: underline; }
.sidebar-user-links form { margin: 0; }
.sidebar-signout { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; }
.app-main { flex: 1; min-width: 0; padding: 32px clamp(18px, 3vw, 40px) 24px; }
.app-main > * { max-width: 1240px; }
.app-footer { margin-top: 48px; color: var(--muted); font-size: .8rem; }

@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; padding: 12px 12px 10px; gap: 8px; }
  .sidebar-brand { padding: 0 4px 4px; }
  .brand-mark { width: 36px; height: 36px; }
  .sidebar-nav { flex-direction: row; gap: 4px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .nav-section { flex-direction: row; gap: 4px; }
  .nav-title { display: none; }
  .nav-link { white-space: nowrap; min-height: 38px; }
  .nav-link[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
  .nav-tag { display: none; }
  .sidebar-user { display: none; }
  .app-main { padding-top: 20px; }
}

/* ========================================================================
   Portal layout (family app)
   ======================================================================== */
.layout-portal { background: var(--paper); }
.portal { min-height: 100vh; display: flex; flex-direction: column; }
.portal-header { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, calc((100vw - 640px) / 2)); min-height: 64px; }
.portal-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.portal-brand .brand-mark { width: 38px; height: 38px; }
.portal-brand .brand-name { font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-header-actions { display: flex; align-items: center; gap: 10px; }
.portal-chip { color: var(--accent); font-size: .82rem; font-weight: 700; text-decoration: none; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: 6px 12px; }
.portal-menu { position: relative; }
.portal-menu summary { list-style: none; cursor: pointer; display: flex; }
.portal-menu summary::-webkit-details-marker { display: none; }
.portal-menu .avatar { width: 38px; height: 38px; background: #1E1E1E; border: 1px solid rgba(255, 255, 255, .15); }
.portal-menu-panel { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); padding: 14px; display: grid; gap: 8px; }
.portal-menu-panel a { font-weight: 600; text-decoration: none; }
.portal-menu-panel form { margin: 0; border-top: 1px solid var(--line); padding-top: 8px; }
.portal-menu-panel button { background: none; border: 0; padding: 0; font-weight: 600; cursor: pointer; color: var(--bad); }
.portal-main { flex: 1; width: min(640px, 100%); margin: 0 auto; padding: 20px 16px 120px; }
.portal-footer { margin-top: 32px; text-align: center; color: var(--muted); font-size: .78rem; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 0 max(0px, calc((100vw - 640px) / 2)) env(safe-area-inset-bottom); }
.tabbar a { min-height: 68px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] .icon { color: var(--accent-text); stroke-width: 2.3; }
.portal .page-head { margin-bottom: 16px; }
.portal .display { font-size: 1.9rem; }

/* Next-up card (dark) */
.next-card { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 18px; display: grid; gap: 10px; }
.next-card .kicker { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-on-ink); }
.next-card .kicker span:last-child { color: #CFCABD; letter-spacing: 0; text-transform: none; font-weight: 500; }
.next-card .title { font-family: var(--font-display); font-size: 1.65rem; text-transform: uppercase; line-height: 1.02; }
.next-card .meta { color: #CFCABD; font-size: .9rem; }
.next-card .rsvp { display: flex; gap: 10px; }
.next-card .rsvp .button { flex: 1; }
.next-card .button-ghost { background: transparent; color: #fff; border-color: #39362F; }
.next-card .button-ghost:hover { background: rgba(255, 255, 255, .06); }

/* Event row (portal schedule) */
.event { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.event .grow { flex: 1; min-width: 0; }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: min(78%, 560px); align-self: flex-start; }
.msg-meta { font-size: .76rem; color: var(--muted); margin: 0 0 4px 4px; }
.msg-meta b { color: var(--accent-text); }
.msg-body { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; line-height: 1.45; }
.msg-staff .msg-body { background: var(--ink); border-color: var(--ink); color: #fff; }
.msg-me { align-self: flex-end; text-align: right; }
.msg-me .msg-meta { margin: 0 4px 4px 0; }
.msg-me .msg-body { background: color-mix(in srgb, var(--accent) 22%, #fff); border-color: color-mix(in srgb, var(--accent) 55%, #fff); border-radius: 16px 16px 4px 16px; text-align: left; }
.composer { display: flex; gap: 8px; align-items: center; margin-top: 18px; }
.composer input { border-radius: 999px; padding-left: 18px; }
.icon-button { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* Attendance check-off */
.check-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; }
.check-box { width: 28px; height: 28px; flex: none; border-radius: 8px; border: 2px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; color: var(--accent-ink); }
.check-row.is-on .check-box { background: var(--accent); border-color: var(--accent); }

/* Status tracker (applications) */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.steps li::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .dot { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.steps .done .dot { background: var(--good); border-color: var(--good); color: #fff; }
.steps .now .dot { background: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, #fff); border-width: 4px; }

/* ========================================================================
   Public layout (dark hero)
   ======================================================================== */
.layout-public { background: var(--ink); color: #fff; min-height: 100vh; display: flex; flex-direction: column; }
.public-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 48px); }
.public-nav { display: flex; align-items: center; gap: 18px; font-size: .9rem; }
.public-nav a:not(.button) { color: #CFCABD; text-decoration: none; }
.public-nav a:not(.button):hover { color: #fff; }
.public-nav form { margin: 0; }
.public-nav .link-button { color: #CFCABD; text-decoration: none; }
.public-main { flex: 1; width: min(1100px, 100% - 32px); margin: 0 auto; padding: 24px 0 64px; }
.public-footer { text-align: center; color: #8C887E; font-size: .8rem; padding: 24px 16px 32px; }
.layout-public .eyebrow { color: var(--accent-on-ink); }
.layout-public .lead { color: #CFCABD; }
.layout-public .muted { color: #8C887E; }
.layout-public a:not(.button) { color: var(--accent-on-ink); }
.layout-public .portal-brand, .layout-public .portal-brand:hover { color: #fff; }
.hero { padding: clamp(32px, 8vh, 96px) 0 40px; max-width: 760px; }
.hero .display { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: .35em; }
.hero-crest { width: 96px; height: 96px; object-fit: contain; margin-bottom: 20px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 24px; }
.feature { background: #131313; border: 1px solid #1E1E1E; border-radius: var(--radius-lg); padding: 18px; }
.feature strong { display: block; margin: 10px 0 4px; }
.feature .icon { color: var(--accent-on-ink); }
.feature p { color: #CFCABD; font-size: .9rem; margin: 0; }
.org-card { display: flex; align-items: center; gap: 14px; background: #131313; border: 1px solid #1E1E1E; border-radius: var(--radius-lg); padding: 16px; }
.org-card .grow { flex: 1; min-width: 0; }
.org-card .row-sub { color: #8C887E; }

/* Sign-in card */
.auth { width: min(440px, 100%); margin: 0 auto; padding: 24px 0; display: grid; gap: 20px; }
.auth-head { text-align: center; display: grid; justify-items: center; gap: 10px; }
.auth-head .display { font-size: 2rem; }
.auth-head .display span { color: var(--accent-on-ink); display: block; }
.auth-card { background: #131313; border: 1px solid #1E1E1E; border-radius: var(--radius-lg); padding: 18px; }
.auth .divider { display: flex; align-items: center; gap: 12px; color: #6E695E; font-size: .82rem; }
.auth .divider::before, .auth .divider::after { content: ""; flex: 1; height: 1px; background: #39362F; }
.persona { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 12px; border: 1px solid #1E1E1E; background: #131313; color: #fff; text-align: left; cursor: pointer; }
.persona:hover { border-color: var(--accent); }
.persona .row-sub { color: #8C887E; }
.persona-current { border-color: var(--accent); }

/* ---------- QA hub ---------------------------------------------------- */
.qa-table td, .qa-table th { vertical-align: top; }
.qa-table form { display: inline; margin: 0; }
.qa-table .button-sm { min-height: 30px; padding: 0 10px; font-size: .78rem; margin: 2px 2px 2px 0; }

/* ---------- Registration + waiver ------------------------------------- */
.reg { max-width: 720px; }
.reg-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.reg-steps li { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: .9rem; line-height: 1.2; }
.reg-steps small { display: block; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.reg-step-dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.05rem; background: var(--surface-2); color: var(--muted); }
.reg-steps .now { background: var(--ink); border-color: var(--ink); color: #fff; }
.reg-steps .now small { color: var(--accent-on-ink); }
.reg-steps .now .reg-step-dot { background: var(--accent); color: var(--accent-ink); }

.reg-card { padding: 28px 32px; }
.reg-alert[hidden] { display: none; }
.reg-alert:focus { outline: none; }
.reg-block { margin: 0; padding: 0 0 26px; min-width: 0; display: grid; gap: 16px; }
.reg-form .reg-block { border-top: 1px solid var(--line); padding-top: 26px; }
.reg-block-head { display: flex; align-items: center; gap: 14px; float: none; width: 100%; }
.reg-block-n { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--accent-on-ink); font-family: var(--font-display); font-size: 1.15rem; }
.reg-block-title { display: block; font-size: 1.2rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.reg-block-sub { display: block; color: var(--muted); font-size: .9rem; font-weight: 500; }

.waiver-terms { max-height: 380px; overflow-y: auto; padding: 20px 22px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); overscroll-behavior: contain; }
.waiver-terms ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.waiver-terms h3 { display: flex; gap: 10px; align-items: baseline; font-size: 1rem; font-weight: 800; margin: 0 0 4px; }
.waiver-terms h3 span { font-family: var(--font-display); font-weight: 400; color: var(--accent-text); font-size: 1.1rem; }
.waiver-terms p { margin: 0; font-size: .93rem; line-height: 1.6; color: var(--text-2); }
.waiver-terms .waiver-esign { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field .optional { font-weight: 500; color: var(--muted); }
.field .req { color: var(--bad); }
.field-hint { margin: 0; font-size: .82rem; font-weight: 500; color: var(--muted); }
.field-error { margin: 0; font-size: .82rem; font-weight: 600; color: var(--bad); }
.field-error:empty { display: none; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }
.js .reg-new-player[data-hide-unless-new]:not(.is-open) { display: none; }

.check-field { display: grid; gap: 6px; }
.check-field label { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; font-size: .93rem; line-height: 1.5; color: var(--text-2); }
.check-field label:hover { border-color: var(--line-2); }
.check-field input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--accent); }
.check-field label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--text); }
.check-field.has-error label { border-color: var(--bad); background: var(--bad-bg); }

.sig { display: grid; gap: 10px; }
.sig-tabs { display: inline-flex; justify-self: start; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.sig-tabs[hidden] { display: none; }
.sig-tabs button { border: 0; background: none; min-height: 40px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer; }
.sig-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.js .sig[data-mode="draw"] .sig-type, .sig[data-mode="type"] .sig-draw { display: none; }
.sig-draw { display: grid; gap: 6px; }
.sig-pad { position: relative; height: 190px; border-radius: var(--radius); border: 2px dashed var(--line-2); background: var(--surface); touch-action: none; }
.sig.has-error .sig-pad, .sig.has-error .sig-type input { border-color: var(--bad); }
.sig-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; z-index: 1; }
.sig-placeholder { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-80%); text-align: center; font-family: "Dancing Script", cursive; font-size: 2.1rem; color: var(--line-2); pointer-events: none; transition: opacity .2s; }
.sig.has-ink .sig-placeholder { opacity: 0; }
.sig-line { position: absolute; left: 24px; right: 24px; bottom: 42px; border-bottom: 2px solid var(--line); pointer-events: none; }
.sig-line b { position: absolute; left: 0; bottom: 2px; font-size: 1.2rem; color: var(--line-2); }
.sig-clear { position: absolute; top: 10px; right: 10px; z-index: 2; min-height: 32px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 0 14px; font-size: .82rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.sig-clear:hover { color: var(--text); }
.sig-preview { min-height: 72px; margin: 4px 0 0; padding: 8px 20px 4px; border-bottom: 2px solid var(--line); font-family: "Dancing Script", cursive; font-size: 2.4rem; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.sig-preview:empty { display: none; }

.reg-fees { margin: 0 0 16px; }
.reg-fees strong { margin-right: 6px; }
.reg-submit { width: 100%; white-space: normal; }
.reg-submit[aria-busy="true"] { opacity: .7; pointer-events: none; }
.reg-next { margin: 12px 0 0; text-align: center; font-size: .85rem; color: var(--muted); }

@media (max-width: 640px) {
  .reg-card { padding: 20px 16px; }
  .field-row { grid-template-columns: 1fr; }
  .waiver-terms { max-height: 320px; padding: 16px; }
  .sig-pad { height: 180px; }
  .reg-steps li { flex: 1; }
}

/* ---------- Registration settings (admin) ------------------------------ */
.settings-form { display: grid; gap: 16px; max-width: 820px; }
.settings-form .panel + .panel { margin-top: 0; }
.settings-form .section-title .optional { text-transform: none; letter-spacing: 0; font-weight: 500; }
.choice-list { display: grid; gap: 10px; }
.choice-list .choice { align-items: flex-start; }
.choice-list .choice > span { display: grid; gap: 2px; }
.choice-list .row-sub { font-weight: 500; }
.ws-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.ws-row { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.ws-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ws-n { font-family: var(--font-display); font-size: 1.15rem; color: var(--accent-text); }
.ws-tools { display: flex; gap: 6px; }
.ws-tools[hidden] { display: none; }
.ws-tools .button { min-width: 38px; padding: 0 10px; }
.ws-tools .button:disabled { opacity: .4; cursor: default; }
.ws-add[hidden] { display: none; }
.consent-rows { display: grid; gap: 10px; }
.consent-row { display: grid; grid-template-columns: 1fr 140px; gap: 10px; }
.settings-save { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

@media (max-width: 640px) {
  .consent-row { grid-template-columns: 1fr; }
  .settings-save .button { width: 100%; }
}

/* ---------- Payment requests ------------------------------------------ */
.badge-waived, .badge-cancelled { background: var(--surface-2); color: var(--muted); }
.pr-team { margin: 0; padding: 14px 0 6px; border-top: 1px solid var(--line); min-width: 0; }
.pr-team:first-of-type { border-top: 0; padding-top: 4px; }
.pr-team-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-bottom: 6px; }
.pr-all[hidden], .pr-team-name[hidden] { display: none !important; }
.pr-players { list-style: none; margin: 0; padding: 0; }
.pr-player { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 2px 0 2px 30px; }
.pr-player .checkbox { flex: 1; font-weight: 500; }
.pr-custom input { width: 120px; min-height: 40px; padding: 6px 10px; font-size: .9rem; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.pr-actions select { width: auto; min-height: 38px; padding: 4px 10px; font-size: .86rem; }
.pr-due-card { display: grid; gap: 4px; margin-bottom: 8px; }
.pr-due-card .stat-label { color: #CFCABD; }
.pr-due-card .stat-value { color: var(--accent-on-ink); }

@media (max-width: 640px) {
  .pr-player { padding-left: 8px; }
  .pr-custom input { width: 96px; }
}

/* ---------- Transaction fee toggle ------------------------------------ */
.fee-toggle { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.switch, .form-grid .switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-weight: 500; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; margin: 0; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.switch > span { display: grid; gap: 2px; }
.switch .row-sub { font-weight: 500; }
.fee-breakdown { display: grid; gap: 6px; margin: 0; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); background: var(--surface); font-size: .92rem; }
.fee-breakdown div { display: flex; justify-content: space-between; gap: 12px; }
.fee-breakdown dt { color: var(--muted); }
.fee-breakdown dd { margin: 0; font-variant-numeric: tabular-nums; }
.fee-breakdown .fee-total dt, .fee-breakdown .fee-total dd { color: var(--text); font-weight: 800; }
.fee-toggle { min-width: 0; margin: 0; }
.fee-legend { float: left; width: 100%; padding: 0; }
.fee-legend + * { clear: both; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.seg-opt { flex: 1 1 160px; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 12px; border-radius: 9px; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; text-align: center; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt:has(input:checked) { background: var(--ink); color: #fff; }
.seg-opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.fee-mode-hint[hidden], .fee-tag[hidden] { display: none; }
.fee-tag { color: var(--accent-text); font-weight: 700; }
.plan-fee { display: block; }
.plan-fee-switch { margin: 6px 0 0; }
.switch-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0; border: 0; background: none; font: inherit; font-size: .88rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.switch-track { width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch-btn[aria-checked="true"] .switch-track { background: var(--accent); }
.switch-btn[aria-checked="true"] .switch-track::after { transform: translateX(16px); }
.zelle-card { margin-bottom: 8px; display: grid; gap: 2px; }
.zelle-amount { margin: 0; }
.zelle-to { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.zelle-contact { font-size: 1.15rem; overflow-wrap: anywhere; }
.zelle-copy[hidden] { display: none; }
.zelle-form { display: grid; gap: 12px; }
.zelle-form .button { width: 100%; white-space: normal; }
.zelle-missing { color: var(--bad); }
.pr-bulk[hidden] { display: none; }
.pr-player .checkbox > span { display: grid; gap: 0; }
.pr-player .row-sub { font-weight: 500; }

/* ---------- Schedule --------------------------------------------------- */
.day-head { margin: 24px 0 10px; }
.event-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: inherit; text-decoration: none; }
.event-card + .event-card { margin-top: 10px; }
a.event-card:hover { border-color: var(--line-2); }
.event-card .grow { flex: 1; min-width: 0; display: grid; gap: 3px; }
.event-card.is-cancelled { opacity: .6; }
.event-card.is-cancelled .row-title { text-decoration: line-through; }
.time-block { flex: none; width: 64px; text-align: center; border-radius: 12px; background: var(--ink); color: #fff; padding: 8px 4px; }
.time-block strong { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--accent-on-ink); font-weight: 400; }
.time-block span { font-size: .7rem; color: #CFCABD; text-transform: uppercase; letter-spacing: .06em; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.kid-rsvp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--line); }
.kid-rsvp .grow { min-width: 140px; }
.kid-rsvp form { display: flex; gap: 6px; margin: 0; }
.rsvp-on { background: var(--good-bg) !important; color: var(--good) !important; border-color: #A7D3B5 !important; }
.rsvp-off { background: var(--bad-bg) !important; color: var(--bad) !important; border-color: #EAA9A3 !important; }
.event-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 16px; }
.event-counts .stat { padding: 12px 14px; }
.event-counts .stat-value { font-size: 1.8rem; }
.event-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0 0 16px; }
.att-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 4px 0; border-top: 1px solid var(--line); }
.att-row:first-child { border-top: 0; }
.att-row .grow { flex: 1; min-width: 0; }
.att-row input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--accent); flex: none; }
.team-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }

/* ---------- League registration loop ---------------------------------- */
.copy-row { display: flex; gap: 8px; }
.sign-link { margin-top: 6px; }
.copy-row .input { flex: 1; min-width: 0; font-size: .88rem; }
.invite-link-card { margin-bottom: 16px; border-color: var(--accent); }
.choice.is-disabled { opacity: .55; cursor: not-allowed; }
.row-problem td { background: color-mix(in srgb, var(--bad-bg) 55%, transparent); }
.loop-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 16px; }
.loop-steps li { padding-bottom: 0; }
.loop-steps li::before { display: none; }
.reg-player-fixed { margin: 0; font-size: 1.05rem; }

@media (max-width: 640px) {
  .page-head { align-items: flex-start; }
  .stat-value { font-size: 2rem; }
  .msg { max-width: 88%; }
}

/* Player list filter (Players, Payment settings) */
.list-filter { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin: 0 0 8px; }
.list-filter-actions { display: flex; gap: 8px; }
.list-filter-count { margin: 0 0 12px; }
@media (max-width: 720px) { .list-filter { grid-template-columns: minmax(0, 1fr); } }
.bulk-plan { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.bulk-plan .field { flex: 1 1 260px; }

/* Email & sender */
.email-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.email-steps li { padding-bottom: 0; }
.email-steps li::before { display: none; }
.email-steps .row-sub { overflow-wrap: anywhere; }
@media (max-width: 720px) { .email-steps { grid-template-columns: minmax(0, 1fr); } }
.email-status { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); font-size: .9rem; }
.email-status.is-ready { background: var(--good-bg); color: var(--good); }
.email-preview { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-top: 14px; overflow-wrap: anywhere; }
.email-preview form { margin-left: auto; }
code.breakable { word-break: break-all; }

/* Organization switcher (top of the sidebar) */
.org-switcher { position: relative; }
.org-switcher > summary { list-style: none; cursor: pointer; border-radius: 12px; }
.org-switcher > summary::-webkit-details-marker { display: none; }
.org-switcher > summary:hover { background: rgba(255, 255, 255, .05); }
.org-switcher > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.org-switcher-chevron { margin-left: auto; flex: none; color: #8C887E; transition: transform .15s; }
.org-switcher[open] .org-switcher-chevron { transform: rotate(180deg); }
.org-switcher-menu { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% - 10px); background: #1A1A1A; border: 1px solid #2A2A2A; border-radius: 12px; padding: 8px; display: grid; gap: 2px; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.org-switcher-menu .nav-title { padding: 6px 8px 4px; }
.org-switcher-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; color: #CFCABD; text-decoration: none; font-size: .88rem; }
.org-switcher-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.org-switcher-item[aria-current="true"] { color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.org-switcher-badge { width: 28px; height: 28px; flex: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: .78rem; object-fit: contain; }
.org-switcher-text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.org-switcher-text small { color: #8C887E; font-weight: 500; font-size: .74rem; }
.org-switcher-home { border-top: 1px solid #2A2A2A; margin-top: 4px; padding-top: 10px; border-radius: 0 0 8px 8px; }
@media (max-width: 900px) { .org-switcher-menu { right: auto; min-width: min(320px, calc(100vw - 24px)); } }

/* HomePitch hub (signed-in platform home) */
.hub-hero { padding-bottom: 24px; }
.hub-section { margin: 0 0 32px; }
.hub-title { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8C887E; margin: 0 0 12px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.hub-card { background: #131313; border: 1px solid #1E1E1E; border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hub-card-title { color: #fff; font-size: 1rem; overflow-wrap: anywhere; }
.hub-card-text { color: #CFCABD; font-size: .9rem; margin: 0; }
.hub-card .row-sub { color: #8C887E; }
.hub-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; }
.hub-invite .hub-card-foot { justify-content: space-between; }
.hub-invite { border-color: color-mix(in srgb, var(--accent) 45%, #1E1E1E); }
.hub-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-on-ink); font-size: .8rem; font-weight: 700; }
.hub-org-head { display: flex; align-items: center; gap: 12px; }
.hub-org-head .grow { flex: 1; min-width: 0; }
.hub-badge { width: 44px; height: 44px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1rem; object-fit: contain; }

/* Create your organization (hub wizard) */
.create-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.create-steps { display: grid; gap: 16px; min-width: 0; }
.create-step { margin: 0; gap: 14px; }
.create-step legend { float: left; width: 100%; padding: 0; margin: 0 0 2px; }
.create-step .field { color: #CFCABD; }
.create-step .field-hint { color: #8C887E; }
.create-step .optional { color: #8C887E; }
.create-kinds { display: grid; gap: 10px; }
.create-kind { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid #2A2A2A; background: #0F0F0F; color: #fff; cursor: pointer; }
.create-kind input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.create-kind > span { display: grid; gap: 2px; }
.create-kind .row-sub { color: #8C887E; }
.create-kind:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.create-kind.is-soon { opacity: .55; cursor: default; padding-left: 46px; }
.address-input { display: flex; align-items: stretch; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); }
.address-input input { border: 0; border-radius: 0; min-width: 0; flex: 1; }
.address-input input:focus { outline-offset: -3px; }
.address-affix { display: inline-flex; align-items: center; padding: 0 10px; background: var(--surface-2); color: var(--muted); font-size: .9rem; font-weight: 500; white-space: nowrap; }
@media (max-width: 520px) { .address-affix:first-child { display: none; } }
.color-input { display: flex; align-items: center; gap: 10px; }
.color-input input[type="color"] { width: 52px; height: 42px; padding: 2px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.color-input code { color: #fff; background: transparent; padding: 0; font-size: .85rem; }
.font-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.font-choice { display: inline-flex; }
.font-choice input { position: absolute; opacity: 0; pointer-events: none; }
.font-choice span { padding: 8px 14px; border-radius: 10px; border: 1px solid #2A2A2A; background: #0F0F0F; color: #fff; font-size: 1.05rem; cursor: pointer; }
.font-choice input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.font-choice input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.create-submit { display: grid; gap: 8px; justify-items: start; }
.create-submit .row-sub { color: #8C887E; max-width: 60ch; }
.create-preview { position: sticky; top: 16px; display: grid; gap: 10px; min-width: 0; }
.create-preview .row-sub { color: #8C887E; overflow-wrap: anywhere; }
@media (max-width: 900px) { .create-layout { grid-template-columns: minmax(0, 1fr); } .create-preview { order: -1; position: static; } }
.preview-site { --p-accent: #0F766E; --p-ink: #111214; --p-on-accent: #FFFFFF; --p-font: "Space Grotesk"; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid #2A2A2A; background: #F6F6F3; color: #1D1D1F; }
.preview-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--p-ink); color: #fff; }
.preview-mark { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--p-accent); color: var(--p-on-accent); display: inline-flex; align-items: center; justify-content: center; font-family: var(--p-font), system-ui; overflow: hidden; }
.preview-mark img { width: 100%; height: 100%; object-fit: contain; background: var(--p-ink); }
.preview-name { font-family: var(--p-font), system-ui; text-transform: uppercase; letter-spacing: .02em; font-size: 1.05rem; line-height: 1.1; overflow-wrap: anywhere; }
.preview-body { padding: 18px 16px 20px; display: grid; gap: 8px; }
.preview-body p { margin: 0; }
.preview-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #77756E; }
.preview-title { font-family: var(--p-font), system-ui; text-transform: uppercase; font-size: 1.6rem; line-height: 1.05; }
.preview-text { font-size: .9rem; color: #4A4944; }
.preview-link { color: color-mix(in srgb, var(--p-accent) 70%, #000); font-weight: 700; text-decoration: underline; }
.preview-button { justify-self: start; margin-top: 6px; padding: 10px 18px; border-radius: 12px; background: var(--p-accent); color: var(--p-on-accent); font-weight: 700; }
.hub-create { border-style: dashed; border-color: #39362F; justify-content: center; text-decoration: none; }
.hub-create:hover { border-color: var(--accent); }

/* Get started checklist (new organizations' admin dashboard) */
.get-started-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.get-started-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.get-started-list li:first-child { border-top: 0; }
.get-started-list a { color: var(--text); font-weight: 600; text-decoration: none; }
.get-started-list a:hover { color: var(--accent-text); text-decoration: underline; }
.get-started-list .is-done { color: var(--muted); }
.get-started-check { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--good); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; }
.get-started-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); }
.button.is-waiting { opacity: .55; pointer-events: none; }
