:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #26292d;
  --muted: #636971;
  --border: #e3e5e7;
  --border-strong: #cfd3d8;
  --accent: #4945c6;
  --accent-hover: #37339c;
  --accent-soft: #eeedfc;
  --success-bg: #ecfdf3;
  --success-border: #abefc6;
  --success-text: #067647;
  --danger-bg: #fef3f2;
  --danger-border: #fecdca;
  --danger-text: #b42318;
  --warn-bg: #fffaeb;
  --warn-border: #fedf89;
  --warn-text: #b54708;
  --radius: 8px;
  --radius-sm: 6px;
  --max-width: 880px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.12s ease;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container--wide {
  max-width: 1060px;
}

.container--narrow {
  max-width: 620px;
}

/* Header (shadcn/ui minimal translucent hairline bar — clean on desktop & mobile) */
.site-header {
  background: rgba(250, 250, 249, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 56px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.site-brand {
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  color: var(--text);
  font-size: 0.98rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-brand:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  min-width: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  flex: 0 0 auto;
}

.site-nav form {
  flex: 0 0 auto;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Main layout (Tufte whitespace) */
main {
  padding: 44px 0 80px;
}

/* Hero — open editorial layout, NO card */
.hero {
  padding: 4px 0 36px;
}

.hero__eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 3.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
  max-width: 22ch;
}

.hero__lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 62ch;
}

/* Full-width pure white band for standalone linked logos — zero contrast with logo backgrounds */
.partner-band {
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 30px 0 34px;
  margin-bottom: 52px;
}

.partner-strip__label {
  display: block;
  margin-bottom: 18px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 44px;
}

.partner-logo-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.partner-logo-link:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.partner-logo-link img {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Optically balanced heights for different aspect ratios (6.4:1 vs 1.8:1 vs 2.2:1) */
.partner-logo-link--eeel img {
  height: 46px;
}

.partner-logo-link--buildest img {
  height: 70px;
}

.partner-logo-link--walless img {
  height: 62px;
}

/* Sections */
.section {
  margin-bottom: 64px;
}

.section:last-child {
  margin-bottom: 0;
}

.section__header {
  margin-bottom: 24px;
}

.section__title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.018em;
}

.section__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

/* Editorial 2-col grid (no cards — hairline top rules only, Tufte inspired) */
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 40px;
  align-items: start;
}

