/* HelpMe!Maastricht — design system. Light, IBM Plex Sans, generous typography. */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f5f8;
  --bg-card: #ffffff;
  --bg-soft: #fafafb;
  --border: #e6e8ec;
  --border-strong: #cfd3da;
  --text: #11151c;
  --text-muted: #5b6573;
  --accent: #dc2626;
  --accent-hover: #b91c1c;
  --green: #15803d;
  --amber: #d97706;
  --red: #dc2626;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 2px 6px rgba(15,23,42,.04);
  --shadow-lg: 0 10px 28px rgba(15,23,42,.10), 0 2px 6px rgba(15,23,42,.04);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1200px;
  --font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(34px, 5vw, 56px); margin: 0 0 18px; letter-spacing: -0.025em; line-height: 1.08; }
h2 { font-size: clamp(22px, 2.5vw, 30px); margin: 0 0 14px; }
h3 { font-size: 18px; margin: 0 0 8px; }

/* Layout */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
}
header.site .row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}
header.site .logo { display: flex; align-items: center; }
header.site .logo svg, header.site .logo img { height: 34px; width: auto; }
header.site .nav-center {
  display: flex; gap: 4px; justify-content: center; align-items: center;
}
header.site .nav-right {
  display: flex; gap: 8px; justify-content: flex-end; align-items: center;
}
header.site nav a {
  padding: 8px 14px; border-radius: 8px; color: var(--text);
  font-size: 15px; font-weight: 600;
}
header.site nav a:hover { background: var(--bg-alt); text-decoration: none; }
header.site nav a.cta {
  background: var(--accent); color: #fff;
}
header.site nav a.cta:hover { background: var(--accent-hover); }
header.site .lang {
  display: flex; gap: 0; padding: 3px; border: 1px solid var(--border);
  border-radius: 8px; margin-left: 4px;
}
header.site .lang a {
  padding: 4px 10px; font-size: 12px; font-weight: 700; border-radius: 5px;
  color: var(--text-muted);
}
header.site .lang a.active { background: var(--text); color: #fff; }
@media (max-width: 760px) {
  header.site .row { grid-template-columns: auto auto; }
  header.site .nav-center { grid-column: 1 / -1; order: 3; padding-top: 8px; }
}

footer.site {
  margin-top: 160px; padding: 24px 0; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; opacity: 0.85;
}
footer.site .row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
footer.site nav { display: flex; gap: 14px; margin-left: auto; }
footer.site a { color: var(--text-muted); }

/* Home: hero + map side by side on desktop, stacked on mobile */
.home-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center; min-height: calc(100vh - 110px);
  padding-top: 24px; padding-bottom: 32px;
}
.home-grid .hero { padding: 0; max-width: 100%; }
.home-grid .hero h1 { font-size: clamp(28px, 3.4vw, 44px); }
.home-grid .hero p.lead { font-size: 17px; margin-bottom: 24px; }
.home-grid .map-section { padding: 0; }

@media (max-width: 920px) {
  .home-grid { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding-top: 16px; padding-bottom: 60px; }
  .home-grid .hero h1 { font-size: clamp(28px, 7vw, 40px); }
  .home-grid .hero { text-align: left; padding-top: 24px; }
  .home-grid .map-section { max-width: 480px; margin: 0 auto; }
}

/* Hero (legacy, kept for non-home pages if needed) */
.hero { padding: 92px 0 60px; max-width: 760px; }
.hero p.lead { font-size: 19px; color: var(--text-muted); margin: 0 0 30px; line-height: 1.55; font-weight: 500; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 10px;
  font-weight: 700; font-size: 16px; cursor: pointer; border: 1px solid transparent;
  text-decoration: none; line-height: 1.2; transition: background .12s, transform .08s;
  font-family: var(--font);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: rgba(220,38,38,.08); }

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

/* Animated map */
.map-section { padding: 0; }
.map-lead {
  text-align: center; font-size: 14px; color: var(--text-muted);
  font-weight: 500; margin: 14px 0 0;
}
.map-wrap {
  max-width: 100%;
  display: flex; justify-content: center;
}
.map-wrap svg {
  width: 100%; height: auto; display: block;
  max-height: min(72vh, 540px);
}
.hood-labels text { user-select: none; }

