/* Public-site stylesheet — visual language matching the parent property:
 * dark warm brown header, gold/amber diagonal band, blue CTA buttons,
 * light off-white content. Hand-written so the site is presentable
 * without a Node build. Swap in a compiled Tailwind bundle for prod. */

:root {
  /* Brand palette */
  --header-bg:    #3a2f28;   /* dark warm brown */
  --header-bg-2:  #2b231e;   /* slightly darker for accents/footer */
  --gold:         #e8a526;   /* amber accent — diagonal bands */
  --gold-2:       #d4901a;   /* gold hover/dark */
  --gold-soft:    #f5d28f;
  --blue:         #4a96cb;   /* CTA button blue */
  --blue-dark:    #357fb1;
  --blue-soft:    #dfeaf3;
  /* Dutch event accent — saturated "Hollandse oranje" used on the live
   * lottery surfaces to give the ceremony a more festive feel. */
  --orange:       #ff6900;
  --orange-dark:  #d95300;
  --orange-soft:  #ffb27a;

  /* Neutrals */
  --bg:           #ffffff;
  --surface:      #f4f4f4;
  --surface-2:    #eaeaea;
  --border:       #e0e0e0;
  --border-strong:#cccccc;
  --text:         #1a1a1a;
  --text-dim:     #333333;
  --muted:        #666666;
  --muted-2:      #999999;

  /* Podium */
  --podium-1: #c5a050;
  --podium-2: #9aa5b1;
  --podium-3: #a87340;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);

  font-family: "Open Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); line-height: 1.55; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

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

/* ============================================================
   Layout primitives
   ============================================================ */
.container { max-width: 80rem; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.container-narrow { max-width: 56rem; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }

.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-12 { padding-top: 3rem; }
.pb-12 { padding-bottom: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }

/* ============================================================
   Typography
   ============================================================ */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; line-height: 1.25; }
.text-3xl { font-size: 1.875rem; line-height: 1.2; }
.text-4xl { font-size: 2.25rem; line-height: 1.15; }
.text-5xl { font-size: 3rem; line-height: 1.1; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.tracking-tight { letter-spacing: -0.015em; }
.tracking-wider { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

.text-muted { color: var(--muted); }
.text-muted-2 { color: var(--muted-2); }
.text-brand { color: var(--blue); }
.text-white { color: #ffffff; }
.bg-white { background: #ffffff; }
.bg-surface { background: var(--surface); }
.bg-surface-2 { background: var(--surface-2); }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-2);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.page-heading {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 0.5rem;
}

/* Borders / shadows */
.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.rounded { border-radius: 4px; }
.rounded-md { border-radius: 6px; }
.rounded-lg { border-radius: 10px; }
.rounded-full { border-radius: 9999px; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.list-none { list-style: none; padding: 0; margin: 0; }
.block { display: block; }
.inline-block { display: inline-block; }
.w-full { width: 100%; }
.overflow-x-auto { overflow-x: auto; }
.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; }

/* ============================================================
   Header — dark warm brown
   ============================================================ */
.site-header {
  background: var(--header-bg);
  color: #ffffff;
  position: relative;
  z-index: 50;
}

/* Top utility bar — login + language switcher */
.site-header .utility-bar {
  background: var(--header-bg-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
}
.site-header .utility-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.4rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  color: rgba(255, 255, 255, 0.78);
}
.site-header .utility-inner .utility-right {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
}
.site-header .utility-inner .main-site-link {
  color: rgba(255, 255, 255, 0.78);
  padding: 0 0.2rem;
}
.site-header .utility-inner .main-site-link:hover { color: var(--gold); }
.site-header .utility-inner .login-link {
  color: rgba(255, 255, 255, 0.78);
  padding: 0 0.2rem;
}
.site-header .utility-inner .login-link:hover { color: var(--gold); }
.site-header .utility-inner .lang { color: rgba(255, 255, 255, 0.6); }
.site-header .utility-inner .lang a {
  color: rgba(255, 255, 255, 0.78);
  padding: 0 0.2rem;
}
.site-header .utility-inner .lang a:hover { color: var(--gold); }
.site-header .utility-inner .lang .current {
  color: #ffffff;
  font-weight: 700;
  padding: 0 0.2rem;
}

/* Second layer — brand + main menu */
.site-header .main-bar { background: var(--header-bg); }
.site-header .main-inner {
  padding: 1rem 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: #ffffff;
  flex: none;
}
.brand .mark {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: var(--gold);
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--header-bg);
  flex: none;
}
.brand .logo {
  height: 64px;
  width: auto;
  flex: none;
}
.brand .text { display: inline-flex; flex-direction: column; line-height: 1.05; }
.brand .text .name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: #ffffff;
}
.brand .text .meta {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.primary-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
  flex: 1;
}
.primary-nav .item { position: relative; }
.primary-nav .item > a {
  display: inline-flex;
  align-items: center;
  height: 100%;
  color: #ffffff;
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 120ms ease, border-color 120ms ease;
}
.primary-nav .item > a:hover,
.primary-nav .item:hover > a,
.primary-nav .item:focus-within > a {
  color: var(--gold);
}
.primary-nav .item > a.active {
  border-bottom-color: #ffffff;
}

.primary-nav .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 16rem;
  max-width: 22rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  display: none;
  z-index: 60;
}
.primary-nav .item:hover .dropdown,
.primary-nav .item:focus-within .dropdown {
  display: block;
}
.primary-nav .dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text);
  font-size: 0.875rem;
  border-left: 3px solid transparent;
}
.primary-nav .dropdown a:hover,
.primary-nav .dropdown a:focus {
  background: var(--surface);
  border-left-color: var(--gold);
  color: var(--gold-2);
}
.primary-nav .dropdown .group-title {
  padding: 0.5rem 1rem;
  font-size: 0.6875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.primary-nav .dropdown .country-code {
  display: inline-block;
  width: 2.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Hamburger toggle — hidden on desktop, shown on small screens */
.site-header .nav-toggle {
  display: none;
  margin-left: auto;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex: none;
  transition: border-color 120ms ease, background 120ms ease;
}
.site-header .nav-toggle:hover { border-color: var(--gold); background: rgba(255, 255, 255, 0.05); }
.site-header .nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 1px;
  transition: transform 160ms ease, opacity 120ms ease;
}
.site-header .nav-toggle.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header .nav-toggle.open .bar:nth-child(2) { opacity: 0; }
.site-header .nav-toggle.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1023px) {
  .site-header .nav-toggle { display: inline-flex; }

  .site-header .main-inner {
    align-items: center;
    gap: 1rem;
  }

  .primary-nav {
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .primary-nav.open { display: flex; }

  .primary-nav .item { width: 100%; }
  .primary-nav .item > a {
    width: 100%;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid transparent;
  }
  .primary-nav .item > a.active {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    border-left-color: var(--gold);
  }

  /* Dropdowns become inline collapsible sections on mobile */
  .primary-nav .dropdown {
    position: static;
    display: none;
    min-width: 0;
    max-width: none;
    background: rgba(0, 0, 0, 0.18);
    border: 0;
    border-top: 0;
    box-shadow: none;
    padding: 0.25rem 0 0.5rem;
  }
  .primary-nav .item.expanded .dropdown { display: block; }
  .primary-nav .item:hover .dropdown,
  .primary-nav .item:focus-within .dropdown { display: none; }
  .primary-nav .item.expanded:hover .dropdown,
  .primary-nav .item.expanded:focus-within .dropdown { display: block; }
  .primary-nav .dropdown a {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.55rem 1rem 0.55rem 1.5rem;
    font-size: 0.875rem;
  }
  .primary-nav .dropdown a:hover,
  .primary-nav .dropdown a:focus {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--gold);
    color: var(--gold);
  }
  .primary-nav .dropdown .group-title {
    color: rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1rem 0.25rem 1.5rem;
  }
  .primary-nav .dropdown .country-code { color: rgba(255, 255, 255, 0.6); }
}