.editorial-item {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

@media (max-width: 720px) {
  .container {
    padding: 0 18px;
  }
  .site-header {
    position: static;
  }
  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  .site-brand {
    padding: 13px 0 10px;
    font-size: 0.96rem;
  }
  .site-nav {
    width: 100%;
    border-top: 1px solid var(--border);
    padding: 10px 0 12px;
    gap: 18px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar {
    display: none;
  }
  .site-nav a {
    font-size: 0.9rem;
  }
  .card-grid,
  .editorial-grid {
    grid-template-columns: 1fr;
  }
  main {
    padding: 28px 0 56px;
  }
  .hero {
    padding: 0 0 28px;
  }
  .partner-band {
    padding: 24px 0 28px;
    margin-bottom: 36px;
  }
  .partner-logos {
    justify-content: flex-start;
    gap: 22px 28px;
  }
  .partner-logo-link--eeel img {
    height: auto;
    max-height: 36px;
  }
  .partner-logo-link--buildest img {
    height: 54px;
  }
  .partner-logo-link--walless img {
    height: 48px;
  }
}

/* Cards — used ONLY where a distinct interactive/data container is justified */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.training-card {
  transition: border-color 0.15s ease;
}

.training-card:hover {
  border-color: var(--border-strong);
}

.training-card__time {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.training-card__title {
  margin: 0 0 10px;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.training-card__desc {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.6;
  white-space: pre-line;
}

.training-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.training-card__meta strong {
  color: var(--text);
  font-weight: 500;
}

.speaker-item__name {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.speaker-item__bio {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.62;
}

.speaker-item__link {
  font-weight: 500;
  text-decoration: none;
  font-size: 0.92rem;
}

.speaker-item__link:hover {
  text-decoration: underline;
}

/* Browser memory notice — restrained left-accent note, not a loud box */
.memory-bar {
  border-left: 2px solid var(--accent);
  padding: 6px 0 6px 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.memory-bar__text {
  margin: 0;
  color: var(--muted);
  flex: 1 1 320px;
}

.memory-bar__status {
  width: 100%;
  font-size: 0.86rem;
  color: var(--success-text);
  font-weight: 500;
}

.memory-bar__status:empty {
  display: none;
}

/* Registration details/form */
details.reg-details {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

details.reg-details > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  user-select: none;
  transition: background-color 0.15s ease;
}

details.reg-details > summary::-webkit-details-marker {
  display: none;
}

details.reg-details > summary:hover {
  background: var(--accent-hover);
}

details.reg-details[open] > summary {
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}

.reg-closed-label {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin: 0;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
}

/* Forms (shadcn/ui precision) */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="password"],
.field input[type="datetime-local"],
.field select,
.field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field textarea {
  resize: vertical;
}

.field__help {
  font-size: 0.83rem;
  color: var(--muted);
}

.field__error {
  font-size: 0.84rem;
  color: var(--danger-text);
  margin: 0;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* Buttons (shadcn/ui crisp) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn--secondary:hover {
  background: var(--bg);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--danger {
  background: var(--surface);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.btn--danger:hover {
  background: var(--danger-bg);
}

.btn--sm {
  padding: 5px 11px;
  font-size: 0.84rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Alerts */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.alert p {
  margin: 0;
}

.alert p + p {
  margin-top: 8px;
}

.alert--success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.alert--danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.alert--info {
  background: var(--accent-soft);
  border-color: #d5d3f7;
  color: var(--text);
}

.alert--warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

/* Attendance & QR */
.countdown-box {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin: 18px 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-size: 1rem;
}

/* QR stage needs pure white quiet zone for camera scanners */
.qr-stage {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin: 20px 0;
}

.qr-stage__svg {
  display: inline-block;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 12px 0;
}

.qr-stage__svg svg {
  width: 240px;
  height: 240px;
  display: block;
}

.qr-stage:fullscreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 40px;
  gap: 12px;
}

.qr-stage:fullscreen h2 {
  font-size: 2rem;
  margin: 0;
}

.qr-stage:fullscreen .qr-stage__svg svg {
  width: min(52vh, 420px);
  height: min(52vh, 420px);
}

.qr-stage:fullscreen .countdown-box {
  font-size: 1.45rem;
}

.qr-stage:fullscreen .qr-stage__url {
  font-size: 1.25rem;
}

/* Tables & Admin (shadcn/ui crisp hairlines, tabular numbers) */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card .table-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
  font-variant-numeric: tabular-nums;
}

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

table.data-table tbody tr:last-child td {
  border-bottom: 0;
}

table.data-table th {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(250, 250, 249, 0.7);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge--published,
.badge--confirmed,
.badge--sent,
.badge--active {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.badge--scheduled,
.badge--pending {
  background: var(--accent-soft);
  border-color: #d5d3f7;
  color: var(--accent);
}

.badge--warn,
.badge--dup {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.badge--danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

/* Hairline metric strip (no heavy box cards) */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 20px 28px;
  padding: 20px 0;
  margin-bottom: 32px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-item__value {
  font-size: 1.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}

.stat-item__label {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 4px;
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Editorial prose (Tufte inspired — open on canvas, comfortable measure) */
.prose {
  max-width: 65ch;
}

.prose h1 {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.022em;
}

.prose h2 {
  margin: 2em 0 0.55em;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  padding-top: 1em;
  border-top: 1px solid var(--border);
}

.prose p {
  margin: 0 0 1em;
}

.prose ul {
  padding-left: 20px;
  margin: 0 0 1.2em;
}

.prose li + li {
  margin-top: 0.55em;
}

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

.page-header h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.empty-note {
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.site-footer__links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer__links a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--text);
  text-decoration: underline;
}