/* Map pin: drops from above, bounces once, sits, then fades out.
   The pin-body is translated up at start so it falls into the anchor. */
.pin-marker { pointer-events: none; }
.pin-shape {
  fill: var(--accent);
  filter: drop-shadow(0 2px 3px rgba(220,38,38,.45));
}
.pin-inner { fill: #ffffff; }
.pin-body {
  transform-origin: 0 0;
  animation: pin-drop 3.6s cubic-bezier(.22,.6,.27,1.18) forwards;
}
.pin-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0;
  /* Delay so the ring fires AS the pin lands, not before */
  animation: pin-ring 3.2s ease-out 0.5s forwards;
}
@keyframes pin-drop {
  0%   { transform: translateY(-46px) scale(0.7); opacity: 0; }
  18%  { transform: translateY(-30px) scale(0.85); opacity: 0.6; }
  38%  { transform: translateY(0)     scale(1.05); opacity: 1; }  /* land + slight overshoot */
  50%  { transform: translateY(-3px)  scale(0.98); opacity: 1; }  /* bounce up tiny bit */
  62%  { transform: translateY(0)     scale(1); opacity: 1; }     /* settle */
  86%  { transform: translateY(0)     scale(1); opacity: 1; }
  100% { transform: translateY(-2px)  scale(0.95); opacity: 0; }  /* gentle fade-up off */
}
@keyframes pin-ring {
  0%   { opacity: 0;    r: 3; stroke-width: 1.5; }
  15%  { opacity: 0.65; r: 6; stroke-width: 1.5; }
  60%  { opacity: 0.25; r: 22; stroke-width: 0.7; }
  100% { opacity: 0;    r: 32; stroke-width: 0.3; }
}
@media (prefers-reduced-motion: reduce) {
  .pin-body, .pin-ring { animation: none; opacity: 1; }
  .pin-body { transform: translateY(0) scale(1); }
}

/* Live ticker */
.ticker-wrap { margin: 32px 0 96px; }
.ticker-stats { text-align: center; padding: 0 20px 36px; }
.ticker-stats .big-num {
  font-size: clamp(56px, 8vw, 96px); font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, #dc2626 0%, #f97316 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -0.04em;
}
.ticker-stats .ticker-lead {
  font-size: 18px; color: var(--text-muted); margin-top: 12px; font-weight: 500;
}
.ticker {
  overflow: hidden; padding: 16px 0; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track {
  display: flex; gap: 16px; width: max-content;
  animation: ticker-scroll 75s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-card {
  display: flex; flex-direction: column; flex-shrink: 0;
  width: 240px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  color: var(--text);
}
.ticker-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.ticker-thumb {
  width: 100%; height: 140px;
  background-color: var(--bg-alt);
  background-size: cover; background-position: center;
}
.ticker-info { padding: 12px 14px; }
.ticker-title {
  font-size: 14px; font-weight: 700; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ticker-meta {
  font-size: 13px; color: var(--text-muted); margin-top: 6px;
  display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline;
}
.ticker-price { color: var(--green); font-weight: 700; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Listings page layout */
.layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding-top: 32px;
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 16px; }
  .filters { order: 2; position: static; }
}

/* Listings grid */
.listings {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin: 16px 0 48px;
}
.lcard {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s, transform .12s, box-shadow .15s;
  display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative;
}
.lcard:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.lcard .thumb {
  width: 100%; aspect-ratio: 16/10; background-size: cover; background-position: center;
  background-color: var(--bg-alt); border-bottom: 1px solid var(--border);
}
.lcard .body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.lcard h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; }
.lcard h3 a { color: var(--text); }
.lcard .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; color: var(--text-muted); font-size: 14px; font-weight: 500; }
.lcard .price { color: var(--green); font-weight: 800; font-size: 17px; }
.lcard .badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }

.bookmark-form { position: absolute; top: 10px; right: 10px; z-index: 2; margin: 0; }
.bookmark {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.96); color: #475569;
  border: 0; cursor: pointer; transition: transform .12s, color .12s, background .12s;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.bookmark:hover { transform: scale(1.06); color: var(--accent); }
.bookmark.on { color: var(--accent); }
.bookmark svg { display: block; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--bg-alt); color: var(--text-muted);
}
.badge.fresh { background: #d1fae5; color: #047857; }
.badge.scam { background: #fee2e2; color: #b91c1c; }

/* Filters sidebar (modernized) */
.filters {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  position: sticky; top: 80px;
}
.filters .group { margin-bottom: 22px; }
.filters .group:last-of-type { margin-bottom: 14px; }
.filters label {
  display: block; font-size: 14px; margin-bottom: 8px;
  color: var(--text); font-weight: 600;
}
.filters input[type=text],
.filters input[type=number],
.filters input[type=search],
.filters select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 500;
  font-family: var(--font);
}
.filters input:focus, .filters select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}
.filters .price-row { display: flex; gap: 8px; align-items: center; }
.filters .price-row span { color: var(--text-muted); font-size: 13px; }

/* Pill chips for type filter */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg);
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all .12s;
}
.chip:hover { border-color: var(--border-strong); }
.chip input { display: none; }
.chip.active, .chip:has(input:checked) {
  background: var(--text); color: #fff; border-color: var(--text);
}

.filters .filter-actions {
  display: flex; gap: 8px; margin-top: 18px; padding-top: 18px;
  border-top: 1px solid var(--border);
}
.filters .filter-actions .btn { flex: 1; }

/* Forms / auth */
.auth-wrap {
  max-width: 420px; margin: 64px auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
  box-shadow: var(--shadow);
}
.auth-wrap h1 { margin: 0 0 8px; font-size: 26px; }
.auth-wrap p.sub { color: var(--text-muted); margin: 0 0 24px; font-size: 15px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px;
  font-family: var(--font); font-weight: 500;
}
.field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}
.field .hint { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

.alert {
  padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px;
  font-weight: 500;
}
.alert.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert.success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* Pricing card */
.pricing-card {
  max-width: 460px; margin: 40px auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
  box-shadow: var(--shadow);
}
.pricing-card h2 { margin: 0 0 8px; }
.pricing-card .price { font-size: 42px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.03em; }
.pricing-card .trial { color: var(--text-muted); margin: 0 0 24px; font-size: 15px; }
.pricing-card ul { padding-left: 0; list-style: none; margin: 0 0 24px; }
.pricing-card li { padding: 10px 0 10px 28px; position: relative; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.pricing-card li::before {
  content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800;
}
.pricing-card li > span:first-child { flex: 1; }

/* Info tooltip "i" */
.info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-alt); color: var(--text-muted);
  font-size: 12px; font-weight: 700; font-family: serif;
  cursor: help; position: relative; flex-shrink: 0; user-select: none;
  border: 1px solid var(--border);
}
.info:hover, .info:focus {
  background: var(--accent); color: #fff; border-color: var(--accent); outline: none;
}
.info[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 10px); right: -10px;
  width: 280px; max-width: 80vw;
  padding: 12px 14px; border-radius: 10px;
  background: #11151c; color: #f4f5f8;
  font-size: 13px; font-weight: 500; line-height: 1.5; text-align: left;
  font-family: var(--font);
  box-shadow: 0 10px 28px rgba(0,0,0,.20);
  opacity: 0; pointer-events: none; transition: opacity .15s;
  z-index: 100; white-space: normal;
}
.info:hover::after, .info:focus::after { opacity: 1; }

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--border); padding: 18px 0;
}
.faq summary { font-weight: 700; cursor: pointer; font-size: 16px; }
.faq p { margin: 10px 0 0; color: var(--text-muted); font-size: 15px; }

/* Trial banner */
.trial-banner {
  background: #fef3c7; color: #92400e; padding: 10px 16px; text-align: center; font-size: 14px;
  border-bottom: 1px solid #fde68a; font-weight: 600;
}
.trial-banner.danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.trial-banner a { color: inherit; text-decoration: underline; font-weight: 700; margin-left: 8px; }