/* ============================================================
   Gold diagonal bands (signature design element)
   ============================================================ */
.band-gold {
  background: linear-gradient(90deg, var(--gold-2) 0%, var(--gold) 100%);
  color: #ffffff;
  position: relative;
  padding: 2rem 1.5rem 3rem;
  /* Bottom edge slopes from upper-right down to lower-left */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3rem), 0 100%);
}
.band-gold .inner {
  max-width: 80rem;
  margin: 0 auto;
}
.band-gold .breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #ffffff;
  font-size: 0.9375rem;
  opacity: 0.92;
}
.band-gold .breadcrumb:hover { opacity: 1; color: #ffffff; }

.band-gold-bottom {
  background: linear-gradient(90deg, var(--gold-2) 0%, var(--gold) 100%);
  color: #ffffff;
  padding: 4rem 1.5rem 3rem;
  /* Top edge slopes upward from left to right */
  clip-path: polygon(0 3rem, 100% 0, 100% 100%, 0 100%);
  margin-top: 4rem;
}
.band-gold-bottom .inner { max-width: 80rem; margin: 0 auto; }

/* ============================================================
   Hero — uses the gold band as its base
   ============================================================ */
.hero {
  background: linear-gradient(90deg, var(--gold-2) 0%, var(--gold) 100%);
  color: #ffffff;
  padding: 4rem 1.5rem 6rem;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4rem), 0 100%);
}
.hero .inner { max-width: 80rem; margin: 0 auto; position: relative; z-index: 2; }
.hero .date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 1rem;
  max-width: 56rem;
}
.hero .lede {
  font-size: 1.0625rem;
  line-height: 1.55;
  opacity: 0.95;
  max-width: 40rem;
  margin: 0 0 2rem;
}
.hero .ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Inner page header (used when there's no full hero) */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.5rem 2rem;
}
.page-header .inner { max-width: 80rem; margin: 0 auto; }

