
/* ===== FONTIT: Inter self-host (ei Google Fonts -yhteyksia, GDPR + render-block pois) ===== */
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/inter-latin-400.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/inter-latin-500.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/inter-latin-600.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/inter-latin-700.woff2') format('woff2')}

/* ===== DESIGN TOKENS ===== */
/* DE-AI-ilme 7/2026 (mockups/deai-mockup-v1.html): teal-aksentti + lämmin harmaa
   navy-SaaS-paletin tilalle. CTA-amber säilytetty (konversioelementit ennallaan). */
:root {
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --primary: #0F766E;
  --primary-light: #14A396;
  --primary-lighter: #F0FDFA;
  --accent: #0F766E; /* tummennettu 0D9488→0F766E: valkoinen teksti nappipohjalla ylittää WCAG AA 4,5:1 */
  --accent-light: #14B8A6;
  --accent-lighter: #CCFBF1;
  --cta: #F59E0B;
  --cta-dark: #D97706;
  --cta-light: #FEF3C7;
  --bg: #F4F6F7;
  --bg-alt: #ECEFF0;
  --card: #FFFFFF;
  --text: #162126;
  --text-secondary: #5F6C72;
  --text-muted: #64737A; /* tummennettu 8B979D→64737A: pientekstit ylittävät WCAG AA -kontrastin valkoisella */
  --text-light: #5F6C72;
  --border: #DDE3E6;
  --border-light: #E9EEF0;
  --authorized: #4338CA;
  --verified: #059669;
  --featured: #D97706;
  --highlight: #F59E0B;
  --highlight-dark: #D97706;
  --primary-dark: #134E4A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.03);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.02);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Näkyvä fokusindikaattori näppäimistökäyttäjille (WCAG 2.4.7) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.software-chip:focus-within, .compare-checkbox:focus-within { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ===== RESET & BASE ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== HEADER (new .site-header + legacy header) ===== */
.site-header,
header:not(.site-header) {
  background: #fff;
  color: var(--text);
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: box-shadow .2s;
}
.site-header { box-shadow: var(--shadow-sm); }

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

/* Legacy .logo support */
.logo { font-size: 1.125rem; font-weight: 600; }
.logo a { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: .5rem; }

.logo-img { height: 36px; width: auto; }

.header-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-link {
  padding: .5rem .75rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.nav-link:hover {
  color: var(--primary);
  background: var(--primary-lighter);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* Legacy .header-right support */
.header-right { display: flex; align-items: center; gap: 1rem; }
.header-stats { font-size: .875rem; color: var(--text-muted); }
.header-login { color: var(--accent); text-decoration: none; font-size: .875rem; font-weight: 500; white-space: nowrap; }
.header-login:hover { text-decoration: underline; }

.header-fav-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: .375rem .625rem;
  border-radius: var(--radius-sm);
  transition: all .2s;
  font-size: .875rem;
}
.header-fav-link:hover { color: #ef4444; background: #fef2f2; }
.header-fav-link svg { stroke: currentColor; }
.header-fav-link span { font-weight: 600; }

.header-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: .5rem 1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background .15s, transform .1s;
}
.header-cta-btn:hover { background: var(--accent-light); transform: translateY(-1px); }

/* ===== HERO - HOMEPAGE ===== */
.hero-home {
  position: relative;
  background: #134E4A; /* DE-AI: rauhallinen yksivärinen hero, ei SaaS-gradienttia */
  padding: 5rem 0 4rem;
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.hero-layout {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.hero-content { flex: 1; }

.hero-map-link {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: auto;
  display: block;
  text-decoration: none;
  transition: opacity .2s;
}
.hero-map-link:hover { opacity: .9; }
.hero-map-link:hover .hero-map-cta { opacity: 1; }

.hero-map-img {
  height: 100%;
  width: auto;
  display: block;
  mask-image: linear-gradient(to right, transparent 0%, black 50%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 50%);
}

.hero-map-cta {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13,148,136,.9);
  color: #fff;
  padding: .5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: .85;
  transition: opacity .2s;
}

.hero-content h1 {
  font-family: ui-serif, Georgia, 'Times New Roman', serif; /* DE-AI: rauhallinen typografia */
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: .75rem;
  letter-spacing: -.01em;
}

.hero-highlight {
  color: #7DD8CE; /* DE-AI: yksivärinen korostus gradient-tekstin tilalle */
}

.hero-subtitle {
  font-size: 1.125rem;
  opacity: .9;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-search { max-width: 720px; margin: 0 auto; }

.hero-search-bar {
  display: flex;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: .375rem;
  box-shadow: var(--shadow-xl);
  gap: 0;
}

.hero-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1rem;
  min-width: 0;
}
.hero-search-input-wrap svg { stroke: var(--text-muted); flex-shrink: 0; }
.hero-search-input-wrap .search-input {
  border: none;
  padding: 0;
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.hero-search-input-wrap .search-input:focus { outline: none; box-shadow: none; border-color: transparent; }

.hero-search-city-wrap {
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border);
  padding-left: .25rem;
  min-width: 180px;
}
.hero-search-city-wrap .city-dropdown {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .375rem;
  padding: 0 .75rem;
}
.hero-search-city-wrap svg { stroke: var(--text-muted); flex-shrink: 0; }
.hero-search-city-wrap .city-input {
  border: none;
  padding: .625rem 0;
  font-size: .9375rem;
  background: transparent;
  color: var(--text);
  width: 100%;
}
.hero-search-city-wrap .city-input:focus { outline: none; }

.hero-search-btn {
  padding: .75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: calc(var(--radius-lg) - 4px);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .1s;
}
.hero-search-btn:hover { background: var(--accent-light); transform: translateY(-1px); }

.hero-quick-links {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.quick-label {
  font-size: .8125rem;
  opacity: .7;
}
.hero-quick-links a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .8125rem;
  padding: .25rem .625rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-xl);
  transition: all .15s;
}
.hero-quick-links a:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.4); }

