* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-underline-offset: 3px; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.engagement-wrap { max-width: 1000px; padding: 0 24px; margin: auto; }
header, header nav, footer, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
header { padding: 26px 0 20px; border-bottom: 1px solid var(--felt-rule); }
header nav { justify-content: flex-end; }
header nav > a:first-child { padding: 10px 4px; }
.page-heading { padding: 38px 4px 27px; max-width: 700px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; }
h1 { font-size: clamp(36px, 6vw, 54px); margin-bottom: 12px; letter-spacing: -.025em; }
h2 { font-size: 31px; margin-bottom: 8px; }
h3 { font-size: 24px; margin-bottom: 10px; }
.page-heading > p:last-child { max-width: 51ch; margin-bottom: 0; font-size: 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 750; margin-bottom: 10px; }
.muted, .metric-help, .status { color: var(--muted); }
.status { margin: 16px 0; min-height: 1.55em; }
.status.error { color: var(--danger); }
.session-card, .leaderboard-sheet { padding: 32px 36px; }
.session-card { margin-bottom: 28px; }
.session-card .button-primary, .session-card .button-quiet { margin: 8px 8px 0 0; }
.section-tabs { display: flex; gap: 5px; padding: 0 8px; }
.section-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; min-height: 54px; padding: 12px 16px; border: 1px solid transparent; border-radius: 14px 14px 0 0; background: #082d2830; color: var(--paper); font-weight: 650; }
.section-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.unread-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 12px; background: var(--felt); color: var(--paper); font-size: 12px; line-height: 22px; }
.section-tabs button:not([aria-selected="true"]) .unread-count { color: var(--ink); background: var(--paper); }
.leaderboard-sheet { border-top-left-radius: 17px !important; border-top-right-radius: 17px !important; }
.period-controls { display: flex; align-items: center; gap: 22px; padding-bottom: 24px; margin-bottom: 26px; border-bottom: 1px solid var(--rule); }
.choice-set { border: 0; padding: 0; margin: 0; display: flex; gap: 6px; }
.choice-set label { position: relative; cursor: pointer; }
.choice-set input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-set label span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 24px; font-weight: 650; font-size: 14px; }
.choice-set input:checked + span { background: var(--felt); border-color: var(--felt); color: var(--paper); }
.choice-set input:focus-visible + span { outline: 3px solid #3382ed; outline-offset: 3px; }
.period-choices { flex-shrink: 0; }
.period-note { font-size: 12px; line-height: 1.5; margin: 0; }
.section-heading { align-items: flex-start; margin-bottom: 22px; }
.section-heading .button-quiet { font-size: 13px; padding: 8px 16px; }
.section-heading .eyebrow { margin-bottom: 6px; }
.metric-choices { flex-wrap: wrap; margin-bottom: 18px; }
.metric-choices label { flex: 1; min-width: max-content; }
.metric-choices label span { padding: 10px 15px; }
.metric-help { font-size: 14px; margin-bottom: 4px; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.rank-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; border-bottom: 1px solid var(--line); padding: 12px; }
.rank-table td { border-bottom: 1px solid var(--rule); padding: 17px 12px; vertical-align: middle; overflow-wrap: anywhere; }
.rank-table td:first-child { width: 55px; font-weight: 700; color: var(--muted); }
.rank-table th:last-child, .rank-table td:last-child { text-align: right; }
.rank-table td:last-child { font-size: 21px; font-weight: 750; white-space: nowrap; }
.rank-table .is-me td { background: #174c3c0d; }
.rank-table .is-me td:first-child { border-left: 3px solid var(--felt); }
.rank-name { font-weight: 650; }
.rank-person { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 3px 12px; }
.rank-person + .rank-person { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
.rank-person-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.rank-person-actions button { min-height: 44px; padding: 7px 10px; font-size: 12px; }
.profile-safety { box-sizing: border-box; width: min(540px, calc(100% - 28px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 28px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; }
.profile-safety::backdrop { background: #051c18aa; }
.profile-safety h2, .profile-safety p { overflow-wrap: anywhere; }
.profile-safety h2 { font-size: 28px; }
.profile-safety select, .profile-safety textarea { width: 100%; min-height: 44px; margin-bottom: 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.profile-safety textarea { resize: vertical; }
.safety-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.safety-actions button { min-height: 44px; }
.safety-actions .danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.report-reference { display: block; margin-top: 10px; overflow-wrap: anywhere; font-size: 12px; }
.partner-table td:first-child { width: auto; color: var(--ink); }
.you-tag { display: inline-block; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-left: 8px; vertical-align: middle; }
.your-rank { background: #174c3c0d; border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; margin: 18px 0 0; }
.empty-card { border: 1px dashed var(--line); border-radius: 16px; padding: 25px; margin: 18px 0; text-align: center; }
.empty-card h3 { font-size: 23px; }
.empty-card p { color: var(--muted); margin-bottom: 0; }
.profile-box, .progress-section { border-top: 1px solid var(--rule); padding-top: 26px; margin-top: 30px; }
.profile-box > p, .progress-section > p { max-width: 65ch; font-size: 14px; }
.check-row { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin-bottom: 12px; }
.check-row input { width: 20px; height: 20px; flex: none; margin: 3px 0 0; accent-color: var(--felt); }
.check-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.field-label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 8px; }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field-row input { flex: 1 1 13rem; min-width: 0; min-height: 48px; padding: 10px 14px; }
.field-row button { font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-card { border: 1px solid var(--line); border-radius: 16px; padding: 18px 14px; background: #fffdf63d; }
.stat-card strong { display: block; font: 700 36px/1.1 var(--serif); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.stat-card h3 { font: 650 13px/1.35 system-ui, sans-serif; margin: 0; }
.stat-card p { color: var(--muted); font-size: 11px; margin: 6px 0 0; }
.badge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.badge-card { border: 1px solid var(--line); border-radius: 17px; padding: 20px; background: #fffdf64d; }
.badge-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.badge-symbol { flex: none; width: 53px; height: 58px; display: flex; align-items: center; justify-content: center; font: 700 27px/1 var(--serif); color: var(--ink); background: #e2d7b9; clip-path: polygon(50% 0, 95% 17%, 95% 73%, 50% 100%, 5% 73%, 5% 17%); }
.badge-symbol.earned { background: #e5bc60; }
.badge-card h4 { margin: 0 0 3px; font-size: 16px; }
.badge-card p { font-size: 13px; color: var(--muted); margin: 0; }
.badge-card progress { display: block; width: 100%; height: 8px; margin: 14px 0 9px; accent-color: var(--felt); border: 0; border-radius: 8px; overflow: hidden; background: var(--paper-shade); }
progress::-webkit-progress-bar { background: var(--paper-shade); border-radius: 8px; }
progress::-webkit-progress-value { background: var(--felt); border-radius: 8px; }
progress::-moz-progress-bar { background: var(--felt); border-radius: 8px; }
.badge-levels { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 13px 0 0; list-style: none; }
.badge-levels li { font-size: 10px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); }
.badge-levels li.earned { background: var(--felt); color: var(--paper); border-color: var(--felt); }
.inbox-actions { margin: 20px 0 0; }
.inbox-actions button { font-size: 13px; }
.notification-list { list-style: none; padding: 0; margin: 0; }
.notification { border-top: 1px solid var(--rule); padding: 22px 0; }
.notification h3 { font-family: system-ui, sans-serif; font-size: 16px; line-height: 1.4; margin: 0 0 5px; }
.notification p { font-size: 14px; margin-bottom: 8px; color: var(--muted); }
.notification.unread h3::before { content: ""; display: inline-block; background: var(--felt); width: 8px; height: 8px; border-radius: 50%; margin-right: 9px; vertical-align: middle; }
.notification time { font-size: 12px; color: var(--muted); }
.notification-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.notification-actions button, .notification-actions a { font-size: 12px; min-height: 44px; padding: 8px 14px; }
.muted-board-list { list-style: none; margin: 0; padding: 0; }
.muted-board-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.muted-board-list button { font-size: 12px; }
.footnote { font-size: 12px; margin-top: 22px; }
.scoring-notes { margin: 18px 0 28px; padding: 22px 30px; }
.scoring-notes summary { font-weight: 650; cursor: pointer; min-height: 26px; }
.scoring-notes p { font-size: 14px; color: var(--muted); margin: 16px 0 0; }
footer { justify-content: flex-start; flex-wrap: wrap; border-top: 1px solid var(--felt-rule); padding: 24px 0 40px; font-size: 14px; gap: 24px; }
.skip { position: absolute; top: -100px; left: 16px; background: var(--paper); color: var(--ink); padding: 12px; z-index: 5; }
.skip:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[role="tabpanel"]:focus-visible { outline: 3px solid #3382ed; outline-offset: 7px; }
@media (max-width: 720px) {
  .period-controls { align-items: flex-start; flex-direction: column; gap: 10px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leaderboard-sheet { padding: 28px 24px; }
}
@media (max-width: 480px) {
  .engagement-wrap { padding: 0 14px; }
  header { padding-top: 20px; }
  header .brand { font-size: 22px !important; gap: 9px !important; }
  header nav { gap: 10px; }
  .page-heading { padding-top: 29px; }
  .page-heading > p:last-child { font-size: 16px; }
  .leaderboard-sheet, .session-card { padding: 24px 17px; }
  .section-tabs { padding: 0 5px; gap: 3px; }
  .section-tabs button { font-size: 12px; padding: 10px 8px; min-height: 50px; gap: 4px; }
  .period-choices { width: 100%; gap: 5px; }
  .period-choices label { flex: 1; }
  .period-choices label span { padding: 8px 9px; font-size: 12px; }
  .metric-choices label { min-width: calc(50% - 4px); }
  .metric-choices label span { font-size: 12px; }
  .section-heading { gap: 8px; }
  h2 { font-size: 27px; }
  .section-heading .button-quiet { padding: 8px 12px; }
  .rank-table th, .rank-table td { padding-left: 7px; padding-right: 7px; }
  .rank-table th:last-child { max-width: 90px; }
  .rank-table td:first-child { width: 32px; }
  .rank-table td:last-child { font-size: 19px; }
  .badge-grid { grid-template-columns: 1fr; }
  .field-row button { width: 100%; }
  .scoring-notes { padding: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