/* Account page */
.account-wrap {
  max-width: 760px; margin: 40px auto 80px;
}
.account-wrap > h1 { margin-bottom: 32px; }
.acard {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 26px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.acard h3 {
  margin: 0 0 12px; font-size: 17px; font-weight: 700;
}
.acard .row {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between;
}
.acard p { margin: 0 0 6px; font-size: 15px; }
.acard p.muted { color: var(--text-muted); font-size: 14px; }
.acard.danger { border-color: #fecaca; }
.acard.danger h3 { color: var(--red); }
.kv { display: flex; gap: 24px; flex-wrap: wrap; }
.kv > div { min-width: 140px; }
.kv .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; }
.kv .val { font-size: 16px; font-weight: 600; }

/* Listing detail */
.detail-wrap { max-width: 880px; margin: 24px auto 80px; padding: 0 20px; }
.detail-wrap .back { font-size: 14px; color: var(--text-muted); }
.detail-wrap .hero-img {
  width: 100%; max-height: 520px; object-fit: cover;
  border-radius: var(--radius); margin: 16px 0 24px;
  border: 1px solid var(--border);
}
.detail-meta {
  display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0 18px; align-items: baseline;
}
.detail-meta .price-big { font-size: 28px; font-weight: 800; color: var(--green); letter-spacing: -0.02em; }
.detail-meta span.muted { color: var(--text-muted); font-size: 16px; font-weight: 500; }

/* ---------- Dual range slider (price + size filters) ---------- */
.dual-slider {
  position: relative;
  height: 22px;
  margin: 10px 4px 14px;
}
.dual-slider .track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  margin-top: -2px;
  background: var(--border);
  border-radius: 2px;
  pointer-events: none;
}
.dual-slider .fill {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--green);
  border-radius: 2px;
}
.dual-slider input[type=range] {
  position: absolute;
  left: 0; right: 0; top: 50%;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
  z-index: 2;
}
.dual-slider input[type=range]::-webkit-slider-runnable-track {
  background: transparent; height: 0; border: none;
}
.dual-slider input[type=range]::-moz-range-track {
  background: transparent; height: 0; border: none;
}
.dual-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--green);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  position: relative;
  z-index: 3;
}
.dual-slider input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--green);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

/* Number input with unit prefix shown inside the field */
.num-prefix {
  position: relative;
  flex: 1;
}
.num-prefix > .sym {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 14px;
  font-weight: 500;
}
.num-prefix > input[type=number] {
  padding-left: 26px !important;
  width: 100%;
  box-sizing: border-box;
}

/* ---------- Listing detail facts table ---------- */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  margin: 24px 0;
  overflow: hidden;
}
.facts-grid .fact {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.facts-grid .fact:last-child { border-right: none; }
.facts-grid .fact .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.facts-grid .fact .val {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.facts-grid .fact .val.empty { color: var(--text-muted); font-weight: 400; }

/* Image carousel for detail page */
.carousel {
  position: relative;
  width: 100%;
  height: 460px;
  margin: 16px 0 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  outline: none;
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 350ms cubic-bezier(.22,.6,.27,.98);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-alt);
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: #111;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 120ms;
  z-index: 2;
}
.carousel-arrow:hover { background: #fff; }
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }
.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  z-index: 2;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: background 120ms, transform 120ms;
}
.carousel-dot.active { background: #fff; transform: scale(1.2); }
.carousel-counter {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}
@media (max-width: 700px) {
  .carousel { height: 280px; }
  .carousel-arrow { width: 34px; height: 34px; font-size: 22px; }
}

/* Bookmark button overlay on the carousel image (top-right corner) */
.carousel-bookmark-form {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  margin: 0;
}
.carousel-bookmark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: #111;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 120ms, color 120ms, transform 120ms;
}
.carousel-bookmark:hover {
  background: #fff;
  transform: scale(1.05);
}
.carousel-bookmark.on {
  background: var(--green);
  color: #fff;
}
@media (max-width: 700px) {
  .carousel-bookmark { width: 36px; height: 36px; }
  .carousel-bookmark-form { top: 10px; left: 10px; }
}

