:root {
  --bg: #F7F6F2;
  --surface: #FBFAF5;
  --surface-alt: #F1EFE8;
  --border: #D4D1CA;
  --border-soft: #E4E1DA;
  --text: #28251D;
  --text-muted: #7A7974;
  --text-faint: #BAB9B4;
  --accent: #01696F;
  --accent-dark: #0C4E54;
  --accent-wash: #E6F1F1;
  --gold: #FFC553;
  --gold-soft: #FFF0C7;
  --success: #437A22;
  --danger: #A12C7B;
  --warning: #964219;

  --font-display: "Cabinet Grotesk", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(40,37,29,0.04), 0 4px 12px rgba(40,37,29,0.04);
  --shadow-card-hover: 0 2px 4px rgba(40,37,29,0.06), 0 12px 28px rgba(40,37,29,0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-dark); text-decoration: none; border-bottom: 1px solid rgba(12,78,84,0.3); transition: border-color 0.15s; }
a:hover { border-bottom-color: var(--accent-dark); }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==== HEADER ==== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 24px;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
}
.brand-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.brand-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-top: 2px;
}
.brand-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==== PROGRESS BAR ==== */
.progress-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(40,37,29,0.03);
}
.progress-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}
.progress-stats {
  display: flex;
  gap: 28px;
  align-items: baseline;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-total .stat-value { color: var(--text-muted); }
.stat:nth-child(1) .stat-value { color: var(--success); }
.stat:nth-child(2) .stat-value { color: var(--text-faint); }
.stat:nth-child(3) .stat-value { color: var(--accent); }
.stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.progress-actions {
  display: flex;
  gap: 8px;
}
.btn-ghost {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-wash);
}
.progress-track {
  height: 4px;
  background: var(--surface-alt);
  display: flex;
  overflow: hidden;
}
.progress-fill-attending {
  height: 100%;
  background: var(--success);
  width: 0;
  transition: width 0.3s ease;
}
.progress-fill-skipped {
  height: 100%;
  background: var(--text-faint);
  width: 0;
  transition: width 0.3s ease;
}

/* ==== FILTERS ==== */
.filters {
  background: var(--bg);
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--border-soft);
}
.filters-inner {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--accent);
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.chip-count {
  color: var(--text-faint);
  margin-left: 4px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.chip.active .chip-count { color: rgba(255,255,255,0.7); }

/* ==== CARDS ==== */
.cards {
  list-style: none;
  padding: 32px 0 48px;
  margin: 0;
  display: grid;
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: auto 60px 1fr auto;
  gap: 22px;
  align-items: start;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  position: relative;
  box-shadow: var(--shadow-card);
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border);
}
.card.status-attending {
  border-color: var(--success);
  background: linear-gradient(to right, rgba(67,122,34,0.04), var(--surface) 20%);
}
.card.status-skipped {
  opacity: 0.55;
  background: var(--surface-alt);
}
.card.status-skipped .card-title { text-decoration: line-through; text-decoration-color: var(--text-faint); }

/* Rank */
.card-rank {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}
.card.status-skipped .card-rank { color: var(--text-faint); }

/* Checkbox column */
.card-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}
.check {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.15s;
}
.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  background: var(--surface);
  transition: all 0.15s;
  flex-shrink: 0;
}
.check input:hover { border-color: var(--accent); }
.check-yes input:checked {
  background: var(--success);
  border-color: var(--success);
}
.check-no input:checked {
  background: var(--text-faint);
  border-color: var(--text-faint);
}
.check input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-yes input:checked ~ .check-text { color: var(--success); }
.check-no input:checked ~ .check-text { color: var(--text-muted); }

/* Body */
.card-body { min-width: 0; }
.card-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 4px;
}
.card-host {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--surface-alt);
  color: var(--text-muted);
  white-space: nowrap;
}
.tag-city {
  background: var(--accent-wash);
  color: var(--accent-dark);
}
.tag-youth {
  background: var(--gold-soft);
  color: var(--warning);
}
.tag-cadence {
  background: #EEE8F2;
  color: #6B3E8F;
}
.card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 20px;
  margin-bottom: 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.meta-item { color: var(--text); }
.meta-item strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.meta-item .val { color: var(--text); }
.meta-item.next .val { color: var(--accent-dark); font-weight: 500; }
.card-activity {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.55;
}
.card-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-soft);
}
.card-links .link-item {
  display: flex;
  gap: 4px;
  align-items: baseline;
}
.card-links .link-item strong {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
}

/* Notes column */
.card-notes {
  min-width: 200px;
  max-width: 240px;
}
.card-notes label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.card-notes textarea {
  width: 100%;
  min-height: 84px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  resize: vertical;
  transition: border-color 0.15s, background 0.15s;
}
.card-notes textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
.card-notes textarea::placeholder { color: var(--text-faint); }

/* Empty state */
.empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ==== FOOTER ==== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 48px;
  background: var(--surface);
  margin-top: 32px;
}
.site-footer p {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text);
}
.site-footer .muted {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==== RESPONSIVE ==== */
@media (max-width: 900px) {
  .card {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "rank body"
      "checks checks"
      "notes notes";
    gap: 16px;
  }
  .card-rank { grid-area: rank; font-size: 26px; padding-top: 0; }
  .card-body { grid-area: body; }
  .card-checks { grid-area: checks; flex-direction: row; padding-top: 0; border-top: 1px dashed var(--border-soft); padding-top: 14px; }
  .card-notes { grid-area: notes; max-width: none; }
  .progress-stats { gap: 20px; }
  .stat-value { font-size: 22px; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .brand-title { font-size: 19px; }
  .brand-meta { font-size: 12px; }
  .card { padding: 18px; }
  .card-title { font-size: 17px; }
  .filters-inner { gap: 16px; }
  .filter-group { width: 100%; }
}

/* ==== PRINT ==== */
@media print {
  .progress-bar, .filters, .site-footer, .progress-actions, .card-notes textarea, .card-checks { display: none; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid var(--border); }
  .card.status-skipped { display: none; }
  body { background: #fff; }
  .site-header { border-bottom: 2px solid var(--text); }
}
