/*!
 * MoverSelect — Shared stylesheet
 * Brand: Mover blauw #0a50a8 + Select oranje #c2410c
 * Mobile-first, modern polish, animations, prefers-reduced-motion + dark-mode aware.
 * Pure CSS, geen externe imports.
 */

/* ============================================================
   Variables
   ============================================================ */
:root {
  /* Brand */
  --brand: #0a50a8;
  --brand-2: #073d80;
  --brand-3: #1466c8;
  --brand-tint: #dbeafe;

  --accent: #c2410c;
  --accent-2: #fb923c;
  --accent-3: #9a3412;
  --accent-tint: #ffedd5;

  /* Neutral ink */
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --ink-4: #cbd5e1;

  /* Surfaces */
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-3: #f1f5f9;
  --line: #e2e8f0;
  --line-2: #cbd5e1;

  /* Status */
  --ok: #22c55e;
  --ok-tint: #dcfce7;
  --ok-ink: #166534;
  --warn: #f59e0b;
  --warn-tint: #fef3c7;
  --warn-ink: #92400e;
  --err: #ef4444;
  --err-tint: #fee2e2;
  --err-ink: #991b1b;
  --info: #0ea5e9;
  --info-tint: #e0f2fe;
  --info-ink: #075985;

  /* Top-match gold */
  --gold: #f59e0b;
  --gold-2: #fbbf24;
  --gold-tint: #fef3c7;

  /* Radii */
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 16px;
  --r-pill: 999px;

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --sh-md: 0 6px 18px -6px rgba(15, 23, 42, .12), 0 2px 6px -2px rgba(15, 23, 42, .06);
  --sh-lg: 0 18px 50px -10px rgba(15, 23, 42, .18), 0 0 0 1px var(--line);
  --sh-glow: 0 0 0 4px rgba(245, 158, 11, .18), 0 14px 40px -8px rgba(245, 158, 11, .35);

  /* Type */
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --d-fast: .15s;
  --d: .2s;
  --d-slow: .35s;

  /* Layout */
  --nav-h: 64px;
  --container: 1200px;
  --gutter: 20px;

  /* Touch */
  --tap: 44px;
}

/* ============================================================
   Reset + base typography
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color var(--d-fast) var(--ease); }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 { font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 5vw, 3.4rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p { color: var(--ink-2); }

ul, ol { list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

::selection { background: rgba(249, 115, 22, .2); color: var(--ink); }

/* ============================================================
   Layout (container, grid helpers)
   ============================================================ */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-sm { max-width: 720px; }
.container-md { max-width: 960px; }

.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.section-loose { padding: 80px 0; }
.section-alt { background: var(--bg-2); }
.section-dark { background: var(--ink); color: #fff; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--ink-2); }
.text-brand { color: var(--brand); }
.text-accent { color: var(--accent); }

.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; } .mb-12 { margin-bottom: 48px; }

.hidden { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 12px 22px;
  font: 700 1rem var(--font);
  color: #fff;
  background: var(--brand);
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--d) var(--ease),
              transform var(--d-fast) var(--ease),
              box-shadow var(--d) var(--ease),
              color var(--d) var(--ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--brand-2); color: #fff; transform: translateY(-1px); box-shadow: var(--sh-md); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed; transform: none; box-shadow: none;
}

.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-3); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-2); color: var(--ink); border-color: var(--line-2); }

.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline:hover { background: var(--brand); color: #fff; }

.btn-link {
  background: transparent;
  color: var(--accent);
  padding: 8px 4px;
  min-height: auto;
}
.btn-link:hover { color: var(--accent-3); transform: none; box-shadow: none; text-decoration: underline; }

.btn-sm { padding: 8px 14px; font-size: .88rem; min-height: 36px; }
.btn-md { padding: 12px 20px; font-size: 1rem; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; min-height: 52px; }
.btn-xl { padding: 18px 36px; font-size: 1.1rem; min-height: 60px; }

.btn-full { width: 100%; }

.btn-icon {
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border-radius: var(--r-md);
}

/* ============================================================
   Forms
   ============================================================ */
.field { display: block; margin-bottom: 16px; }
.field label,
.field-label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}
.field-help { display: block; font-size: .82rem; color: var(--ink-3); margin-top: 6px; }
.field-error { display: block; font-size: .82rem; color: var(--err); margin-top: 6px; }

.input,
.select,
.textarea,
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="search"],
.field input[type="password"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 13px 14px;
  font: 600 1rem var(--font);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--d-fast) var(--ease), box-shadow var(--d-fast) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.field textarea { min-height: 120px; padding: 12px 14px; line-height: 1.5; resize: vertical; }

.input:hover,
.select:hover,
.field input:hover,
.field select:hover { border-color: var(--line-2); }

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