/* AI-avusteinen haku (beta) — hero-paneeli */
.ai-search-wrap{margin-top:.75rem;text-align:center}
.ai-search-toggle{background:none;border:none;color:#fff;opacity:.9;font-size:.9375rem;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.ai-search-toggle:hover{opacity:1}
.beta-badge{display:inline-block;background:var(--cta,#F59E0B);color:#fff;font-size:.625rem;font-weight:700;padding:.1rem .4rem;border-radius:4px;margin-left:.25rem;text-transform:uppercase;letter-spacing:.05em}
.ai-search-panel{max-width:640px;margin:.75rem auto 0;background:var(--card,#fff);border-radius:8px;padding:1rem;box-shadow:0 8px 24px rgba(0,0,0,.18);text-align:left}
.ai-search-panel textarea{width:100%;border:1px solid var(--border);border-radius:6px;padding:.75rem;font-size:1rem;font-family:inherit;resize:vertical}
.ai-search-panel textarea:focus{outline:none;border-color:var(--primary)}
.ai-search-actions{display:flex;align-items:center;gap:.75rem;margin-top:.5rem;flex-wrap:wrap}
.ai-search-btn{background:var(--primary);color:#fff;border:none;border-radius:6px;padding:.6rem 1.25rem;font-size:.9375rem;font-weight:600;cursor:pointer}
.ai-search-btn:hover{background:var(--primary-light)}
.ai-search-btn:disabled{opacity:.6;cursor:wait}
.ai-search-note{font-size:.75rem;color:var(--text-muted,#64737A)}
.ai-search-note a{color:var(--primary)}
.ai-search-result{margin-top:.5rem;font-size:.875rem;color:var(--text)}
.ai-search-result.ai-warn{color:#B45309}
@media(max-width:768px){.ai-search-btn{width:100%}}

.hero-locate-wrap {
  margin-top: 1rem;
  text-align: center;
}
.hero-locate-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-xl);
  font-size: .9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
  backdrop-filter: blur(4px);
}
.hero-locate-btn:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.4); transform: translateY(-1px); }
.hero-locate-btn:disabled { opacity: .6; cursor: wait; }
.hero-locate-btn svg { stroke: currentColor; flex-shrink: 0; }

.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #162126;
  color: #fff;
  padding: .875rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: .9375rem;
  font-family: var(--font);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  z-index: 10000;
  opacity: 0;
  transition: all .3s ease;
  max-width: 90vw;
  text-align: center;
}
.toast-notification.toast-error { background: #dc2626; }
.toast-notification.toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== HERO - LEGACY (city/software pages) ===== */
.hero {
  background: linear-gradient(135deg, rgba(19,78,74,.88), rgba(15,118,110,.78)), url('/assets/background.webp') center/cover no-repeat;
  padding: 4.5rem 0 4rem;
  color: #fff;
  text-align: center;
}
.hero h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: .375rem; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.hero p { font-size: 1rem; max-width: 550px; margin: 0 auto; color: rgba(255,255,255,.95); }
.hero-small { padding: 2rem 0; }
.hero-breadcrumb { font-size: .875rem; color: rgba(255,255,255,.85); margin-bottom: .75rem; }
.hero-breadcrumb a { color: #fff; text-decoration: none; }
.hero-breadcrumb a:hover { text-decoration: underline; }
.hero-software { display: flex; align-items: center; gap: 1rem; justify-content: center; }
.hero-sw-logo { height: 48px; width: auto; border-radius: 8px; background: #fff; padding: .25rem; }
.hero-authorized { background: linear-gradient(135deg, rgba(67,56,202,.75), rgba(74,58,153,.65)), url('/assets/background.webp') center/cover no-repeat; }
.hero-auth-badge { margin-bottom: .5rem; }
.hero-auth-badge svg { stroke: #fff; }

/* ===== TRUST BAR ===== */
.trust-bar {
  background: #fff;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.trust-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .125rem;
  text-align: center;
}

.trust-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.trust-label {
  font-size: .8125rem;
  color: var(--text-secondary);
}

.trust-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--border);
}

/* ===== HOW IT WORKS ===== */
.how-section {
  padding: 3rem 0;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}
.how-section h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primary);
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}
.how-step {
  text-align: center;
  padding: 1.5rem;
}
.step-number {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}
.how-step h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: .5rem;
  color: var(--text);
}
.how-step p {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== POPULAR CITIES ===== */
.popular-section {
  padding: 2.5rem 0;
}
.popular-section h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary);
}
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.city-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all .2s;
}
.city-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.city-card-name {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
}
.city-card-count {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

/* ===== SOFTWARE PARTNERS ===== */
.partners-section { padding: 2rem 0; text-align: center; }
.partners-row { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }

/* ===== SEARCH SECTION (legacy) ===== */
.search-section {
  background: var(--card);
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 1.5rem auto;
  box-shadow: var(--shadow-sm);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr 200px 160px auto;
  gap: .5rem;
  margin-bottom: .75rem;
}

.search-input, .search-select {
  padding: .625rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.search-input:focus, .search-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-lighter);
}

.search-btn {
  padding: .625rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .1s;
}
.search-btn:hover { background: var(--accent-light); }

/* ===== CITY DROPDOWN ===== */
.city-dropdown { position: relative; }

.city-input {
  width: 100%;
  padding: .625rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  background: #fff;
  font-family: inherit;
  transition: border-color .15s;
}
.city-input:focus { outline: none; border-color: var(--accent); }

.city-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 100;
  display: none;
  box-shadow: var(--shadow-lg);
}
.city-list.open { display: block; }

