/* Rally's shared visual system. Loaded last in hosted and native clients. */
:root {
  --rally-blue:var(--rally-palette-primary,#155eef); --rally-blue-hover:var(--rally-palette-hover,#004eeb); --rally-ink:#16243a;
  --rally-muted:#4b5d75; --rally-line:var(--rally-palette-line,#dce5f0); --rally-tint:var(--rally-palette-tint,#eff5ff);
  --bg:#f7f9fc; --paper:#f7f9fc; --surface:#fff; --ink:var(--rally-ink);
  --muted:var(--rally-muted); --line:var(--rally-line);
  --primary:var(--rally-blue); --primary-hover:var(--rally-blue-hover);
  --coral:var(--rally-blue); --purple:var(--rally-blue); --aubergine:var(--rally-palette-link,#1247ad);
  --sidebar:var(--rally-palette-sidebar,#102a56); --phone-ink:var(--rally-ink); --phone-muted:var(--rally-muted);
  --phone-accent:var(--rally-blue); --phone-line:var(--rally-line);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color:var(--rally-ink); color-scheme:light;
}
@media screen {
  html,body { background:#f7f9fc; color:var(--rally-ink); }
  body { font-size:16px; line-height:1.5; }
  button,input,select,textarea { font-family:inherit; }
  input,select,textarea,.field input,.field select,.field textarea { font-size:17px; color:var(--rally-ink); }
  .field { min-width:0; font-size:16px; color:var(--rally-ink); }
  .field input,.field select,.field textarea { min-height:50px; min-width:0; max-width:100%; border-color:var(--rally-palette-control,#aabed8); }
  input::placeholder,textarea::placeholder { color:#596c85; opacity:1; }
  .field-hint,.field small,.muted,.preview-link,footer { color:var(--rally-muted); line-height:1.5; }
  .btn,button,.button { font-size:16px; }
  .btn,.button { min-height:46px; }
  .btn.primary,.primary,.phone-app .btn.primary,.modal .btn.primary { background:var(--rally-blue); border-color:var(--rally-blue); color:white; }
  .btn.primary:hover,.primary:hover { background:var(--rally-blue-hover); border-color:var(--rally-blue-hover); color:#fff; }
  .btn.ghost,.text-btn,.link-button { color:var(--rally-palette-link,#1247ad); }
  input[type=checkbox],input[type=radio] { accent-color:var(--rally-blue); }
  :is(button,a,input,select,textarea,summary):focus-visible { outline:3px solid var(--rally-palette-primary,#155eef); outline-offset:3px; }
  .brand span,.wordmark>span:last-child,.spark,.phone-brand>span,.phone-brand>svg { color:var(--rally-blue); }
  .brand,.wordmark,.phone-brand { color:var(--rally-ink); }
  .badge.purple,.badge.blue { background:var(--rally-palette-active,#eaf1ff); color:var(--rally-palette-link,#1247ad); }
  .badge.green,.status-badge.green,.payment-badge.paid { background:#e8f7ee; color:#166341; }
  .badge.amber,.status-badge.amber { background:#fff3d6; color:#7a4a00; }
  .badge.red,.status-badge.red { background:#fff0ee; color:#a12824; }
  .notice { color:#4b5d75; }
  .toast { background:var(--rally-palette-sidebar,#102a56); color:#fff; }
  .tabs .active,.kind-option.active { background:var(--rally-palette-active,#eaf1ff); color:var(--rally-palette-link,#1247ad); border-color:var(--rally-palette-primary,#155eef); }
  .tab.active { color:var(--rally-palette-link,#1247ad); border-color:var(--rally-palette-primary,#155eef); }
  .sidebar { color:#fff; }
  .sidebar .nav-item { color:#d9e7ff; }
  .sidebar .nav-item.active { color:#fff; background:var(--rally-palette-primary,#155eef); }
  .sidebar .brand { color:#fff; }
  .sidebar .brand small,.sidebar .workspace-switch,.sidebar .workspace-switch small,.sidebar .workspace-switch>svg:last-child,
  .sidebar .nav-count,.sidebar .sidebar-help,.sidebar .sidebar-help strong,.sidebar .sidebar-help .btn,
  .sidebar .sidebar-user strong,.sidebar .sidebar-user small,.sidebar .sidebar-user .avatar,
  .sidebar .sidebar-tip,.sidebar .sidebar-tip strong,.sidebar .sidebar-tip small,.sidebar .sidebar-tip>span { color:#fff; }
  .sidebar .nav-label,.sidebar .brand-caption { color:#c7dcff; }
  .sidebar .brand .brand-mark,.sidebar .brand-mark>svg { color:#fff; }
  .event-hero { background:linear-gradient(105deg,var(--rally-palette-tint,#eff5ff),var(--rally-palette-hero,#e7efff)); border-color:var(--rally-palette-line,#dce5f0); }
  .event-hero h2 { color:#16243a; }
  .event-hero .hero-info>p,.event-hero .event-meta,.event-hero .hero-status,.event-hero .days-card { color:#4b5d75; }
  .event-hero .hero-pills .badge { background:var(--rally-palette-strong-tint,#dce8ff); color:var(--rally-palette-link,#1247ad); }
  .event-hero .orbit { border-color:#abc8ff; }
  .event-hero .art-star { color:var(--rally-palette-primary,#155eef); }
  .trophy-illustration { background:linear-gradient(145deg,var(--rally-palette-highlight,#4a85ff),var(--rally-palette-primary,#155eef)); color:#fff; box-shadow:0 17px 26px var(--rally-palette-shadow,#155eef22); }
  .trophy-illustration svg { filter:none; }
  .event-hero .days-card { background:#fff; }
  .btn.dark,.ticket-header,.ticket-header p { color:#fff; }
  .phone-header .sync-status { font-size:14px; color:var(--rally-muted); }
  .phone-profile { background:var(--rally-palette-active,#eaf1ff); color:var(--rally-palette-link,#1247ad); }
  .phone-event-switch { font-size:16px; background:var(--rally-palette-tint,#eff5ff); color:var(--rally-palette-event-label,#173c74); }
  .phone-tabs { border-color:var(--rally-line); }
  .phone-tabs button { font-size:13px; color:#4b5d75; }
  .phone-tabs button[aria-current] { color:var(--rally-palette-link,#1247ad); background:var(--rally-palette-active,#eaf1ff); }
  .phone-people-tabs { background:#eaf0f8; }
  .phone-people-tabs button { font-size:14px; color:#4b5d75; }
  .phone-people-tabs button[aria-current] { color:var(--rally-palette-link,#1247ad); }
  .phone-event-card { background:var(--rally-palette-primary,#155eef); box-shadow:0 6px 18px var(--rally-palette-shadow-soft,#155eef18); }
  .phone-event-card h2,.phone-event-card p,.phone-overline { color:#fff; }
  .phone-event-card p { font-size:16px; }
  .phone-overline { font-size:14px; }
  .phone-event-card .btn { color:var(--rally-palette-link,#1247ad); background:#fff; border-color:#fff; }
  .phone-metrics span { font-size:14px; }
  .phone-link strong { font-size:17px; }
  .phone-link small { font-size:15px; }
  .phone-link-icon { background:var(--rally-palette-active,#eaf1ff); color:var(--rally-palette-link,#1247ad); }
  .phone-app .panel-head p,.phone-app .panel-body p,.phone-app .muted,.modal .muted { font-size:15px; }
  .phone-app .btn,.modal .btn,.phone-app .text-btn,.modal .text-btn,.phone-disclosure>summary { font-size:16px; }
  .phone-app .field,.modal .field { font-size:16px; color:var(--rally-ink); }
  .phone-app .field input,.phone-app .field select,.phone-app .field textarea,.modal .field input,.modal .field select,.modal .field textarea { font-size:17px; color:var(--rally-ink); border-color:var(--rally-palette-control,#aabed8); }
  .phone-app .field small,.modal .field small,.phone-app .field-hint,.modal .field-hint { font-size:14px; }
  .phone-app .notice,.modal .notice { font-size:15px; color:var(--rally-muted); }
  .phone-form-section { color:var(--rally-palette-link,#1247ad); }
  body:has(.phone-app)::before { background:#f7f9fc; }
  body.modal-open:has(.phone-app)::before { background:#fff; }
  .phone-more-actions .phone-danger-action { color:#a12824; background:#fff0ee; border-color:#e6b7b1; }
  .native-admission-result.success { color:#115737; background:#e8f7ee; }
  .native-admission-result.error { color:#842a26; background:#fff0ee; }
  /* Public registration: readable labels, compact event context, clear next action. */
  .registration-wrap .intro p,.panel-top p,.section-heading p,.status-header p { font-size:16px; color:var(--rally-muted); }
  .registration-wrap .event-card { background:var(--rally-palette-link,#1247ad); }
  .registration-wrap .event-art { background:linear-gradient(120deg,var(--rally-palette-primary,#155eef),var(--rally-palette-link,#1247ad)); }
  .registration-wrap .event-card :is(h2,.eyebrow,.event-detail,.event-detail strong,.detail-icon,.event-description) { color:#fff; }
  .kind-option strong { font-size:16px; color:var(--rally-ink); }
  .kind-option small { font-size:14px; color:var(--rally-muted); }
  .kind-option.active strong,.kind-option.active .kind-icon { color:var(--rally-palette-link,#1247ad); }
  .kind-option .kind-icon { display:none; }
  .section-heading h3 { font-size:20px; }
  .field .optional { font-size:12px; color:var(--rally-muted); }
  .team-entry { background:#f7f9fc; border-color:var(--rally-palette-line,#dce5f0); }
  .team-entry-head h4 { font-size:16px; color:var(--rally-palette-link,#1247ad); }
  .team-count { display:none; }
  .remove-team { min-height:44px; font-size:14px; color:#a12824; padding:8px; }
  .add-team-button { margin-top:16px; width:100%; color:var(--rally-palette-link,#1247ad); border-color:var(--rally-palette-control,#aabed8); }
  .roster-details { grid-column:1/-1; min-width:0; }
  .roster-details summary { min-height:44px; padding:10px 0; font-size:15px; font-weight:600; color:var(--rally-palette-link,#1247ad); cursor:pointer; }
  .roster-details p { font-size:14px; color:var(--rally-muted); }
  .inline-notice,.private-link p,.checkbox-label,.price-help,.submit-note { font-size:15px; line-height:1.6; color:var(--rally-muted); }
  .inline-notice strong,.private-link h3 { color:var(--rally-ink); }
  .checkbox-label { padding:8px 0; gap:12px; }
  .checkbox-label input { width:24px; height:24px; margin-top:2px; accent-color:var(--rally-blue); }
  .submit-row .btn { font-size:16px; white-space:normal; min-height:52px; }
  .form-error { font-size:16px; color:#a12824; }
  .quote-row { font-size:16px; color:#644b2c; }
  .price-summary h3 { font-size:20px; }
  .quote-row.quote-total { font-size:17px; }
  .quote-row.quote-total>strong { font-size:22px; }
  .price-help,.price-summary .eyebrow,.payment-badge:not(.paid) { color:#644b2c; }
  .summary-row { font-size:16px; }
  .summary-row>span,.summary-row>strong { color:var(--rally-ink); }
  .copy-row input { font-size:16px; color:var(--rally-muted); }
  .status-note p,.closed-state p,.error-wrap p { font-size:16px; color:var(--rally-muted); }
  .status-note .eyebrow { font-size:13px; }
  .organizer-link { font-size:14px; color:var(--rally-palette-link,#1247ad); }
  .site-footer,.update-note { font-size:14px; color:var(--rally-muted); }
  .privacy-note { color:var(--rally-muted); }
  /* Account, ticket and payment pages use the same field scale. */
  body:has(#account-content) label,.ticket-form label { font-size:16px; }
  .ticket-code { font-size:14px; }
  .ticket-form input,.ticket-form select { font-size:17px; min-height:50px; }
  .ticket-form input[type=checkbox] { min-height:24px; width:24px; }
}
@media screen and (max-width:740px) {
  .site-header { padding:16px; }
  .registration-wrap { margin:0 14px 28px; }
  .registration-wrap .intro { margin-bottom:18px; }
  .registration-wrap .intro .eyebrow { display:none; }
  .registration-wrap .intro h1 { font-size:28px; margin-bottom:8px; }
  .registration-wrap .intro p { font-size:16px; }
  .main-grid { gap:18px; }
  .event-card-body { padding:18px; }
  .event-card h2 { font-size:22px; }
  .event-card .event-detail { font-size:14px; }
  .registration-form,.panel-top,.status-body,.status-header { padding:20px 16px; }
  .kind-switch { padding:18px 16px 0; }
  .kind-option { padding:14px 10px; }
  .kind-option small { font-size:14px; line-height:1.4; }
  .form-grid { grid-template-columns:minmax(0,1fr); }
  .form-section+.form-section { padding-top:24px; margin-top:28px; }
  .team-entry { padding:16px 12px; }
  .section-heading { align-items:flex-start; }
  .price-summary-head { flex-wrap:wrap; }
  .status-header { flex-direction:column; }
  .status-header .state-icon { display:none; }
  #status-title { scroll-margin-top:24px; }
  .phone-quick-actions { grid-template-columns:1fr; }
  .phone-app .intake-toolbar .tabs { column-gap:10px; }
  .phone-app .intake-toolbar .tab { font-size:15px; }
  .phone-app .intake-card-contact { font-size:15px; overflow-wrap:anywhere; }
}