/* ============================================================
   Buttons — blue is the primary CTA in card contexts
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  line-height: 1.2;
}
.btn-primary {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #ffffff;
}
.btn-ghost {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: #ffffff;
}
.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  transition: box-shadow 140ms ease, border-color 140ms ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card-link { display: block; color: inherit; }
.card-link:hover { color: inherit; }
.card-link:hover .card-title { color: var(--blue); }
.card .card-title { color: var(--text); font-weight: 700; }

/* Tile-style card used for "Deelnemers Landenteams" pattern */
.tile {
  background: var(--surface);
  border-radius: 4px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  transition: box-shadow 140ms ease;
}
.tile:hover { box-shadow: var(--shadow-md); }
.tile .image-area {
  height: 13rem;
  background: #ffffff;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--header-bg);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tile .image-area .code-large {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 2.5rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.tile h3 {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  text-align: left;
}
.tile .tile-cta {
  display: inline-flex;
  justify-content: center;
  background: var(--blue);
  color: #ffffff;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  font-size: 0.9375rem;
  transition: background 120ms ease;
}
.tile .tile-cta:hover { background: var(--blue-dark); color: #ffffff; }

/* Feature card with banner (used on landing for ranking shortcuts) */
.feature-card {
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 140ms ease;
}
.feature-card:hover { box-shadow: var(--shadow-md); }
.feature-card .banner {
  height: 7rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  position: relative;
}
.feature-card .banner.alt {
  background: linear-gradient(135deg, var(--header-bg) 0%, var(--header-bg-2) 100%);
}
.feature-card .banner .badge {
  position: absolute;
  bottom: -0.875rem;
  left: 1.5rem;
  background: #ffffff;
  border-radius: 4px;
  padding: 0.3rem 0.85rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-2);
  font-weight: 700;
}
.feature-card .body { padding: 1.75rem 1.5rem 1.5rem; }
.feature-card h3 { margin: 0 0 0.5rem; font-size: 1.125rem; font-weight: 700; color: var(--text); }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.feature-card .arrow {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--blue);
  font-weight: 700;
}

/* Section eyebrow + title */
.section-title-row { margin-bottom: 1.5rem; }
.section-title-row h2 {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ============================================================
   Data tables
   ============================================================ */
.table-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 4px;
  /* Wide result tables scroll horizontally rather than being clipped. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.875rem;
}
.data-table thead th {
  text-align: left;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: var(--header-bg);
  font-weight: 700;
  padding: 0.875rem 0.875rem;
  border-bottom: 1px solid var(--header-bg-2);
}
.data-table tbody td {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr:nth-child(even) td { background: var(--surface); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--gold-soft); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .rank { font-weight: 700; width: 3.5rem; }
.data-table tr.podium-1 td.rank { color: var(--podium-1); }
.data-table tr.podium-2 td.rank { color: var(--podium-2); }
.data-table tr.podium-3 td.rank { color: var(--podium-3); }
.data-table tr.podium-1 td:last-child,
.data-table tr.podium-2 td:last-child,
.data-table tr.podium-3 td:last-child {
  font-weight: 700;
}
@media (max-width: 720px) {
  /* On phones the result tables run edge-to-edge (cancelling the container
     padding) and scroll horizontally instead of squeezing the columns. */
  .table-wrap {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
}

/* ============================================================
   Competitor card
   ============================================================ */
.competitor-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
}
.competitor-card .head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.875rem;
}
.competitor-card .name { font-weight: 700; font-size: 1.0625rem; color: var(--text); }
.competitor-card .name a:hover { color: var(--blue); }
.competitor-card .ids {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: var(--header-bg);
  background: var(--gold-soft);
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-weight: 700;
}
.competitor-card .rows {
  display: grid;
  grid-template-columns: 1fr auto auto;
  row-gap: 0.4rem;
  column-gap: 1rem;
  font-size: 0.875rem;
}
.competitor-card .label { color: var(--muted); }
.competitor-card .time { color: var(--muted-2); font-variant-numeric: tabular-nums; font-size: 0.8125rem; }
.competitor-card .score { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; font-variant-numeric: tabular-nums; }
.competitor-card .total-row {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-weight: 700;
  color: var(--header-bg);
}
.competitor-card .total-row .score { color: var(--header-bg); font-size: 1rem; }

/* Tag */
.tag {
  display: inline-block;
  font-size: 0.6875rem;
  padding: 0.22rem 0.6rem;
  border-radius: 4px;
  background: var(--gold-soft);
  color: var(--header-bg);
  letter-spacing: 0.02em;
  font-weight: 700;
  text-transform: uppercase;
}

/* ============================================================
   Rich competitor card (team-detail page)
   ============================================================ */
.team-leader {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  display: grid;
  align-items: center;
  gap: 0.5rem 1.5rem;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas:
    "coach title asst flag"
    "coach line  asst flag";
}
.team-leader--solo {
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "coach title flag"
    "coach line  flag";
}
.team-leader .title { grid-area: title; align-self: end; line-height: 1.2; }
.team-leader .role {
  display: block;
  font-size: 1.25rem;
  color: var(--header-bg);
  font-weight: 700;
  letter-spacing: -0.005em;
}
.team-leader .sub {
  display: block;
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 2px;
}
.team-leader .gold-line {
  grid-area: line;
  align-self: start;
  justify-self: stretch;
  height: 2px;
  width: 100%;
  margin: 0;
  border: 0;
  background: var(--gold);
}
.team-leader .tl-member {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  text-align: center;
}
.team-leader .tl-member--coach { grid-area: coach; }
.team-leader .tl-member--assistant { grid-area: asst; }
.team-leader .tl-member figcaption {
  color: var(--header-bg);
  font-weight: 700;
  font-size: 0.9375rem;
}
.team-leader .photo {
  width: 100px;
  border-radius: 4px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--muted-2);
  font-weight: 700;
  overflow: hidden;
  flex: none;
}
.team-leader .photo img { width: 100%; height: auto; }
.team-leader .photo--empty {
  aspect-ratio: 10 / 11;
  width: 100px;
  background: var(--surface-2);
  color: var(--muted-2);
}
.team-leader .photo--empty svg { width: 55%; height: 55%; }
.team-leader .flag-circle {
  grid-area: flag;
  width: 96px;
  height: 96px;
  border-radius: 9999px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  line-height: 1;
  flex: none;
  overflow: hidden;
}
@media (max-width: 720px) {
  /* Stack the card: flag on top, then Team Leader + country, an orange
     divider, then each coach's photo with their name beneath it. */
  .team-leader {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "flag  flag"
      "title title"
      "line  line"
      "coach asst";
    justify-items: center;
    text-align: center;
  }
  .team-leader--solo {
    grid-template-columns: 1fr;
    grid-template-areas:
      "flag"
      "title"
      "line"
      "coach";
  }
  .team-leader .title { align-self: center; }
}