.city-item {
  padding: .5rem .75rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-size: .875rem;
  transition: background .1s;
}
.city-item:hover { background: var(--accent-lighter); }
.city-item.kbd-active { background: var(--accent-lighter); outline: 2px solid var(--primary); outline-offset: -2px; }

/* Kilpailuta-CTA:t + jaetut lomaketyylit + 2-vaiheinen tarjouslomake (A2, 19.7.2026).
   Lomakeluokat olivat aiemmin VAIN firm-sivun inline-tyyleissä → /kilpailuta ja
   hero-CTA:t renderöityivät tyylittöminä. Firm-sivun inline-kopiot yliajavat nämä
   kaskadissa identtisinä — ei visuaalista muutosta siellä. */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .375rem; font-weight: 500; font-size: .875rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: .625rem .75rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 1rem; font-family: inherit; background: #fff; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: .5rem .75rem; }
.checkbox-label { display: flex; align-items: center; gap: .375rem; font-size: .875rem; font-weight: 400; cursor: pointer; }
.checkbox-label input { width: auto; }
.consent-group { margin-top: 1rem; padding: 1rem; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; }
.consent-required { align-items: flex-start; }
.consent-required input { margin-top: .25rem; flex-shrink: 0; }
.consent-required span { font-size: .8125rem; line-height: 1.5; color: #0c4a6e; }
.consent-required a { color: #2563eb; text-decoration: underline; }
.form-note { font-size: .75rem; color: var(--text-secondary); margin: .5rem 0 0; line-height: 1.4; }
.form-error { color: #dc2626; font-size: .875rem; margin-bottom: 1rem; display: none; }
.form-error.active { display: block; }
.form-success { color: #059669; font-size: .875rem; margin-bottom: 1rem; display: none; padding: .75rem; background: #dcfce7; border-radius: 6px; }
.form-success.active { display: block; }
.btn-submit { background: var(--primary); color: #fff; width: 100%; padding: .75rem; display: inline-block; border-radius: 6px; text-decoration: none; font-weight: 500; border: none; cursor: pointer; font-size: 1rem; text-align: center; }
.btn-submit:hover { background: var(--primary-dark); }
.btn-submit:disabled { background: #9ca3af; cursor: not-allowed; }
.city-kilpailuta-cta { margin-top: 1rem; }
.city-kilpailuta-cta .btn-submit { width: auto; padding: .75rem 1.5rem; }
.hero-kilpailuta-link { display: inline-block; margin-left: 1rem; font-size: .9rem; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hero-kilpailuta-link:hover { color: var(--cta-light); }
.quote-step-indicator { font-size: .8rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.quote-step-back { background: none; border: none; color: var(--primary); cursor: pointer; font-size: .8rem; text-decoration: underline; padding: 2px 4px; text-transform: none; letter-spacing: 0; }
.modal-social-proof { font-size: .8rem; color: var(--text-secondary); margin: -.25rem 0 1rem; }
@media (max-width: 767px) {
  .hero-kilpailuta-link { display: block; margin: .75rem 0 0; }
}

.city-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  display: none;
}
.city-clear.visible { display: block; }

/* ===== FILTER CHIPS ===== */
.filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .3rem .75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: .8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.filter-chip:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.filter-chip:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-lighter);
  color: var(--accent);
}
.filter-chip input { margin: 0; }

.filter-label {
  font-weight: 500;
  color: var(--text-muted);
  font-size: .8125rem;
  margin-right: .25rem;
}

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 .25rem;
}

.filter-auth:has(input:checked) {
  border-color: var(--authorized);
  background: #EEF2FF;
  color: var(--authorized);
}

/* ===== SOFTWARE FILTERS ===== */
.software-filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.software-chip {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .25rem .5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.software-chip:hover { border-color: var(--accent); }
.software-chip.active { border-color: var(--accent); background: var(--accent-lighter); }
.software-chip input { margin: 0; accent-color: var(--accent); }
.sw-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ===== REGISTRY FILTERS (legacy) ===== */
.registry-filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--border);
}
.filter-group .registry-filters {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.registry-filters .filter-chip:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-lighter);
  color: var(--accent);
}

.partner-select {
  padding: .25rem .5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  background: #fff;
}

.sw-primary-toggle {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem .5rem;
  font-size: .75rem;
  color: var(--text-muted);
}
.sw-primary-toggle input { margin: 0; }

/* ===== SEARCH SIDEBAR ===== */
.search-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}
.search-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.sidebar-header h3 {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--text);
}
.sidebar-close {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: .25rem;
  line-height: 1;
}
.sidebar-close:hover { color: var(--text); }
.filter-group {
  /* fieldset-UA-nollaukset: reunus/padding pois, min-inline-size ettei min-content riko sidebaria */
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}
.filter-group:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.filter-group legend { display: block; width: 100%; padding: 0; }
.filter-group h4 {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.filter-hint {
  font-size: .75rem;
  color: var(--text-light);
  margin: -.25rem 0 .5rem;
}
.filter-group-chips {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 199;
}
.sidebar-overlay.open { display: block; }
.results-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.results-toolbar .results-count { flex: 1; }
.filter-toggle-btn {
  display: none;
  align-items: center;
  gap: .375rem;
  padding: .5rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.filter-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-toggle-btn svg { flex-shrink: 0; }
.search-results-area { min-width: 0; }

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--card);
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .5rem;
  text-align: center;
}