.input.is-invalid,
.field .is-invalid { border-color: var(--err); }
.input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, .14); }

.select,
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* Checkbox + radio */
.check,
.radio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 4px 0;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: var(--ink);
}
.check input[type="checkbox"],
.radio input[type="radio"] {
  width: 22px; height: 22px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 46px; height: 26px;
  vertical-align: middle;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0;
  background: var(--line-2);
  border-radius: 999px;
  transition: background var(--d) var(--ease);
  cursor: pointer;
}
.switch-slider::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--sh-sm);
  transition: transform var(--d) var(--ease);
}
.switch input:checked + .switch-slider { background: var(--brand); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 24px;
  transition: border-color var(--d) var(--ease),
              box-shadow var(--d) var(--ease),
              transform var(--d) var(--ease);
}
.card:hover { box-shadow: var(--sh-md); }

.card-tight { padding: 16px; }
.card-lg { padding: 32px; }
.card-flat { box-shadow: none; }
.card-soft { background: var(--bg-2); border-color: transparent; }

.card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.card-meta { font-size: .85rem; color: var(--ink-2); }
.card-body { color: var(--ink-2); }

.mover-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  transition: border-color var(--d) var(--ease),
              box-shadow var(--d) var(--ease),
              transform var(--d) var(--ease);
}
.mover-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px -10px rgba(249, 115, 22, .18);
  transform: translateY(-2px);
}
.mover-name { font-weight: 700; color: var(--ink); font-size: .98rem; margin-bottom: 4px; }
.mover-meta { font-size: .85rem; color: var(--ink-2); }
.mover-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 8px;
}

.info-card {
  background: linear-gradient(135deg, #fff, var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
}
.info-card .icon {
  width: 54px; height: 54px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--brand-tint), var(--warn-tint));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  margin-bottom: 16px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  text-align: center;
}
.stat-num {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -.02em;
  line-height: 1.05;
}
.stat-num .pct { color: var(--accent); }
.stat-lbl { color: var(--ink-2); font-weight: 500; margin-top: 4px; font-size: .92rem; }

/* ============================================================
   Header + sticky nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
          backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-h);
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--brand);
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand span { color: var(--accent); }
.brand:hover { color: var(--brand); }

.nav { display: flex; gap: 24px; align-items: center; }
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: .92rem;
  padding: 8px 4px;
  transition: color var(--d-fast) var(--ease);
}
.nav a:hover { color: var(--brand); }
.nav a.active { color: var(--brand); }
.nav a.btn,
.nav a.btn-accent {
  background: var(--accent);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-weight: 600;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.nav a.btn:hover,
.nav a.btn-accent:hover { background: var(--accent-3); color: #fff; }

/* ============================================================
   Mobile hamburger menu (drawer-style)
   ============================================================ */