.entry-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  container-name: entry;
}
.entry-card .head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem 0.875rem;
  border-bottom: 2px solid var(--gold);
  flex-wrap: wrap;
}
.entry-card .head .ids { min-width: 0; flex: 1 1 12rem; }
.entry-card .head .ids {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.entry-card .head .catalog-line {
  display: flex; align-items: baseline; gap: 0.5rem;
}
.entry-card .head .catalog {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--header-bg);
  letter-spacing: 0.02em;
}
.entry-card .head .handler {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}
.entry-card .head .dog-reg {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--gold-2);
  font-weight: 600;
  margin-top: 0.125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.entry-card .head .dog-reg .sex {
  color: var(--header-bg);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
}
.entry-card .head .right {
  display: flex; align-items: center; gap: 0.625rem;
  flex: none;
}
.entry-card .head .sex {
  font-size: 0.9375rem;
  color: var(--header-bg);
  font-weight: 700;
}
.entry-card .head .ticket {
  display: inline-flex; flex-direction: column; align-items: flex-end;
  font-size: 0.6875rem; color: var(--muted);
  letter-spacing: 0.04em;
}
.entry-card .head .ticket .num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9375rem; font-weight: 700;
  color: var(--header-bg);
  border: 1.5px solid var(--blue);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  margin-top: 2px;
  letter-spacing: 0;
}

.entry-card .body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 1.25rem;
}
.entry-card .body .photo { width: 100%; height: 11rem; }

/* Photo + pedigree side-by-side once the card is wide enough */
@container entry (min-width: 420px) {
  .entry-card .body {
    grid-template-columns: 110px minmax(0, 1fr);
  }
  .entry-card .body .photo { width: 110px; height: 130px; }
}
.entry-card .body .photo {
  width: 110px;
  height: auto;
  align-self: start;
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--muted-2);
  font-weight: 700;
}
.entry-card .body .photo img { width: 100%; height: auto; }
.entry-card .body .photo--empty {
  aspect-ratio: 11 / 13;
  background: var(--surface-2);
  color: var(--muted-2);
}
.entry-card .body .photo--empty svg { width: 55%; height: 55%; }

.entry-card .pedigree {
  display: grid;
  /* Default: single label/value pair per row */
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.5rem;
  row-gap: 0.3rem;
  font-size: 0.8125rem;
  align-content: start;
  min-width: 0;
}
.entry-card .pedigree dt {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.entry-card .pedigree dd {
  margin: 0;
  color: var(--text-dim);
  min-width: 0;
  overflow-wrap: anywhere;
}
.entry-card .pedigree .value-wide { grid-column: 2 / -1; }
.entry-card .pedigree .group-break { margin-top: 0.65rem; }
/* Force a new grid row so Studbook/Chip stay alone on the first row. */
.entry-card .pedigree .row-start { grid-column-start: 1; }
.entry-card .pedigree .sb { margin-left: 0.4rem; }

/* Three label/value pairs per row once the card has room */
@container entry (min-width: 460px) {
  .entry-card .pedigree {
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .entry-card .pedigree .value-wide { grid-column: 2 / -1; }
  /* Chip-No. shares row 1 with Studbook; let its value fill the rest. */
  .entry-card .pedigree .value-chip { grid-column: 4 / -1; }
}

.entry-card .schedule {
  background: #b9d3e3;  /* light slate blue band */
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 1rem 1.25rem 0.75rem;
  gap: 0.5rem;
  color: var(--header-bg);
}
/* Youth entries score only A/B/C — three columns instead of six. */
.entry-card .schedule--youth { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entry-card .schedule .col { text-align: left; min-width: 0; }
/* Smaller defaults: scale up only when the card is wide enough */
.entry-card .schedule .col .label {
  font-size: 0.75rem; font-weight: 700; margin-bottom: 0.4rem;
}
.entry-card .schedule .col .time {
  font-size: 0.625rem; color: var(--header-bg);
  font-variant-numeric: tabular-nums; margin-bottom: 0.4rem;
  opacity: 0.85;
}
.entry-card .schedule .col .value {
  font-size: 1rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--header-bg);
  white-space: nowrap;
}
@container entry (min-width: 420px) {
  .entry-card .schedule .col .label { font-size: 0.8125rem; }
  .entry-card .schedule .col .time { font-size: 0.6875rem; }
  .entry-card .schedule .col .value { font-size: 1.125rem; }
}
@container entry (min-width: 540px) {
  .entry-card .schedule .col .label { font-size: 0.9375rem; }
  .entry-card .schedule .col .time { font-size: 0.8125rem; }
  .entry-card .schedule .col .value { font-size: 1.5rem; }
}

.entry-card .totals {
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--header-bg);
}
.entry-card .totals .row {
  display: flex; gap: 0.85rem; align-items: baseline;
}
.entry-card .totals .row .label { font-weight: 600; color: var(--muted); }
.entry-card .totals .row .v {
  font-weight: 700; font-size: 1.5rem; color: var(--header-bg);
  font-variant-numeric: tabular-nums;
}
.entry-card .totals .row.right { justify-content: flex-end; }

/* ============================================================
   Country menu buttons (results-landing page)
   ============================================================ */
.country-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  max-width: 56rem;
}
@media (min-width: 640px) {
  .country-menu { grid-template-columns: 1fr 1fr; }
}
.country-btn {
  background: #355264;        /* dark teal-navy like the screenshot */
  color: #ffffff;
  border-radius: 6px;
  padding: 0.85rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition: background 120ms ease;
}
.country-btn:hover {
  background: #24414f;
  color: #ffffff;
}
.country-btn .flag-emoji { font-size: 1.125rem; line-height: 1; }