.stat-value { font-size: 1.25rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: .6875rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }

/* ===== RESULTS ===== */
.results-section { padding: 1.5rem 0; }

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.results-count { font-size: .9375rem; color: var(--text-secondary); }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 1rem;
}

.sort-controls { display: flex; align-items: center; gap: .5rem; }
.sort-label { font-size: .8125rem; color: var(--text-muted); }
.sort-select {
  padding: .375rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s;
}
.sort-select:focus { outline: none; border-color: var(--accent); }

.active-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.active-filters:empty { display: none; }

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .25rem .5rem .25rem .75rem;
  background: var(--accent-lighter);
  border: 1px solid #99F6E4;
  border-radius: var(--radius-xl);
  font-size: .75rem;
  color: var(--accent);
}
.filter-tag-remove {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
  opacity: .7;
}
.filter-tag-remove:hover { opacity: 1; }

.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }

/* ===== COMPANY CARDS ===== */
.company-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.company-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-featured {
  border: 2px solid var(--featured);
  box-shadow: 0 0 0 1px rgba(217,119,6,.15), var(--shadow-sm);
}
.card-featured:hover {
  box-shadow: 0 0 0 1px rgba(217,119,6,.25), var(--shadow-lg);
}

.card-top {
  display: flex;
  gap: .75rem;
  padding: 1.25rem 1.25rem .75rem;
  align-items: center;
}