/* CTA fineprint */
.cta-fineprint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 12px 0 0;
  font-weight: 400;
}

.detail-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.detail-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
}
.detail-cta {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
  text-align: center;
}
.detail-cta p { margin: 0 0 12px; color: var(--text-muted); font-size: 14px; }

/* Country / distance badge on listing cards */
.badge.country {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 500;
}

/* Single-handle distance slider */
.single-slider {
  position: relative;
  height: 22px;
  margin: 8px 4px 6px;
}
.single-slider input[type=range] {
  width: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}
.single-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--green);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.single-slider input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--green);
  cursor: pointer;
}

/* Defeat iOS / iOS Edge auto-detecting emails into layout-breaking pills.
   Belt-and-suspenders to the format-detection meta tag and the ZWSP trick
   inserted into the email string in templates. */
.email-display {
  display: inline;
  font-style: italic;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-touch-callout: none;
  color: inherit !important;
  text-decoration: none !important;
}
/* Force alerts to stay full-width and wrap aggressively, even if iOS
   still manages to inject a pill element inside them. */
.alert {
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}
.alert a[href^="mailto:"], .alert a[href^="tel:"] {
  color: inherit;
  text-decoration: none;
}

/* Translation editor */
.tx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tx-table th { text-align: left; padding: 10px 8px; font-weight: 700; font-size: 12px;
              text-transform: uppercase; color: var(--text-muted); border-bottom: 2px solid var(--border); }
.tx-table td { padding: 8px; border-bottom: 1px solid var(--bg-alt); vertical-align: top; }
.tx-table tr:hover td { background: var(--bg-soft); }
.tx-key { font-family: ui-monospace, monospace; font-size: 12px; color: var(--text-muted);
         white-space: nowrap; padding-right: 12px; }
.tx-input {
  width: 100%; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-family: var(--font); font-size: 14px; background: var(--bg);
  resize: vertical; min-height: 32px;
}
.tx-input:disabled { background: var(--bg-alt); color: var(--text-muted); cursor: not-allowed; }
.tx-input.dirty { border-color: var(--amber); background: #fffbeb; }
.tx-input.saved { border-color: var(--green); background: #f0fdf4; transition: background 600ms; }
.tx-search {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 15px; margin-bottom: 16px; font-family: var(--font);
}

/* Translation editor — grouped layout */
.tx-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 18px; flex-wrap: wrap;
}
.tx-toolbar .tx-search {
  flex: 1 1 280px; min-width: 200px; margin-bottom: 0;
}
.tx-toolbar .tx-grow { flex: 1; }
.tx-toolbar .tx-checkbox {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--text-muted); cursor: pointer;
  padding: 8px 10px; border-radius: 8px;
}
.tx-toolbar .tx-checkbox:hover { background: var(--bg-alt); }
.tx-toolbar .tx-checkbox input { margin: 0; }

.tx-group {
  margin: 0 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); overflow: hidden;
}
.tx-group > summary {
  padding: 14px 18px;
  font-weight: 700; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  list-style: none;
}
.tx-group > summary::-webkit-details-marker { display: none; }
.tx-group > summary::before {
  content: '▸'; font-size: 11px; color: var(--text-muted);
  transition: transform 120ms;
}
.tx-group[open] > summary::before { transform: rotate(90deg); }
.tx-group[open] > summary { border-bottom: 1px solid var(--border); }
.tx-group:not([open]) > summary { border-bottom: none; }
.tx-group > summary:hover { background: var(--bg-alt); }
.tx-group .tx-group-name { flex: 0 0 auto; }
.tx-group .tx-group-count {
  font-size: 12px; font-weight: 500;
  margin-left: auto;
}
.tx-group .tx-table { margin: 0; }
.tx-group .tx-table th { background: transparent; padding: 12px 14px; }
.tx-group .tx-table td { padding: 10px 14px; }