.hamburger {
  display: none;
  width: var(--tap);
  height: var(--tap);
  background: transparent;
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;
  padding: 0;
  position: relative;
}
.hamburger:hover { background: var(--bg-2); }
.hamburger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--d) var(--ease), top var(--d) var(--ease), opacity var(--d) var(--ease);
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 28px; }
.hamburger.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(86vw, 360px);
  height: 100dvh;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 50px -10px rgba(15, 23, 42, .25);
  transform: translateX(100%);
  transition: transform var(--d-slow) var(--ease-out);
  z-index: 200;
  overflow-y: auto;
  padding: 24px 20px;
}
.drawer.is-open { transform: translateX(0); }
.drawer a {
  display: block;
  padding: 14px 12px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--r-md);
  text-decoration: none;
  min-height: var(--tap);
}
.drawer a:hover { background: var(--bg-2); color: var(--brand); }
.drawer a.btn { background: var(--accent); color: #fff; margin-top: 12px; text-align: center; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--d-slow) var(--ease);
  z-index: 150;
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: 36px 0;
  background: var(--ink);
  color: rgba(255, 255, 255, .65);
  font-size: .88rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.site-footer a {
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  margin-left: 18px;
  transition: color var(--d-fast) var(--ease);
}
.site-footer a:first-child { margin-left: 0; }
.site-footer a:hover { color: #fff; }

/* ============================================================
   Hero with gradient + breathing animation
   ============================================================ */
.hero {
  position: relative;
  padding: 80px 0 60px;
  background: linear-gradient(180deg, #fff 0%, #f0f9ff 100%);
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%;
  width: 700px; height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(10, 80, 168, .14), transparent 70%);
  z-index: 0;
  animation: breathe 8s ease-in-out infinite;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -180px; right: -160px;
  width: 480px; height: 480px;
  background: radial-gradient(closest-side, rgba(249, 115, 22, .14), transparent 70%);
  z-index: 0;
  animation: breathe 10s ease-in-out -3s infinite;
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 18px;
}
.hero h1 span,
.hero .gradient {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.hero p {
  font-size: 1.15rem;
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 auto 32px;
}

/* ============================================================
   Search-form
   ============================================================ */
.search-card {
  max-width: 880px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--sh-lg);
  padding: 24px;
}
.search-row {
  display: grid;
  grid-template-columns: 1fr 1fr 140px 160px;
  gap: 12px;
  align-items: end;
}
.btn-search {
  background: var(--brand);
  color: #fff;
  padding: 14px 22px;
  border: 0;
  border-radius: var(--r-md);
  font: 700 1rem var(--font);
  cursor: pointer;
  min-height: var(--tap);
  transition: background var(--d) var(--ease), transform var(--d-fast) var(--ease);
}
.btn-search:hover { background: var(--brand-2); transform: translateY(-1px); }

/* Country pills */
.cbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.cbar-pill {
  font-size: .82rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 6px 14px;
  border-radius: var(--r-pill);
}
.cbar-pill strong { color: var(--brand); }

/* ============================================================
   Result-cards (mover listing) — top-match glow
   ============================================================ */
.result-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 22px 22px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  transition: transform var(--d) var(--ease), box-shadow var(--d) var(--ease), border-color var(--d) var(--ease);
}
.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: var(--line-2);
}
.result-card .name { font-size: 1.1rem; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.result-card .meta { color: var(--ink-2); font-size: .9rem; }
.result-card .price { font-weight: 800; color: var(--brand); font-size: 1.2rem; white-space: nowrap; }
.result-card .price small { color: var(--ink-3); font-weight: 500; font-size: .8rem; display: block; }
.result-card .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* Top-match: gold glow + animated border-tint */
.result-card.is-top {
  border: 1.5px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--gold), var(--accent), var(--gold-2)) border-box;
  box-shadow: var(--sh-glow);
  animation: topMatchPulse 2.6s var(--ease) infinite;
}
.result-card.is-top::before {
  content: '★ Best match';
  position: absolute;
  top: -10px; left: 18px;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  box-shadow: 0 6px 16px -4px rgba(245, 158, 11, .55);
}

/* ============================================================
   Toast notification
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  font-weight: 600;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--d) var(--ease), transform var(--d) var(--ease);
  max-width: calc(100vw - 32px);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast-success { background: var(--ok); }
.toast-error { background: var(--err); }
.toast-warn { background: var(--warn); color: var(--ink); }
.toast-info { background: var(--info); }

/* ============================================================
   Modal / dialog
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--d) var(--ease);
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(.96);
  width: min(92vw, 560px);
  max-height: 86vh;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 410;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--d) var(--ease), transform var(--d) var(--ease-out);
}
.modal.is-open { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.modal-close {
  width: 36px; height: 36px;
  border: 0; background: transparent; cursor: pointer;
  border-radius: 8px; color: var(--ink-2);
  font-size: 1.4rem; line-height: 1;
}
.modal-close:hover { background: var(--bg-2); color: var(--ink); }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--bg-2);
}

/* ============================================================
   Skeleton loaders
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 50%, #eef2f7 100%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: shimmer 1.4s linear infinite;
  color: transparent !important;
  user-select: none;
}
.skeleton-line { height: 12px; margin-bottom: 8px; border-radius: 6px; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-100 { width: 100%; }
.skeleton-card { height: 120px; border-radius: var(--r-lg); }
.skeleton-circle { width: 48px; height: 48px; border-radius: 50%; }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes breathe {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: .9; }
  50%      { transform: translateX(-50%) scale(1.08); opacity: 1; }
}
@keyframes topMatchPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .14), 0 14px 40px -8px rgba(245, 158, 11, .30); }
  50%      { box-shadow: 0 0 0 6px rgba(245, 158, 11, .22), 0 18px 50px -8px rgba(245, 158, 11, .42); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fade   { animation: fadeIn var(--d-slow) var(--ease) both; }
.animate-up     { animation: slideUp var(--d-slow) var(--ease-out) both; }
.animate-down   { animation: slideDown var(--d-slow) var(--ease-out) both; }
.animate-pulse  { animation: pulse 1.6s var(--ease) infinite; }
.delay-1        { animation-delay: .08s; }
.delay-2        { animation-delay: .16s; }
.delay-3        { animation-delay: .24s; }

.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}

/* ============================================================
   Status pills
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.pill-imported { color: var(--info-ink); background: var(--info-tint); border-color: rgba(14, 165, 233, .25); }
.pill-claimed  { color: var(--warn-ink); background: var(--warn-tint); border-color: rgba(245, 158, 11, .3); }
.pill-active   { color: var(--ok-ink);   background: var(--ok-tint);   border-color: rgba(34, 197, 94, .3); }
.pill-rejected { color: var(--err-ink);  background: var(--err-tint);  border-color: rgba(239, 68, 68, .3); }
.pill-pending  { color: var(--ink-2);    background: var(--bg-3);      border-color: var(--line); }
.pill-verified { color: var(--ok-ink);   background: var(--ok-tint);   border-color: rgba(34, 197, 94, .3); }
.pill-top      { color: #7c2d12;         background: var(--gold-tint); border-color: rgba(245, 158, 11, .35); }

/* ============================================================
   Tabs (dashboard)
   ============================================================ */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  padding: 12px 18px;
  font: 600 .95rem var(--font);
  color: var(--ink-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  min-height: var(--tap);
  transition: color var(--d-fast) var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand); }
