:root {
  --bg: #0b0b0b;
  --bg-2: #111111;
  --panel: #141414;
  --panel-2: #1b1b1b;
  --panel-3: #0f0f0f;
  --text: #f5f5f5;
  --muted: #b8b8b8;
  --gold: #f1c40f;
  --green: #1ed760;
  --danger: #ff7b7b;
  --border: rgba(255,255,255,.08);
  --shadow: 0 12px 30px rgba(0,0,0,.24);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(241,196,15,.07), transparent 32%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: rgba(16,16,16,.95);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--border);
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand-block { margin-bottom: 28px; }

.brand-kicker,
.page-kicker {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.brand-title {
  font-size: 14px;
  font-weight: 800;
  margin-top: 8px;
}

.brand-subtitle {
  color: var(--muted);
  margin-top: 6px;
}

.nav-links {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-weight: 700;
  transition: .2s ease;
}

.nav-link.active,
.nav-link:hover {
  border-color: rgba(241,196,15,.45);
  background: #1a1710;
  transform: translateY(-1px);
}

.sidebar-panel,
.card,
.table-wrap,
.hero,
.filter-bar,
.empty-state,
.form-card,
.alert,
.meeting-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.sidebar-panel {
  padding: 16px;
  margin-bottom: 14px;
}

.panel-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  margin: 8px 0;
}

.panel-row strong {
  color: var(--text);
  text-align: right;
}

.support-panel {
  text-align: center;
  padding: 14px;
  overflow: hidden;
}

.support-title {
  color: var(--text);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: none;
  margin-bottom: 10px;
}

.support-text {
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
  font-size: 14px;
}

.support-link {
  display: block;
  width: 100%;
}

.sidebar-paypal-image {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
}

.main-content {
  padding: 28px;
  min-width: 0;
}

.page-header {
  margin-bottom: 22px;
}

.page-header h1 {
  margin: 6px 0 8px;
  font-size: 18px;
}

.page-intro {
  color: var(--muted);
  max-width: 900px;
}

.hero {
  padding: 22px;
  margin-bottom: 22px;
}

.hero-grid,
.stats-grid,
.cards-grid,
.weights-grid,
.meeting-grid,
.info-grid {
  display: grid;
  gap: 14px;
}

.hero-grid {
  grid-template-columns: 2fr 1fr;
  align-items: start;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cards-grid,
.meeting-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.weights-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.info-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat-card,
.card,
.form-card,
.meeting-block {
  padding: 16px;
}

.narrow-card {
  max-width: 520px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 8px;
}

.stat-note {
  color: var(--muted);
  margin-top: 6px;
}

.card-title {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 8px;
}

.card-subtitle {
  color: var(--muted);
  margin-bottom: 16px;
}

.badge-row,
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 700;
}

.badge.gold {
  color: #111;
  background: var(--gold);
  border-color: var(--gold);
}

.badge.green {
  color: #08150c;
  background: var(--green);
  border-color: var(--green);
}

.badge.red {
  color: #250808;
  background: var(--danger);
  border-color: var(--danger);
}

.badge.outline {
  background: transparent;
}

.kv-list {
  display: grid;
  gap: 8px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.kv-row span {
  color: var(--muted);
}

.section-title {
  margin: 6px 0 14px;
  font-size: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 20px 0 14px;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gold);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: #111;
  position: sticky;
  top: 0;
  z-index: 1;
}

tr:hover td {
  background: rgba(255,255,255,.02);
}

tr.value-row td {
  background: rgba(30,215,96,.04);
}

.muted { color: var(--muted); }
.small { font-size: 13px; }