.card-identity { flex: 1; min-width: 0; }

.card-badges {
  display: flex;
  gap: .375rem;
  align-items: center;
  flex-shrink: 0;
}

.company-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.company-name a {
  color: var(--text);
  text-decoration: none;
}
.company-name a:hover {
  color: var(--accent);
}

.company-location {
  display: flex;
  align-items: center;
  gap: .375rem;
  font-size: .8125rem;
  color: var(--text-secondary);
  margin-top: .25rem;
}
.company-location svg { flex-shrink: 0; }

.card-dot { color: var(--text-muted); }

.card-description {
  padding: 0 1.25rem;
  font-size: .8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-meta {
  padding: .75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}

.card-registers {
  display: flex;
  gap: .375rem;
  flex-wrap: wrap;
}

.reg-chip {
  display: inline-flex;
  align-items: center;
  padding: .125rem .5rem;
  border-radius: var(--radius-xl);
  font-size: .6875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg);
}

.auth-corner {
  display: inline-flex;
  align-items: center;
  padding: .1875rem .5rem;
  /* DE-AI: teal-pilleri (mockupin .badge) indigo-laatikon tilalle */
  background: #F0FDFA;
  color: var(--primary-dark);
  border: 1px solid #B7D9D6;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}
.auth-corner:hover { background: #CCFBF1; }

/* Legacy card-header support (city/software pages) */
.card-header {
  padding: 1rem 1rem .75rem;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}
.card-header .card-badges {
  position: absolute;
  top: .5rem;
  right: .5rem;
}
.card-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
  padding-right: 100px;
}

.company-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .375rem;
}

.company-id {
  font-size: .75rem;
  color: var(--text-muted);
  font-family: ui-monospace, 'SF Mono', monospace;
}

.ytj-link {
  font-size: .7rem;
  color: var(--accent);
  text-decoration: none;
  margin-left: auto;
}
.ytj-link:hover { text-decoration: underline; }

