:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #1b2530;
  background: #f4f6f8;
  line-height: 1.55;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #095b91; }
a:hover { color: #063c60; }
img { max-width: 100%; }
.container { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }
.site-header { background: #1f1b17; box-shadow: 0 2px 10px #1112; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { display: block; width: 224px; height: auto; }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.site-header nav a { color: #f9f9f9; text-decoration: none; padding: 9px 4px; font-size: .95rem; }
.site-header nav a:hover { color: #a7dbff; }
.site-header nav .nav-action { background: #007ac3; border-radius: 7px; padding: 9px 15px; }
.site-header nav .nav-action:hover { background: #09669d; color: #fff; }
.main-content { min-height: calc(100vh - 170px); padding-block: 34px 70px; }
.site-footer { background: #1f1b17; color: #ddd; padding: 26px 0; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: #fff; }
h1, h2, h3 { line-height: 1.18; margin-top: 0; color: #17212c; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
p { margin: 0 0 1rem; }
.lead { font-size: 1.15rem; color: #526170; }
.section { margin-top: 48px; }
.grid { display: grid; gap: 18px; }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-grid, .service-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-grid > :only-child, .service-detail-grid > :only-child { max-width: 850px; }
.card, .form-card { background: #fff; border: 1px solid #dde3e8; border-radius: 16px; box-shadow: 0 4px 20px #1b253006; padding: 28px; }
.main-content > .card + .card { margin-top: 20px; }
.card h2, .card h3 { font-size: 1.2rem; }
.service-card { display: flex; flex-direction: column; align-items: flex-start; }
.service-card p { flex: 1; color: #526170; }
.service-card .button { margin-top: 8px; }
.prose { max-width: 850px; }
.prose ol, .prose ul { padding-left: 1.5rem; }
.prose li { margin-bottom: .65rem; }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 32px; background: #fff; border-radius: 16px; padding: clamp(24px, 4vw, 48px); border: 1px solid #dde3e8; }
.hero p { max-width: 620px; font-size: 1.1rem; color: #526170; }
.eyebrow { color: #0879bc !important; text-transform: uppercase; font-weight: 750; letter-spacing: .12em; font-size: .8rem !important; }
.hero-visual { display: grid; place-items: center; min-height: 240px; border-radius: 12px; background: linear-gradient(130deg, #d9edf9, #f0f6fa); padding: 24px; }
.hero-visual img { box-shadow: 0 12px 25px #164b6833; }
.network-banner { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 32px; }
.network-banner-label { color: #526170; font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.network-banner-scroll { width: min(468px, 100%); overflow-x: auto; }
.network-banner-scroll iframe { display: block; border: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button, button { display: inline-block; border: 1px solid #0078b9; border-radius: 7px; background: #0078b9; color: #fff; cursor: pointer; padding: 11px 17px; font: inherit; font-weight: 650; line-height: 1.2; text-decoration: none; }
.button:hover, button:hover { background: #075f91; color: #fff; }
.button-ghost { background: #fff; color: #075f91; }
.button-ghost:hover { background: #edf7fc; color: #075f91; }
.step { color: #0879bc; font-size: .82rem; font-weight: 800; letter-spacing: .1em; }
.supporting-link { margin: 20px 0 0; font-size: .9rem; }
.balance-note { margin-top: 18px; padding: 16px 20px; border-left: 4px solid #0879bc; background: #e1eff7; border-radius: 0 8px 8px 0; }
.callout { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: #e1eff7; border-radius: 12px; padding: 28px; }
.callout p { margin-bottom: 0; }
.page-heading { margin-bottom: 24px; max-width: 850px; }
.page-heading h1 { margin-bottom: 10px; font-size: clamp(1.8rem, 3vw, 2.45rem); letter-spacing: -.035em; overflow-wrap: anywhere; }
.page-heading p { color: #526170; }
.form-card { max-width: 760px; margin-bottom: 24px; }
.form-card label { display: block; margin: 16px 0 7px; font-size: .9rem; font-weight: 650; }
.form-card p label { margin-top: 0; }
input, select, textarea { width: 100%; max-width: 100%; border: 1px solid #b8c5d0; border-radius: 7px; padding: 10px 12px; background: #fff; color: #1b2530; font: inherit; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; padding: 0; flex: none; accent-color: #0078b9; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, a:focus-visible, button:focus-visible { outline: 3px solid #7ac2ec; outline-offset: 2px; }
.form-actions { margin-top: 22px; }
.notice, .flash { max-width: 760px; margin: 0 0 20px; padding: 13px 16px; border-radius: 7px; }
.notice-error, .flash-error { background: #fff0ee; border: 1px solid #eba69d; color: #812b20; }
.flash-success { background: #e9f8ed; border: 1px solid #9dd6aa; color: #285637; }
.stats { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); max-width: 760px; background: #fff; border: 1px solid #dde3e8; border-radius: 10px; overflow: hidden; }
.stats dt, .stats dd { margin: 0; padding: 11px 16px; border-bottom: 1px solid #e7ecef; }
.stats dd { text-align: right; font-weight: 700; overflow-wrap: anywhere; }
.stats dt:last-of-type, .stats dd:last-of-type { border-bottom: 0; }
.stats .health-value { min-width: 0; overflow-wrap: anywhere; }
.health-section { margin-top: 22px; }
.health-section + .health-section { border-top: 1px solid #e7ecef; padding-top: 22px; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; max-width: 100%; }
.admin-page { max-width: 100%; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.admin-heading form { flex: none; }
.admin-filters, .admin-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 22px 0; }
.admin-filters a { padding: 7px 12px; border: 1px solid #bbcbd7; border-radius: 6px; background: #fff; text-decoration: none; }
.admin-filters a[aria-current="page"] { background: #075f91; color: #fff; border-color: #075f91; }
.admin-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #dde3e8; border-radius: 10px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { border-bottom: 1px solid #e7ecef; padding: 10px 12px; text-align: left; vertical-align: top; }
.admin-table th { background: #eef4f7; white-space: nowrap; }
.admin-table td { max-width: 220px; overflow-wrap: anywhere; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #f7fafc; }
.admin-pagination span { font-weight: 650; }

/* Shared member and management workspace. */
.muted, .field-help, .table-secondary { color: #5c6b7b; }
.page-heading .section-kicker, .section-kicker { margin-bottom: 10px; color: #52677e; font-size: .73rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.workspace-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px; margin-bottom: 32px; border: 1px solid #dce3ea; border-radius: 12px; background: #eaf0f4; }
.workspace-nav-links { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.workspace-nav a { padding: 10px 16px; border-radius: 8px; color: #526170; font-size: .88rem; font-weight: 650; text-decoration: none; }
.workspace-nav a:hover { background: #ffffffa8; color: #075f91; }
.workspace-nav a[aria-current="page"] { background: #fff; color: #075f91; box-shadow: 0 1px 4px #20334518; }
.workspace-nav form { margin-left: auto; }
.workspace-nav form button { border-color: transparent; background: transparent; color: #526170; }
.workspace-nav form button:hover { background: #fff; color: #17212c; }
.button-small { font-size: .85rem; padding: 10px 14px; }
.dashboard-services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.dashboard-card { display: flex; flex-direction: column; min-width: 0; }
.service-card-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.service-symbol { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: #eaf1ff; color: #2e5aa7; font-size: 1rem; font-weight: 800; }
.service-symbol-banner { background: #e6f4f1; color: #207364; font-size: 1.55rem; }
.dashboard-card h2 { font-size: 1.45rem; margin-bottom: 12px; }
.dashboard-card > p { flex: 1; }
.dashboard-card .actions { margin-top: 12px; }
.card-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #e7ecef; font-size: .88rem; }
.card-links a { font-weight: 600; text-underline-offset: 3px; }
.dashboard-card > .card-footnote { flex: 0; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #e7ecef; font-size: .85rem; color: #5c6b7b; }
.dashboard-metric strong { display: block; font-size: 2rem; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.dashboard-metric span { font-size: .85rem; color: #5c6b7b; }
.account-shortcut { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 4px; margin-top: 10px; }
.account-shortcut p { margin: 3px 0 0; color: #5c6b7b; font-size: .88rem; }
.account-shortcut .button { flex: none; }
.account-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.account-identity { text-align: center; padding: 28px 20px; overflow-wrap: anywhere; }
.account-avatar { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; background: #e6eff8; color: #075f91; font-size: 1.7rem; font-weight: 750; }
.account-identity h2 { margin-bottom: 4px; }
.account-identity > p { margin-bottom: 14px; font-size: .9rem; }
.identity-footer { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e7ecef; font-size: .82rem; }
.identity-footer p { margin-bottom: 5px; color: #5c6b7b; }
.identity-footer a { text-decoration: none; font-weight: 650; }
.profile-form, .banner-form { width: 100%; max-width: none; }
.banner-form, .banner-overview { max-width: 880px; }
.banner-overview { margin-bottom: 24px; }
.banner-overview .stats { max-width: none; font-size: .9rem; }
.form-section { min-width: 0; padding: 0; margin: 0; border: 0; }
.form-section legend { padding: 0; margin-bottom: 6px; font-size: 1.13rem; font-weight: 750; letter-spacing: -.02em; }
.form-section + .form-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid #e7ecef; }
.form-section + .form-section legend { float: left; width: 100%; margin-bottom: 6px; }
.form-section + .form-section > .fields-grid { clear: both; }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.fields-grid > div { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field-help { font-size: .81rem; margin: 7px 0 0; line-height: 1.5; }
.readonly-field { display: block; min-height: 47px; border: 1px solid #e1e6ec; border-radius: 7px; background: #f4f6f8; padding: 10px 12px; color: #667484; overflow-wrap: anywhere; }
.form-actions-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid #e7ecef; margin-top: 28px; }
.form-actions-bar > a { font-size: .88rem; }
.form-disclosure { margin-top: 22px; border: 1px solid #dce3ea; border-radius: 10px; padding: 14px 18px; background: #f9fbfc; }
.form-disclosure summary { cursor: pointer; font-size: .9rem; font-weight: 650; }
.form-disclosure summary span { color: #5c6b7b; font-size: .8rem; font-weight: 400; margin-left: 8px; }
.form-disclosure[open] > summary { margin-bottom: 14px; }
.status-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 7px; font-size: .76rem; font-weight: 650; line-height: 1.5; white-space: nowrap; }
.status-neutral { background: #edf2f6; color: #536375; }
.status-positive { background: #e7f4ed; color: #246842; }
.status-warning { background: #fff2d9; color: #8d5d0a; }
.status-negative { background: #fceceb; color: #a1372d; }
.table-primary, .table-secondary { display: block; overflow-wrap: anywhere; }
.table-primary { font-weight: 650; }
.table-secondary { margin-top: 5px; font-size: .78rem; }
.number-value { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.table-link { display: inline-block; font-size: .88rem; font-weight: 650; text-underline-offset: 3px; padding-block: 4px; }
.admin-table th, .admin-table td { padding: 16px; }
.admin-table th { font-size: .76rem; color: #526170; font-weight: 650; }
.admin-table-wrap:focus-visible { outline: 3px solid #7ac2ec; outline-offset: 3px; }
.referral-mobile-label { display: none; }
.referral-session-details { margin-top: 6px; }
.referral-session-details summary { width: fit-content; color: #095b91; cursor: pointer; font-size: .8rem; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.referral-session-details summary:focus-visible { outline: 3px solid #7ac2ec; outline-offset: 2px; }
.referral-session-details code { display: block; max-width: 100%; margin-top: 6px; overflow-wrap: anywhere; }
.admin-edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.admin-member-form { max-width: none; }
.admin-edit-side .form-card { padding: 22px; }
.admin-edit-side .section-heading { margin: 0 0 18px; font-size: 1.05rem; }
.admin-edit-side .field-help + p { margin-top: 18px; margin-bottom: 0; }
.form-card .checkbox-field { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; }
.checkbox-field input { margin: 3px 0 0; }
.checkbox-field span { flex: 1; }
.danger-zone { border: 1px solid #eccfca; border-radius: 14px; padding: 22px; background: #fff9f8; }
.danger-zone h2 { font-size: 1.05rem; color: #963d33; }
.danger-zone p { color: #6c5b58; font-size: .85rem; }
.button-danger { color: #a1372d; background: #fff; border-color: #dcb0a9; }
.button-danger:hover { color: #fff; background: #a1372d; border-color: #a1372d; }
.empty-state { padding: 40px 24px; border: 1px dashed #c6d2dc; border-radius: 14px; background: #fff; text-align: center; }
.empty-state p { margin-bottom: 0; color: #5c6b7b; }
.section-heading { margin: 32px 0 18px; font-size: 1.35rem; }

@media (max-width: 900px) {
  .admin-edit-layout { grid-template-columns: 1fr; }
  .admin-edit-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .account-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 680px) {
  .main-content { padding-top: 22px; }
  .card, .form-card { padding: 22px; }
  .dashboard-services, .account-layout, .admin-edit-side { grid-template-columns: 1fr; gap: 18px; }
  .account-identity { text-align: left; }
  .account-avatar { float: left; width: 48px; height: 48px; margin: 0 14px 12px 0; border-radius: 14px; font-size: 1.3rem; }
  .account-identity > .status-badge { margin-top: 2px; }
  .identity-footer { display: none; }
  .workspace-nav { margin-bottom: 26px; }
  .workspace-nav a { padding: 10px 12px; }
  .member-nav .workspace-nav-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .member-nav a { text-align: center; font-size: .78rem; padding: 10px 4px; }
  .account-shortcut { align-items: flex-start; flex-direction: column; gap: 12px; padding-top: 14px; }
  .fields-grid { grid-template-columns: 1fr; }
  .stats dt, .stats dd { padding: 10px; font-size: .85rem; }
  .form-actions-bar { align-items: stretch; flex-direction: column; }
  .form-actions-bar > a { text-align: center; }
  .form-disclosure { padding: 14px; }
  .admin-members-table { min-width: 660px; }
  .admin-filters { gap: 8px; }
  .admin-filters a { font-size: .85rem; padding: 8px 10px; }
}

.task-balance { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; background: #e1eff7; border: 1px solid #c4dcea; padding: 20px 24px; border-radius: 12px; margin-bottom: 24px; }
.task-balance strong { font-size: 2rem; color: #075f91; }
.task-balance a { margin-left: auto; }
.task-types { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.task-type { display: flex; flex-direction: column; justify-content: center; border: 1px solid #b8c5d0; border-radius: 8px; padding: 10px 18px; background: #fff; text-decoration: none; font-weight: 650; }
.task-type.is-active { background: #075f91; color: #fff; border-color: #075f91; }
.task-unavailable { color: #62707c; background: #eef1f4; border-style: dashed; }
.task-type small { font-weight: 400; font-size: .75rem; }
.task-launch { margin-bottom: 28px; }
.task-launch [hidden], .task-stream [hidden] { display: none; }
.task-stream-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.task-stream-toolbar { background: #fff; }
.task-stream-toolbar h2 { margin-bottom: 12px; overflow-wrap: anywhere; }
.task-stream #stream-status { margin: 12px 0; color: #526170; }
#stream-progress { flex: 1; min-width: 0; height: 14px; accent-color: #0879bc; }
#stream-earned { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.task-stream-totals { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font-size: .88rem; color: #526170; }
.task-stream-totals strong { color: #21693c; }
.task-stream button:disabled, #task-stop:disabled { opacity: .6; cursor: default; }
.task-stream-page { background: #fff; }
.task-stream-shell { max-width: 920px; margin: 0 auto; padding: 14px 18px; }
.task-stream-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.task-stream-heading h1 { font-size: 1.12rem; margin: 0; }
.task-stream-heading a { font-size: .8rem; flex-shrink: 0; }
.task-stream-page .task-stream-toolbar { position: sticky; top: 0; z-index: 2; padding-bottom: 12px; }
.task-stream-page .task-stream-toolbar h2 { font-size: 1rem; margin-bottom: 8px; }
.task-stream-page .task-stream-actions button { font-size: .88rem; padding: 8px 12px; }
.task-stream-page #stream-status { margin: 9px 0; font-size: .85rem; }
.task-stream-page .task-stream-totals { margin-top: 8px; font-size: .8rem; }
.task-stream-video { aspect-ratio: 16 / 9; width: 100%; max-height: max(200px, calc(100dvh - 235px)); background: #101820; border-radius: 8px; overflow: hidden; }
.task-stream-video > div, .task-stream-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.task-stream-help { font-size: .78rem; color: #526170; margin: 10px 0 0; }
#task-launch-status { margin-top: 14px; }
.task-section-title { margin-top: 32px; }
.task-cards { display: grid; gap: 12px; }
.task-card { display: flex; align-items: center; gap: 20px; padding: 22px; }
.task-card h3 { margin-bottom: 6px; overflow-wrap: anywhere; }
.task-card p { margin: 0; color: #526170; font-size: .9rem; }
.task-rank { flex-shrink: 0; color: #526170; font-weight: 700; border: 1px solid #dce4e9; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; }
.task-reward { margin-left: auto; text-align: right; flex-shrink: 0; }
.task-reward strong { color: #21693c; font-size: 1.55rem; display: block; }
.task-reward span, .task-hint { font-size: .88rem; color: #526170; }
.task-hint { margin-top: 16px; }
.task-form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.task-setup { max-width: 760px; }
.task-setup summary { cursor: pointer; font-weight: 650; }
.task-setup p { margin-top: 18px; }
.task-table-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.task-table-actions button { padding: 8px 11px; font-size: .82rem; }
.task-rules { margin-top: 36px; max-width: 850px; color: #526170; }
.task-rules h2 { font-size: 1.2rem; }
.task-rules li { margin-bottom: 8px; }
.task-player h1 { font-size: clamp(1.5rem,3vw,2rem); overflow-wrap: anywhere; }
.task-player [hidden] { display: none; }
.task-toolbar { position: sticky; top: 0; z-index: 2; background: #fff; padding: 14px 0 18px; border-bottom: 1px solid #e7ecef; }
.task-toolbar .actions { margin-top: 12px; }
.task-toolbar #task-status { margin-top: 12px; margin-bottom: 0; }
.task-progress-row { display: flex; gap: 14px; align-items: center; }
#task-progress { flex: 1; min-width: 0; height: 18px; accent-color: #0879bc; }
#task-target { margin: 24px 0; }
#task-target iframe { width: 100%; min-height: 390px; border: 1px solid #dce4e9; border-radius: 8px; background: #f4f6f8; }
.task-player button:disabled, #task-open:disabled { opacity: .6; cursor: wait; }
@media (max-width: 580px) {
  .site-header nav { gap: 3px 10px; }
  .site-header nav a { padding: 7px 3px; font-size: .9rem; }
  .hero .actions .button, .service-card .button { width: 100%; text-align: center; }
  .task-card { flex-wrap: wrap; gap: 12px; }
  .task-card > div:first-of-type { flex: 1; min-width: 180px; }
  .task-reward { text-align: left; margin-left: 46px; }
  .task-form-grid { grid-template-columns: 1fr; gap: 0; }
  .task-balance a { margin-left: 0; }
  .task-type { flex: 1 0 44%; }
  .task-player { padding: 18px; }
}

@media (max-width: 820px) {
  .header-inner { display: block; padding-block: 10px 16px; }
  .brand img { width: 190px; }
  .site-header nav { margin-top: 8px; }
  .three, .hero, .service-grid, .service-detail-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 160px; }
  .callout, .admin-heading { align-items: flex-start; flex-direction: column; }
}
.referral-card { margin-bottom: 1.25rem; }
.referral-copy-row { display: flex; gap: .75rem; align-items: center; }
.referral-copy-row input { flex: 1; min-width: 0; }
.referral-copy-row button { flex: none; }
.referral-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.referral-stats p { display: flex; flex-direction: column; gap: .25rem; margin: 0; }
.referral-stats strong { font-size: 1.7rem; }
@media (max-width: 640px) {
  .referral-copy-row { align-items: stretch; flex-direction: column; }
  .referral-stats { grid-template-columns: 1fr; }
  .referral-admin-table-wrap { overflow: visible; border: 0; background: transparent; }
  .referral-admin-table, .referral-admin-table tbody { display: block; width: 100%; }
  .referral-admin-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .referral-admin-table tbody tr { display: block; margin-bottom: 12px; padding: 4px 16px; border: 1px solid #dde3e8; border-radius: 10px; background: #fff; }
  .referral-admin-table tbody tr:hover { background: #f7fafc; }
  .referral-admin-table tbody tr td { display: block; max-width: none; padding: 9px 0; border-bottom: 1px solid #e7ecef; overflow-wrap: break-word; }
  .referral-admin-table tbody tr td:last-child { border-bottom: 0; }
  .referral-mobile-label { display: block; margin-bottom: 3px; color: #526170; font-size: .75rem; font-weight: 700; }
  .referral-admin-table .referral-action-cell button { display: block; width: 100%; min-height: 44px; white-space: nowrap; }
  .referral-admin-table .referral-session-details summary { display: inline-flex; align-items: center; min-height: 44px; }
  .referral-admin-table .referral-points-cell { color: #246842; font-weight: 700; font-variant-numeric: tabular-nums; }
  .referral-admin-table .table-secondary { margin-top: 2px; }
}