/* Translation editor — card layout (EN reference, NL primary) */
.tx-progress {
  position: relative; height: 28px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px;
  margin: 14px 0 22px; overflow: hidden;
}
.tx-progress-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, #15803d 0%, #4ade80 100%);
  width: 0%; transition: width 300ms ease;
}
.tx-progress-fill.full { background: linear-gradient(90deg, #15803d 0%, #15803d 100%); }
.tx-progress-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text);
  text-shadow: 0 0 2px rgba(255,255,255,0.6);
}

.tx-rows { padding: 6px 0; }
.tx-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--bg-alt);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "head head"
    "ref  target";
  gap: 10px 16px;
}
.tx-row:last-child { border-bottom: none; }
.tx-row:hover { background: var(--bg-soft); }
.tx-row.is-missing {
  background: linear-gradient(180deg, #fffbeb 0%, transparent 60%);
}
.tx-row.is-missing:hover { background: linear-gradient(180deg, #fef3c7 0%, transparent 60%); }

.tx-row-head {
  grid-area: head;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.tx-row .tx-key {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 500;
}
.tx-row .tx-pane { display: flex; flex-direction: column; gap: 4px; }
.tx-row .tx-pane.tx-ref { grid-area: ref; }
.tx-row .tx-pane.tx-target { grid-area: target; }
.tx-row .tx-pane-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.tx-row .tx-pane-label .muted { font-weight: 500; }
.tx-row .tx-readonly {
  padding: 8px 12px;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  white-space: pre-wrap;
  min-height: 20px;
}
.tx-row .tx-input.tx-primary {
  border-color: var(--border-strong);
  background: var(--bg);
}
.tx-row .tx-input.tx-primary:focus {
  outline: 2px solid var(--green);
  outline-offset: -1px;
  border-color: var(--green);
}

.tx-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.tx-pill.missing { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.tx-pill.ok { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }

@media (max-width: 720px) {
  .tx-row {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "ref" "target";
    padding: 12px 14px;
  }
}

/* Listings — saved-search nudge banner */
.search-cta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 14px 0 4px;
  font-size: 14px;
}
.search-cta.saved {
  background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
  border-color: #a7f3d0;
}
.search-cta strong { display: inline; margin-right: 8px; }
.search-cta .muted { display: inline; }
.search-cta > div:first-child { flex: 1 1 280px; line-height: 1.5; }
.search-cta a.btn { flex: 0 0 auto; }
@media (max-width: 600px) {
  .search-cta strong, .search-cta .muted { display: block; }
  .search-cta strong { margin-bottom: 4px; }
}

/* Mobile sticky action bar on listing detail page */
.mobile-action-bar { display: none; }
@media (max-width: 720px) {
  .mobile-action-bar {
    display: flex; gap: 8px; align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) 14px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
  }
  /* Lift the page content so the bar doesn't cover the bottom of the listing */
  .detail-wrap { padding-bottom: 90px; }
  .mab-btn {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    height: 44px; padding: 0 14px;
    border-radius: 10px; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text);
    font-size: 14px; font-weight: 700; text-decoration: none;
    cursor: pointer; min-width: 44px;
  }
  .mab-btn:hover { background: var(--bg-alt); text-decoration: none; }
  .mab-btn.mab-cta {
    flex: 1; background: var(--accent); color: #fff; border-color: var(--accent);
  }
  .mab-btn.mab-cta:hover { background: var(--accent-hover); }
  .mab-btn.mab-save.on { background: var(--green); color: #fff; border-color: var(--green); }
}

/* Saved-search frequency radio options */
.freq-options { display: grid; gap: 8px; margin-top: 6px; }
.freq-opt {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  background: var(--bg-card);
  transition: border-color 120ms, background 120ms;
}
.freq-opt:hover { background: var(--bg-soft); }
.freq-opt input[type=radio] {
  margin: 4px 0 0;
  accent-color: var(--green);
  flex: 0 0 auto;
}
.freq-opt input[type=radio]:checked + div { color: var(--text); }
.freq-opt:has(input:checked) { border-color: var(--green); background: #f0fdf4; }
.freq-opt strong { font-weight: 600; }
.freq-opt .muted { color: var(--text-muted); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.badge-rec, .badge-warn {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px;
  margin-left: 6px; vertical-align: middle;
}
.badge-rec { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-warn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* ---------- Mobile filter drawer ---------- */
.filter-drawer-toggle { display: none; }
.filter-drawer-close { display: none; }
.filter-drawer-backdrop { display: none; }

@media (max-width: 760px) {
  /* Show open-button + restyle layout for mobile */
  .filter-drawer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 10px 14px;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    margin: 6px 0 14px;
    box-shadow: var(--shadow);
  }
  .filter-drawer-toggle:hover { background: var(--bg-alt); }
  .filter-count-pill {
    background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 999px; margin-left: 4px;
  }
  .filter-drawer-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.5);
    z-index: 90;
    opacity: 0; pointer-events: none;
    transition: opacity 200ms;
  }
  /* The filters panel — hidden by default, slides up from the bottom */
  .layout .filters {
    position: fixed;
    left: 0; right: 0; bottom: 0; top: auto;
    max-height: 88vh;
    background: var(--bg);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.18);
    z-index: 100;
    padding: 24px 20px 20px;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 240ms cubic-bezier(.22,.6,.27,1);
    order: initial; /* override the earlier 'order:2' */
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .filter-drawer-close {
    display: flex;
    position: sticky; top: 0;
    align-items: center; justify-content: center;
    margin-left: auto;
    width: 36px; height: 36px;
    border: none; background: var(--bg-alt);
    border-radius: 50%;
    font-size: 22px; line-height: 1;
    cursor: pointer; color: var(--text);
    margin-bottom: 6px;
  }
  /* Drawer-open state on body */
  body.drawer-open { overflow: hidden; }
  body.drawer-open .filter-drawer-backdrop { opacity: 1; pointer-events: auto; }
  body.drawer-open .layout .filters { transform: translateY(0); }
  /* Listings still flow normally; filters are fixed-positioned and overlay */
  .layout { display: block; }
  .listings { grid-template-columns: 1fr; }
}

/* ---------- Empty state ---------- */
.empty-state {
  padding: 60px 24px; text-align: center;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin: 24px 0;
}
.empty-state h3 { margin: 0 0 8px; color: var(--text); }
.empty-state p { color: var(--text-muted); margin: 0 0 16px; }

/* Account status banner */
.status-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  margin: 18px 0 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.status-banner > div:nth-child(2) { flex: 1; }
.status-banner > div:nth-child(2) strong { display: block; margin-bottom: 2px; }
.status-banner .status-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  flex: 0 0 auto;
}
.status-active .status-icon { background: #d1fae5; color: #065f46; }
.status-trial .status-icon { background: #fef3c7; color: #92400e; }
.status-trial_expired .status-icon,
.status-canceled .status-icon,
.status-past_due .status-icon,
.status-unpaid .status-icon { background: #fee2e2; color: #991b1b; }
.status-active { border-color: #a7f3d0; background: #f0fdf4; }
.status-trial { border-color: #fde68a; background: #fffbeb; }

/* Quick stats grid */
.acct-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.acct-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color 120ms, transform 120ms;
}
a.acct-stat:hover { border-color: var(--border-strong); text-decoration: none; transform: translateY(-1px); }
.acct-stat-num {
  font-size: 32px; font-weight: 800; line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}
.acct-stat-lbl {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: 700; margin-top: 6px;
}
@media (max-width: 540px) {
  .acct-stats { grid-template-columns: 1fr 1fr; }
  .acct-stats .acct-stat:nth-child(3) { grid-column: 1 / -1; }
}

/* Saved searches list (full-width rows, no table) */
.search-list { display: grid; gap: 12px; margin-top: 16px; }
.search-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--bg-card);
}
.search-row.is-paused { opacity: 0.65; }
.search-row-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.search-row .search-name { margin: 0; font-size: 17px; }
.search-row .search-name .badge { vertical-align: middle; font-weight: 600; margin-left: 8px; }
.search-row .search-actions { display: flex; gap: 6px; }
.search-row .search-actions form { margin: 0; }
.search-row .search-criteria {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 10px 0 6px;
}
.search-row .crit {
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
}
.search-row .crit.muted { background: transparent; }
.search-row .search-meta { font-size: 12px; margin-top: 4px; }