.filter-bar {
  padding: 14px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.filter-group {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.filter-group.grow {
  flex: 1 1 260px;
}

label {
  color: var(--muted);
  font-size: 13px;
}

select,
input,
textarea {
  background: var(--panel-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  width: 100%;
}

select:focus,
input:focus,
textarea:focus {
  border-color: rgba(241,196,15,.4);
  box-shadow: 0 0 0 3px rgba(241,196,15,.08);
}

textarea { resize: vertical; }

.button {
  display: inline-block;
  background: var(--gold);
  color: #111;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
  text-align: center;
}

.button:hover {
  transform: translateY(-1px);
}

.button.secondary {
  background: #222;
  color: var(--text);
  border: 1px solid var(--border);
}

.button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.stack {
  display: grid;
  gap: 14px;
}

.empty-state {
  padding: 24px;
  color: var(--muted);
}

.inline-link {
  color: var(--gold);
  font-weight: 700;
}

.reason-list {
  margin: 0;
  padding-left: 18px;
}

.alert {
  padding: 14px 16px;
  margin-bottom: 16px;
}

.alert.success {
  border-color: rgba(30,215,96,.35);
}

.alert.danger {
  border-color: rgba(255,123,123,.35);
}

.hero-countdown {
  font-size: 30px;
  font-weight: 800;
  margin: 8px 0;
  word-break: break-word;
}

.meeting-block h3,
.meeting-block h4 {
  margin: 0 0 8px;
}

.meeting-meta {
  color: var(--muted);
  margin-bottom: 12px;
}

.card-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
}

.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  opacity: 0;
  pointer-events: none;
}

.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}

.nap-card {
  min-height: 100%;
}

.nap-title {
  font-size: 32px;
  margin: 0 0 8px;
  line-height: 1.1;
}

.nap-race-name {
  margin-top: -6px;
  margin-bottom: 10px;
}

.nap-metrics {
  margin-top: 12px;
}

.nap-label {
  color: var(--gold);
  font-weight: 800;
  font-size: 14px;
}

/* Tablet */
@media (max-width: 1180px) {
  .site-shell {
    grid-template-columns: 240px 1fr;
  }

  .sidebar {
    padding: 18px;
  }

  .main-content {
    padding: 20px;
  }

  .hero-grid {
    grid-template-columns: 1.4fr 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-title {
    font-size: 22px;
  }

  .nap-title {
    font-size: 28px;
  }

  table {
    min-width: 860px;
  }
}

/* Large mobile / small tablet */
@media (max-width: 900px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    top: auto;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }

  .nav-links {
    grid-template-columns: 1fr 1fr;
  }

  .main-content {
    padding: 16px;
  }

  .hero,
  .card,
  .form-card,
  .meeting-block,
  .sidebar-panel {
    border-radius: 16px;
  }

  .hero-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .meeting-grid,
  .weights-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header .button,
  .section-header .button.secondary {
    width: 100%;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group,
  .filter-group.grow {
    min-width: 100%;
    flex: 1 1 100%;
  }

  .filter-bar .button {
    width: 100%;
  }

  .sidebar-paypal-image {
    max-width: 200px;
  }

  .nap-title {
    font-size: 24px;
  }

  .hero-countdown {
    font-size: 26px;
  }

  table {
    min-width: 760px;
  }
}

/* Mobile phones */
@media (max-width: 640px) {
  .sidebar,
  .main-content {
    padding: 12px;
  }

  .brand-kicker,
  .page-kicker {
    font-size: 11px;
    letter-spacing: .12em;
  }

  .brand-title {
    font-size: 13px;
  }

  .page-header h1 {
    font-size: 17px;
  }

  .page-intro {
    font-size: 14px;
    line-height: 1.45;
  }

  .hero,
  .stat-card,
  .card,
  .form-card,
  .meeting-block,
  .sidebar-panel {
    padding: 14px;
  }

  .section-title {
    font-size: 20px;
    line-height: 1.2;
  }

  .card-title {
    font-size: 15px;
  }

  .card-subtitle,
  .meeting-meta,
  .small,
  .muted,
  label {
    font-size: 12px;
  }

  .stat-label,
  .nap-label {
    font-size: 12px;
  }

  .stat-value {
    font-size: 20px;
  }

  .hero-countdown {
    font-size: 22px;
  }

  .badge {
    font-size: 11px;
    padding: 6px 9px;
  }

  .button,
  .button.secondary,
  .button.ghost {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
  }

  .actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-row,
  .kv-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .panel-row strong {
    text-align: left;
  }

  .nav-links {
    grid-template-columns: 1fr;
  }

  .support-text {
    font-size: 13px;
  }

  .sidebar-paypal-image {
    max-width: 180px;
  }

  .nap-title {
    font-size: 21px;
  }

  .nap-race-name {
    margin-top: 0;
  }

  table {
    min-width: 680px;
  }
}