/* ===== CARD BODY (legacy for city/software pages) ===== */
.card-body {
  padding: .75rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.info-section {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: .5rem;
  font-size: .8125rem;
}

.info-label {
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: .375rem;
}

.info-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-value { color: var(--text); line-height: 1.4; }

.maps-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: var(--accent);
  text-decoration: none;
  font-size: .7rem;
  margin-top: .25rem;
}
.maps-link:hover { text-decoration: underline; }

.registers-section {
  margin-top: .25rem;
  padding-top: .625rem;
  border-top: 1px dashed var(--border-light);
}
.registers-list { list-style: none; display: flex; gap: .5rem; flex-wrap: wrap; }
.reg-item { display: flex; align-items: center; gap: .25rem; font-size: .75rem; color: var(--text); }
.reg-icon { width: 12px; height: 12px; fill: none; stroke-width: 2; }
.reg-alv .reg-icon { stroke: var(--verified); }
.reg-ep .reg-icon { stroke: var(--featured); }
.reg-emp .reg-icon { stroke: var(--primary-light); }

.card-sw-list { display: flex; align-items: center; gap: .375rem; }
.card-sw-badge { display: inline-block; padding: .0625rem .25rem; border-radius: 2px; font-size: .625rem; font-weight: 600; white-space: nowrap; line-height: 1.2; }
.card-sw-more { font-size: .625rem; color: var(--text-muted); background: var(--bg); padding: .125rem .375rem; border-radius: 3px; }

/* ===== CARD FOOTER ===== */
.card-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: .5rem;
  align-items: center;
}

.action-btn {
  flex: 1;
  padding: .5rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  transition: all .15s;
  font-family: inherit;
}