.results-landing h2 {
  margin: 2.5rem 0 1rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--header-bg);
}
.results-landing h2:first-child { margin-top: 0; }
.results-landing .intro {
  color: var(--text-dim);
  max-width: 40rem;
  margin: 0 0 1.25rem;
}

/* ============================================================
   Footer — gold band + brown copyright strip
   ============================================================ */
.site-footer {
  margin-top: 4rem;
}
.site-footer .band {
  background: linear-gradient(90deg, var(--gold-2) 0%, var(--gold) 100%);
  color: #ffffff;
  padding: 5rem 1.5rem 3rem;
  /* Top edge slopes upward from left to right (mirror of header band) */
  clip-path: polygon(0 3rem, 100% 0, 100% 100%, 0 100%);
}
.site-footer .band .grid-cols {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
.site-footer h4 {
  color: #ffffff;
  font-size: 0.875rem;
  margin: 0 0 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.site-footer a {
  color: #ffffff;
  font-size: 0.9375rem;
  display: block;
  padding: 0.2rem 0;
}
.site-footer a:hover { color: var(--header-bg); }
.site-footer p { color: rgba(255, 255, 255, 0.95); }
.site-footer .strip {
  background: var(--header-bg);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.85rem 1.5rem;
  font-size: 0.8125rem;
  text-align: center;
}
.site-footer .strip a { display: inline; color: rgba(255, 255, 255, 0.85); padding: 0; }
.site-footer .strip a:hover { color: var(--gold); }
@media (min-width: 640px) {
  .site-footer .band .grid-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .site-footer .band .grid-cols { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ============================================================
   Forms / select
   ============================================================ */
select {
  font: inherit;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0.45rem 0.7rem;
  background: #ffffff;
  color: var(--text);
}
select:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }

/* ============================================================
   Definition lists (dog detail)
   ============================================================ */
dl.def {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.75rem 1.75rem;
  font-size: 0.9375rem;
}
dl.def dt { color: var(--muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
dl.def dd { margin: 0; color: var(--text); }

/* ============================================================
   Grids
   ============================================================ */
.grid-cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-cards.cols-2-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) {
  .grid-cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Misc */
.divider { height: 1px; background: var(--border); border: 0; margin: 1.5rem 0; }
.center-stack { display: flex; flex-direction: column; align-items: center; text-align: center; }

/* ============================================================
   Live lottery — big-screen audience page
   ============================================================ */
.band-gold--slim .inner { padding-top: 1.5rem; padding-bottom: 1.5rem; }

.lottery-live { max-width: 80rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

.lottery-fs-wrap { position: relative; }
.lottery-fs-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}
.lottery-fs-toggle:hover {
  background: var(--header-bg);
  color: #ffffff;
  border-color: var(--header-bg);
}
.lottery-fs-toggle svg { width: 1.125rem; height: 1.125rem; }
.lottery-fs-toggle .exit { display: none; }
.lottery-fs-wrap.is-fullscreen .lottery-fs-toggle .enter { display: none; }
.lottery-fs-wrap.is-fullscreen .lottery-fs-toggle .exit { display: inline-block; }

/* Browser puts the fullscreened element on a black backdrop by default;
 * paint our brand background across that whole surface and rescale the
 * spotlight so it dominates a projector / TV. */
.lottery-fs-wrap:fullscreen {
  /* Warm brown base with a Dutch-orange glow off the upper-right corner
   * so a projector view still reads as a championship ceremony. */
  background:
    radial-gradient(ellipse at 100% 0%, rgba(255, 105, 0, 0.45), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(255, 105, 0, 0.18), transparent 50%),
    var(--header-bg);
  color: #ffffff;
  padding: 3vh 4vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2vh;
  overflow: hidden;
}
.lottery-fs-wrap:fullscreen .lottery-fs-toggle {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  top: 1.5vh;
  right: 1.5vw;
}
.lottery-fs-wrap:fullscreen .lottery-fs-toggle:hover {
  background: var(--gold);
  color: var(--header-bg);
  border-color: var(--gold);
}
.lottery-fs-wrap:fullscreen .lottery-stage {
  margin: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lottery-fs-wrap:fullscreen .spotlight {
  /* Two-row grid: main info row (photo/text/lot) on top, pedigree below.
   * Heights are bounded by viewport units so nothing spills past the wrap. */
  width: 100%;
  max-width: none;
  gap: 2vh 4vw;
  padding: 3vh 4vw;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  /* Card chrome is white-on-white by default; clear it so the dark wrap
   * shows through and the white text in this view stays legible. */
  background: transparent;
  border: 0;
  border-left: 14px solid var(--gold);
  border-radius: 0;
  box-shadow: none;
}
.lottery-fs-wrap:fullscreen .spotlight-photo {
  /* Bound by height so the photo never crowds out the text column. */
  aspect-ratio: 4 / 5;
  height: clamp(180px, 42vh, 480px);
  width: auto;
  max-width: 26vw;
}
.lottery-fs-wrap:fullscreen .spotlight-text { min-width: 0; }
.lottery-fs-wrap:fullscreen .spotlight-country {
  font-size: clamp(0.875rem, 1.4vw, 1.5rem);
  color: rgba(255, 255, 255, 0.7);
}
.lottery-fs-wrap:fullscreen .spotlight-country .code { color: var(--gold); }
.lottery-fs-wrap:fullscreen .spotlight-handler {
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  line-height: 1.05;
  margin: 0.25rem 0 0.5rem;
  color: #ffffff;
}
.lottery-fs-wrap:fullscreen .spotlight-dog {
  font-size: clamp(1.25rem, 2.2vw, 2.25rem);
  color: rgba(255, 255, 255, 0.8);
}
.lottery-fs-wrap:fullscreen .spotlight-dog .reg { color: rgba(255, 255, 255, 0.55); }
.lottery-fs-wrap:fullscreen .spotlight-catalog {
  font-size: clamp(0.875rem, 1.4vw, 1.5rem);
  color: rgba(255, 255, 255, 0.7);
}
.lottery-fs-wrap:fullscreen .spotlight-catalog .value { color: #ffffff; }
.lottery-fs-wrap:fullscreen .spotlight-lot {
  /* Bright Hollandse oranje plaque — pops against the brown gradient. */
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: #ffffff;
  padding: 2.5vh 2.5vw;
  min-width: 14vw;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.lottery-fs-wrap:fullscreen .spotlight-lot .label { color: rgba(255, 255, 255, 0.85); }
.lottery-fs-wrap:fullscreen .spotlight-lot .label { font-size: clamp(0.875rem, 1.4vw, 1.5rem); }
.lottery-fs-wrap:fullscreen .spotlight-lot .number {
  font-size: clamp(4rem, 9vw, 8rem);
}
.lottery-fs-wrap:fullscreen .spotlight.is-empty {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border-left-color: rgba(255, 255, 255, 0.2);
}
.lottery-fs-wrap:fullscreen .spotlight-empty { font-size: clamp(1.25rem, 2.2vw, 2.25rem); }

.lottery-fs-wrap:fullscreen .spotlight-schedule {
  border-top-color: rgba(255, 255, 255, 0.2);
  padding-top: 2vh;
}
.lottery-fs-wrap:fullscreen .spotlight-schedule .slot {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5vh 1vw;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.lottery-fs-wrap:fullscreen .spotlight-schedule .label {
  color: var(--orange-soft);
  font-size: clamp(0.75rem, 0.95vw, 1.125rem);
  margin-bottom: 0.5vh;
}
.lottery-fs-wrap:fullscreen .spotlight-schedule .time {
  color: #ffffff;
  font-size: clamp(1.5rem, 2.6vw, 2.75rem);
}

.lottery-fs-wrap:fullscreen .lottery-ticker {
  background: rgba(0, 0, 0, 0.25);
  border: 0;
  border-radius: 4px;
}
.lottery-fs-wrap:fullscreen .lottery-ticker .title { color: var(--gold); }
.lottery-fs-wrap:fullscreen .lottery-ticker li { color: rgba(255, 255, 255, 0.85); }
.lottery-fs-wrap:fullscreen .lottery-ticker li .lot { color: var(--gold); }

.lottery-stage { margin: 2rem 0 3rem; }

.spotlight {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr auto;
  gap: 1.5rem 2rem;
  /* Align top so the pedigree row beneath doesn't drag the photo/text/lot
   * out of the natural reading flow. */
  align-items: start;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 8px solid var(--orange);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.spotlight.is-empty {
  display: flex;
  justify-content: center;
  border-left-color: var(--border-strong);
  padding: 4rem 2rem;
}
/* The template always renders both the empty overlay and the populated
 * skeleton; we toggle which one is visible based on `.is-empty`. JS just
 * swaps the class — no reload required, which keeps fullscreen open. */
.spotlight-empty { display: none; text-align: center; color: var(--muted); font-size: 1.25rem; }
.spotlight.is-empty > .spotlight-empty { display: block; }
.spotlight.is-empty > *:not(.spotlight-empty) { display: none; }
.spotlight-empty .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--muted-2); margin: 0 auto 1rem;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.3 } 50% { opacity: 1 } }

.spotlight-photo {
  width: 100%;
  aspect-ratio: 11 / 13;
  background: var(--surface-2);
  color: var(--muted-2);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spotlight-photo img { width: 100%; height: 100%; object-fit: cover; }
.spotlight-photo svg { width: 55%; height: 55%; }

.spotlight-text { min-width: 0; }
.spotlight-country {
  display: inline-flex; align-items: baseline; gap: 0.5rem;
  font-size: 0.875rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 0.5rem;
}
.spotlight-country .code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; color: var(--gold-2);
}
.spotlight-handler {
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 0.5rem;
  color: var(--text); font-weight: 700; letter-spacing: -0.015em;
}
.spotlight-dog { font-size: 1.125rem; color: var(--text-dim); margin: 0; }
.spotlight-dog .reg { color: var(--muted); }
/* Billboard: the dog's registered name shares the handler's large heading size. */
.billboard-spotlight .spotlight-dog { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
.lottery-fs-wrap:fullscreen .billboard-spotlight .spotlight-dog {
  font-size: clamp(2.5rem, 5vw, 5.5rem); line-height: 1.05;
}
.spotlight-catalog { margin: 1rem 0 0; font-size: 0.875rem; color: var(--muted); }
.spotlight-catalog .label { text-transform: uppercase; letter-spacing: 0.08em; margin-right: 0.5rem; }
.spotlight-catalog .value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; color: var(--text); }

.spotlight-schedule {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  min-width: 0;
}
.spotlight-schedule .slot {
  text-align: center;
  padding: 0.65rem 0.5rem;
  border-radius: 4px;
  background: var(--surface);
  min-width: 0;
}
.spotlight-schedule .label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.spotlight-schedule .time {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}
@media (max-width: 720px) {
  .spotlight-schedule { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.spotlight-lot {
  text-align: center;
  /* Warm gradient — brown deepens into Dutch orange for a more festive
   * ceremony feel. */
  background: linear-gradient(135deg, var(--header-bg) 0%, var(--orange-dark) 100%);
  color: #ffffff;
  padding: 1.5rem 2rem;
  border-radius: 6px;
  min-width: 12rem;
}
.spotlight-lot .label {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--orange-soft); margin-bottom: 0.25rem; font-weight: 700;
}
.spotlight-lot .number {
  font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1; font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.spotlight-lot.lot-pop {
  animation: lotPop 520ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes lotPop {
  0%   { transform: scale(0.55); background: var(--orange); box-shadow: 0 0 0 0 rgba(255, 105, 0, 0.6); }
  55%  { transform: scale(1.12); box-shadow: 0 0 0 16px rgba(255, 105, 0, 0); }
  100% { transform: scale(1); background: linear-gradient(135deg, var(--header-bg) 0%, var(--orange-dark) 100%); box-shadow: none; }
}

.lottery-ticker {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.5rem;
}
.lottery-ticker .title {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gold-2); font-weight: 700; margin-bottom: 0.5rem;
}
.lottery-ticker ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
}
.lottery-ticker li {
  font-size: 0.9375rem; color: var(--text-dim);
}
.lottery-ticker li .lot {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; color: var(--header-bg); margin-right: 0.25rem;
}

@media (max-width: 720px) {
  .spotlight { grid-template-columns: 1fr; gap: 1.25rem; text-align: center; }
  .spotlight-photo { max-width: 220px; margin: 0 auto; }
}

/* ============================================================
   Lottery operator console — /lottery/draw/
   ============================================================ */
body.lottery-op {
  background: var(--surface);
  color: var(--text);
  font-family: "Open Sans", "Inter", system-ui, sans-serif;
  /* Lock the panel to exactly the window height: the bar + grid are a
   * column, the grid fills the remaining height, and each column scrolls
   * internally rather than growing the page. */
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lottery-op-bar {
  background: var(--header-bg);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.lottery-op-bar .brand-line strong { color: #ffffff; }
.lottery-op-bar .brand-line span { color: var(--gold); margin-left: 0.5rem; }
.lottery-op-bar .links { display: flex; gap: 1rem; font-size: 0.875rem; }
.lottery-op-bar .links a { color: rgba(255, 255, 255, 0.85); }
.lottery-op-bar .links a:hover { color: var(--gold); }
.op-switch { display: flex; gap: 0.25rem; }
.op-switch-btn {
  padding: 0.3rem 0.75rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
  color: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.3);
}
.op-switch-btn:hover { color: #fff; }
.op-switch-btn.is-active { background: var(--gold); color: #1a1a1a; border-color: var(--gold); }

/* Flash messages render inline in the spotlight column (right where the
 * action just happened) instead of above the grid. */
.op-messages { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.op-messages li { padding: 0.5rem 0.75rem; border-radius: 4px; margin-bottom: 0.25rem; font-size: 0.9375rem; }
.op-messages .m-error { background: #fde2e2; color: #8a1f1f; }
.op-messages .m-success { background: #d9f2e1; color: #1a5d34; }
.op-messages .m-warning { background: #fdf2c8; color: #6b4a05; }

.lottery-op-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem 2rem;
  flex: 1;
  min-height: 0;  /* allow the columns to scroll within the viewport height */
}
/* Each column scrolls within its own height so the panel fills the window. */
.lottery-op-grid > section, .lottery-op-grid > aside { overflow-y: auto; }
.op-pick { display: flex; flex-direction: column; min-height: 0; }
.lottery-op-grid section, .lottery-op-grid aside {
  background: #ffffff; border: 1px solid var(--border); border-radius: 6px;
  padding: 1rem 1.25rem; min-width: 0;
}
.lottery-op-grid h2 {
  font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 0 0 0.75rem; font-weight: 700;
}
.lottery-op-grid h2 + h2 { margin-top: 1.5rem; }

.op-search { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.op-search input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid var(--border-strong); border-radius: 4px; font: inherit; }
.op-search button {
  padding: 0.5rem 0.875rem; border: 0; border-radius: 4px;
  background: var(--blue); color: #ffffff; font-weight: 600; cursor: pointer;
}

.op-filters { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 0.75rem; }
.op-filter {
  padding: 0.25rem 0.625rem; border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: 0.8125rem; color: var(--text); background: #fff; white-space: nowrap;
}
.op-filter:hover { background: var(--surface); }
.op-filter.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

.op-entries { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 8rem; overflow-y: auto; }
.op-entries li { margin: 0; }
.op-entries li.empty { padding: 1rem 0.5rem; color: var(--muted); text-align: center; }
.op-entries form { margin: 0; }
.op-entry {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 0.5rem 0.75rem;
  align-items: baseline;
  padding: 0.5rem 0.75rem; border: 0; border-bottom: 1px solid var(--hairline-color, #f0f0f0);
  background: transparent; cursor: pointer; font: inherit;
}
.op-entry:hover { background: var(--surface); }
.op-entry.is-current { background: var(--gold-soft); }
.op-entry .cat {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; color: var(--text);
}
.op-entry .who { color: var(--text); }
.op-entry .dog { color: var(--muted); font-size: 0.875rem; }
.op-entry .lot {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem; color: var(--muted-2);
}

.op-preview { margin-bottom: 1rem; }
.op-preview.is-hidden .spotlight { opacity: 0.55; filter: grayscale(0.5); }
.op-preview .hint { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.875rem; font-style: italic; }
.op-preview .spotlight { padding: 1.25rem; gap: 1rem; grid-template-columns: minmax(100px, 140px) 1fr auto; }
.op-preview .spotlight-handler { font-size: 1.5rem; }
.op-preview .spotlight-dog { font-size: 1.5rem; line-height: 1.2; }
.op-preview .spotlight-lot { padding: 0.75rem 1rem; min-width: 8rem; }
.op-preview .spotlight-lot .number { font-size: 2rem; }
.op-preview .spotlight-schedule { display: none; }

.op-assign { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; }
.op-assign label { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 8rem; font-size: 0.875rem; color: var(--muted); }
.op-assign input {
  padding: 0.5rem 0.75rem; border: 1px solid var(--border-strong); border-radius: 4px;
  font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}
.op-assign button.primary {
  /* Border matches the input so both render at the same height. */
  padding: 0.5rem 1.25rem; border: 1px solid transparent; border-radius: 4px;
  background: var(--gold); color: var(--header-bg); font-weight: 700; cursor: pointer;
  line-height: inherit;
}
.op-assign button.primary:hover { background: var(--gold-2); color: #ffffff; }

/* Unassign + Clear sit side by side beneath the assign form. */
.op-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.op-stage-actions .op-unassign,
.op-stage-actions .op-clear { margin: 0; }

.op-unassign { margin-top: 0.75rem; }
.op-unassign button.ghost-danger {
  background: transparent;
  border: 1px solid #ba2121;
  color: #ba2121;
  padding: 0.4rem 0.875rem;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.op-unassign button.ghost-danger:hover { background: #ba2121; color: #ffffff; }

.op-clear { margin-top: 0.75rem; }
.op-clear button.ghost {
  background: transparent; border: 1px solid var(--border-strong); color: var(--muted);
  padding: 0.4rem 0.875rem; border-radius: 4px; cursor: pointer; font: inherit;
}
.op-clear button.ghost:hover { color: var(--text); border-color: var(--text-dim); }

.op-recent ol { list-style: none; margin: 0; padding: 0; }
.op-recent li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--hairline-color, #f0f0f0);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.op-recent li.empty { color: var(--muted); display: block; }
.op-recent li .lot {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; color: var(--header-bg);
  flex: none;
}
.op-recent li .who { color: var(--text-dim); flex: 1; min-width: 0; }
.op-recent-unassign { margin: 0; }
.op-recent-unassign button {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0 0.4rem;
  color: var(--muted-2);
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 4px;
}
.op-recent-unassign button:hover { color: #ffffff; background: #ba2121; }

.op-reset { margin-top: 1rem; }
.op-reset button.danger {
  width: 100%;
  background: transparent;
  border: 1px solid #ba2121;
  color: #ba2121;
  padding: 0.5rem 0.875rem;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.op-reset button.danger:hover {
  background: #ba2121;
  color: #ffffff;
}

@media (max-width: 1023px) {
  .lottery-op-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   Billboard — big-screen on-field page
   Reuses `.lottery-fs-wrap` / `.lottery-fs-toggle` / `.spotlight*`
   from the lottery, and adds the running-results grid in place of
   the lottery schedule strip.
   --------------------------------------------------------------- */

.billboard-stage { margin: 2rem 0 3rem; }

.spotlight-results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  min-width: 0;
}
.spotlight-results .cell {
  text-align: center;
  padding: 0.65rem 0.5rem;
  border-radius: 4px;
  background: var(--surface);
  min-width: 0;
}
.spotlight-results .cell-total {
  background: linear-gradient(135deg, var(--header-bg) 0%, var(--orange-dark) 100%);
  color: #ffffff;
}
.spotlight-results .label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.spotlight-results .cell-total .label { color: rgba(255, 255, 255, 0.85); }
.spotlight-results .value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}
.spotlight-results .cell-total .value { color: #ffffff; }
@media (max-width: 720px) {
  .spotlight-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.lottery-fs-wrap:fullscreen .spotlight-results {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}
.lottery-fs-wrap:fullscreen .spotlight-results .cell {
  background: rgba(255, 255, 255, 0.06);
  padding: 1rem 0.75rem;
}
.lottery-fs-wrap:fullscreen .spotlight-results .label {
  color: rgba(255, 255, 255, 0.65);
  font-size: clamp(0.75rem, 1vw, 1rem);
}
.lottery-fs-wrap:fullscreen .spotlight-results .value {
  color: #ffffff;
  font-size: clamp(1.25rem, 2vw, 2rem);
}
.lottery-fs-wrap:fullscreen .spotlight-results .cell-total .label,
.lottery-fs-wrap:fullscreen .spotlight-results .cell-total .value { color: #ffffff; }