.tab.is-active::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px;
  bottom: -1.5px;
  height: 2.5px;
  background: var(--brand);
  border-radius: 2px;
}
.tab .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px; height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  font-size: .72rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
}
.tab-panel { display: none; animation: fadeIn var(--d-slow) var(--ease) both; }
.tab-panel.is-active { display: block; }

/* ============================================================
   Tables (admin)
   ============================================================ */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.table th,
.table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table th {
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-2);
  background: var(--bg-2);
  position: sticky; top: 0;
}
.table tbody tr { transition: background var(--d-fast) var(--ease); }
.table tbody tr:hover { background: var(--bg-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { white-space: nowrap; text-align: right; }

/* ============================================================
   Mobile breakpoints — every component <768px
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --gutter: 16px; }
  .section { padding: 40px 0; }
  .section-loose { padding: 56px 0; }

  .hero { padding: 56px 0 40px; }
  .hero h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .hero p  { font-size: 1.02rem; }

  .search-card { padding: 18px; border-radius: var(--r-xl); }
  .search-row { grid-template-columns: 1fr; gap: 12px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }

  .nav a:not(.btn):not(.btn-accent) { display: none; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }

  .result-card { grid-template-columns: 1fr; gap: 10px; }
  .result-card .price { font-size: 1.05rem; }

  .modal { width: calc(100vw - 24px); border-radius: var(--r-lg); }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }

  .table { font-size: .86rem; }
  .table th, .table td { padding: 10px 12px; }

  .site-footer .container { flex-direction: column; align-items: flex-start; }
  .site-footer a { margin-left: 0; margin-right: 16px; }

  .info-card, .card-lg { padding: 22px; }
  .stat-num { font-size: 2rem; }

  .btn-lg { padding: 14px 22px; font-size: 1rem; min-height: 48px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.1rem; }
  .container { padding: 0 14px; }
  .cbar-pill { font-size: .76rem; padding: 5px 11px; }
  .pill { font-size: .7rem; padding: 3px 8px; }
}

/* ============================================================
   Accessibility
   ============================================================ */
:focus-visible {
  outline: 3px solid rgba(10, 80, 168, .55);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible,
.tab:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid rgba(249, 115, 22, .55);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .hero::before, .hero::after { animation: none; }
  .result-card.is-top { animation: none; }
  .skeleton { animation: none; background: var(--bg-3); }
}

/* ============================================================
   Dark mode
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-2: #111c34;
    --bg-3: #1e293b;
    --ink: #f8fafc;
    --ink-2: #cbd5e1;
    --ink-3: #94a3b8;
    --ink-4: #475569;
    --line: #1e293b;
    --line-2: #334155;
    --brand-tint: #1e3a8a;
    --accent-tint: #7c2d12;
    --warn-tint: #78350f;
    --ok-tint: #14532d;
    --info-tint: #0c4a6e;
    --err-tint: #7f1d1d;
    --gold-tint: #78350f;
  }

  body { background: var(--bg); color: var(--ink); }
  .site-header { background: rgba(15, 23, 42, .85); border-bottom-color: var(--line); }
  .card, .mover-card, .result-card, .stat-card,
  .info-card, .search-card, .modal, .table-wrap, .drawer {
    background: var(--bg-2);
    border-color: var(--line);
  }
  .info-card { background: linear-gradient(135deg, var(--bg-2), var(--bg-3)); }
  .table th { background: var(--bg-3); }
  .table tbody tr:hover { background: var(--bg-3); }
  .input, .select, .textarea,
  .field input, .field select, .field textarea {
    background: var(--bg-3);
    color: var(--ink);
    border-color: var(--line-2);
  }
  .cbar-pill { background: var(--bg-3); border-color: var(--line-2); color: var(--ink-2); }
  .hero { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
  .hero h1 span,
  .hero .gradient {
    background: linear-gradient(135deg, #60a5fa, #fb923c);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
  }
  .skeleton { background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%); background-size: 200% 100%; }
  .modal-foot { background: var(--bg-3); }
}