.btn-details {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-details:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: #0F766E; border-color: #0F766E; }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-website {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-website:hover { background: var(--accent-light); border-color: var(--accent-light); }

.btn-highlight {
  background: var(--cta);
  color: #1F2937; /* tumma teksti amber-pohjalla: valkoinen jäi 2,15:1 (WCAG AA vaatii 4,5:1) */
  border: 1px solid var(--cta);
}
.btn-highlight:hover { background: var(--cta-dark); border-color: var(--cta-dark); }

.btn-quote-sm {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-quote-sm:hover { background: #0F766E; border-color: #0F766E; }

/* ===== CARD BADGES ===== */
.card-badge {
  display: inline-flex;
  align-items: center;
  padding: .1875rem .5rem;
  border-radius: var(--radius-sm);
  font-size: .625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.badge-featured { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }

/* ===== FAVORITES ===== */
.favorite-btn {
  position: absolute;
  top: .5rem;
  left: .5rem;
  background: rgba(255,255,255,.9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.favorite-btn:hover { background: #fff; transform: scale(1.1); }
.favorite-btn.active { background: #fef2f2; }
.favorite-btn.active .heart-icon { fill: #ef4444; stroke: #ef4444; }
.favorite-btn:hover .heart-icon { stroke: #ef4444; }

.favorite-btn-inline {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px; /* kosketuskohde ≥24px (WCAG 2.5.8) */
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  vertical-align: middle;
}
.favorite-btn-inline:hover { transform: scale(1.15); }
.favorite-btn-inline .heart-icon { width: 16px; height: 16px; }
.favorite-btn-inline:hover .heart-icon { stroke: #ef4444; }
.favorite-btn-inline.active .heart-icon { fill: #ef4444; stroke: #ef4444; }

.heart-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #9ca3af;
  stroke-width: 2;
  transition: all .2s;
}

/* ===== COMPARE ===== */
.compare-checkbox {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .375rem .625rem;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  cursor: pointer;
  transition: all .15s;
}
.compare-checkbox:hover { border-color: var(--accent); }
.compare-checkbox:has(input:checked) { background: var(--accent-lighter); border-color: var(--accent); }
.compare-checkbox input { margin: 0; accent-color: var(--accent); }
.compare-check { /* alias */ }
.compare-label { color: var(--text-muted); }
.compare-checkbox:has(input:checked) .compare-label { color: var(--accent); font-weight: 500; }

.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 1.25rem 1rem;
  transform: translateY(100%);
  transition: transform .3s ease;
  z-index: 1000;
  box-shadow: 0 -8px 24px rgba(13,148,136,.25);
}
.compare-bar.visible { transform: translateY(0); }
.compare-bar.hidden { transform: translateY(100%); }

.compare-bar-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.compare-bar-left { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; }
.compare-bar-title { font-weight: 700; font-size: 1.125rem; white-space: nowrap; }
.compare-count { background: rgba(255,255,255,.2); padding: .375rem .75rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 700; }
.compare-names { display: flex; gap: .5rem; flex-wrap: wrap; overflow: hidden; }
.compare-names span { background: rgba(255,255,255,.15); padding: .25rem .5rem; border-radius: var(--radius-sm); font-size: .75rem; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }

.compare-bar-actions { display: flex; gap: .5rem; flex-shrink: 0; }

.compare-btn {
  padding: .625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  font-family: inherit;
}
.compare-btn-clear { background: rgba(255,255,255,.2); color: #fff; }
.compare-btn-clear:hover { background: rgba(255,255,255,.3); }
.compare-btn-go { background: var(--cta); color: #1F2937; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.compare-btn-go:hover:not(:disabled) { background: var(--cta-dark); transform: translateY(-1px); }
.compare-btn-go:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: .25rem; margin-top: 1.5rem; flex-wrap: wrap; }

.page-btn {
  padding: .375rem .75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .8125rem;
  transition: all .15s;
  font-family: inherit;
}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: .5; cursor: not-allowed; }
.page-btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
a.page-btn { text-decoration: none; }
.page-dots { padding: 0 .5rem; color: var(--text-muted); }

.per-page-selector { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; color: var(--text-muted); }
.per-page-btn {
  padding: .25rem .5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: .75rem;
}
.per-page-btn:hover { border-color: var(--accent); color: var(--accent); }
.per-page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== FOOTER ===== */
footer {
  background: #0F172A;
  color: #fff;
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-section h3 { font-size: .875rem; margin-bottom: .75rem; font-weight: 600; }
.footer-section p,
.footer-section a { color: rgba(255,255,255,.65); font-size: .8125rem; text-decoration: none; line-height: 1.6; }
.footer-section a:hover { color: #fff; }

.footer-links { display: flex; flex-wrap: wrap; gap: .375rem .75rem; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .8125rem; text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.25rem;
  text-align: center;
  font-size: .75rem;
  color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.4); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }

/* ===== CITY PAGES ===== */
.auth-info { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: var(--radius-md); padding: 1.5rem; margin-bottom: 1.5rem; }
.auth-info h2 { font-size: 1rem; color: #0369a1; margin-bottom: .5rem; }
.auth-info p { font-size: .875rem; color: #0c4a6e; margin-bottom: .75rem; }
.auth-info a { color: #0284c7; font-size: .875rem; }
.vendor-link, .back-link { font-size: .875rem; color: var(--accent); }

/* ===== MOBILE MENU ===== */
.mobile-menu-btn { display:none; background:none; border:none; cursor:pointer; color:var(--text); padding:.375rem; line-height:1; }
.mobile-menu { display:none; position:fixed; top:0; right:0; bottom:0; width:280px; background:var(--card); z-index:300; transform:translateX(100%); transition:transform .25s cubic-bezier(.4,0,.2,1); box-shadow:var(--shadow-xl); overflow-y:auto; }
.mobile-menu.open { transform:translateX(0); }
.mobile-menu-header { display:flex; justify-content:space-between; align-items:center; padding:1rem 1.25rem; border-bottom:1px solid var(--border); }
.mobile-menu-title { font-weight:600; font-size:1rem; }
.mobile-menu-close { background:none; border:none; font-size:1.75rem; cursor:pointer; color:var(--text-muted); padding:.25rem; min-width:44px; min-height:44px; display:flex; align-items:center; justify-content:center; }
.mobile-menu-nav { display:flex; flex-direction:column; padding:.5rem 0; }
.mobile-nav-link { padding:.875rem 1.25rem; color:var(--text); text-decoration:none; font-size:.9375rem; font-weight:500; border-bottom:1px solid var(--border); transition:background .15s; }
.mobile-nav-link:hover { background:var(--bg); }
.mobile-nav-cta { margin:1rem 1.25rem; padding:.75rem 1rem; background:var(--accent); color:#fff; border-radius:var(--radius-sm); text-align:center; font-weight:600; border-bottom:none; }
.mobile-menu-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:299; }
.mobile-menu-overlay.open { display:block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .hero-map-link { display: none; }
  .search-layout { grid-template-columns: 1fr; }
  .search-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    z-index: 200;
    border-radius: 0;
    overflow-y: auto;
    max-height: 100vh;
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    padding-top: 1rem;
    box-shadow: var(--shadow-xl);
  }
  .search-sidebar.open { transform: translateX(0); }
  .sidebar-close { display:flex; align-items:center; justify-content:center; font-size:2rem; min-width:44px; min-height:44px; }
  .sidebar-overlay.open { display: block; }
  .filter-toggle-btn { display: inline-flex; }
  .search-sidebar .filter-group:first-of-type .info-bubble { bottom: auto; top: calc(100% + 8px); }
  .search-sidebar .filter-group:first-of-type .info-bubble::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #162126; }
  .header-nav { display: none; }
  .header-cta-btn { display: none; }
  .header-fav-link { display: none; }
  .mobile-menu-btn { display: flex; }
  .mobile-menu { display: block; }
}

@media (max-width: 768px) {
  .hero-content h1 { font-size: 1.75rem; }
  .hero-home { padding: 3rem 0 2.5rem; }
  .hero-search-bar { flex-direction: column; border-radius: var(--radius-md); }
  .hero-search-input-wrap { padding: .75rem; }
  .hero-search-city-wrap { border-left: none; border-top: 1px solid var(--border); padding-left: 0; min-width: 0; }
  .hero-search-btn { border-radius: var(--radius-sm); margin: .375rem; }

  .trust-items { gap: 1rem; }
  .trust-divider { display: none; }

  .search-form { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .results-grid { grid-template-columns: 1fr; }
  .results-header { flex-direction: column; align-items: flex-start; }

  .how-steps { grid-template-columns: 1fr; gap: 1rem; }
  .city-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-content { grid-template-columns: 1fr 1fr; gap: 1.5rem; }

  .header-stats { display: none; }
  .header-nav { display: none; }
  .hero-software { flex-direction: column; text-align: center; }

  .compare-bar-content { flex-direction: column; align-items: stretch; gap: .75rem; }
  .compare-bar-left { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .compare-names { flex-wrap: wrap; }
  .compare-bar-actions { justify-content: stretch; }
  .compare-btn { flex: 1; }
}

@media (max-width: 480px) {
  .container { padding: 0 .75rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-content { grid-template-columns: 1fr; text-align: center; }
  .city-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== INFO TOOLTIPS ===== */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;  /* kosketuskohde ≥24px (WCAG 2.5.8) */
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--text-light);
  background: transparent;
  color: var(--text-light);
  font-size: .6875rem;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin-left: .375rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: border-color .15s, color .15s, background .15s;
}
.info-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(13,148,136,.06); }

.info-bubble {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #162126;
  color: #fff;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  font-weight: 400;
  font-style: normal;
  font-family: var(--font);
  line-height: 1.5;
  width: max-content;
  max-width: 280px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  pointer-events: none;
}
.info-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #162126;
}
.info-btn.active .info-bubble { display: block; }
/* Portal-tila: kupla siirretään JS:llä bodyyn fixed-koordinaatein, jotta se ei jää
   sidebarin overflow-leikkauksen alle vaan piirtyy kaiken päälle. */
.info-bubble.info-bubble-portal { display: block; position: fixed; bottom: auto; left: 0; top: 0; transform: none; z-index: 10000; }
.info-bubble.ib-below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #162126; }
