/* SAV OBD-Finder — Frontend Styles
   Stil orientiert sich an alarmanlage.de CI (rot/dunkelgrau, helle Karten). */

:root {
  --sof-red:        #e30613;
  --sof-red-dark:   #b5040f;
  --sof-dark:       #222;
  --sof-bg:         #f6f6f6;
  --sof-border:     #ebebeb;
  --sof-text:       #333;
  --sof-muted:      #888;
  --sof-radius:     8px;
}

#sof-app {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--sof-text);
  line-height: 1.5;
  max-width: 1100px;
  margin: 0 auto;
}

.sof-embed-body {
  margin: 0;
  padding: 12px;
  background: #fff;
}
.sof-embed-body #sof-app {
  max-width: none;
}

/* Visuell verstecktes Heading für Screenreader/SEO (Embed-Mode). */
.sof-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --- Header --- */
.sof-header { padding: 16px 20px 8px; border-bottom: 2px solid var(--sof-red); margin-bottom: 16px; }
.sof-title { margin: 0 0 4px; font-size: 1.4rem; font-weight: 700; color: var(--sof-dark); }
.sof-subtitle { margin: 0; color: var(--sof-muted); font-size: 14px; }

/* --- Suche --- */
.sof-search-wrap { position: relative; padding: 0 20px; }
.sof-search { display: flex; gap: 8px; flex-wrap: wrap; }
.sof-search input,
.sof-search select,
.sof-input,
.sof-select {
  flex: 1 1 200px;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid var(--sof-border);
  border-radius: 6px;
  background: #fff;
}
.sof-search input { flex: 2 1 280px; }
.sof-search input:focus,
.sof-search select:focus,
.sof-input:focus,
.sof-select:focus {
  outline: 2px solid var(--sof-red);
  outline-offset: 1px;
  border-color: var(--sof-red);
}

.sof-identifier-panel {
  margin-top: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fbfbfb 0%, #f6f6f6 100%);
  border: 1px solid var(--sof-border);
  border-radius: 10px;
}
.sof-identifier-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  margin-bottom: 10px;
}
.sof-identifier-copy strong {
  color: var(--sof-dark);
  font-size: 14px;
}
.sof-identifier-copy span {
  color: var(--sof-muted);
  font-size: 13px;
}
.sof-identifier-grid {
  display: grid;
  grid-template-columns: minmax(90px, 120px) minmax(140px, 1fr) auto;
  gap: 8px;
}
.sof-ident-search {
  border: 1px solid var(--sof-red);
  background: var(--sof-red);
  color: #fff;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.sof-ident-search:hover {
  background: var(--sof-red-dark);
  border-color: var(--sof-red-dark);
}
.sof-identifier-help {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--sof-muted);
}
.sof-identifier-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sof-ident-tag {
  border: 1px solid var(--sof-border);
  background: #fff;
  color: var(--sof-dark);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.sof-ident-tag:hover {
  border-color: var(--sof-red);
  color: var(--sof-red);
}

.sof-suggest {
  position: absolute;
  left: 20px; right: 20px; top: 100%;
  background: #fff;
  border: 1px solid var(--sof-border);
  border-radius: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  max-height: 360px;
  overflow-y: auto;
}
.sof-suggest-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--sof-border);
  align-items: start;
}
.sof-suggest-item:last-child { border-bottom: none; }
.sof-suggest-item:hover { background: rgba(227,6,19,0.05); }
.sof-suggest-item--info {
  cursor: default;
}
.sof-suggest-item--info:hover {
  background: #fff;
}
.sof-suggest-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sof-suggest-brand { font-weight: 700; color: var(--sof-dark); }
.sof-suggest-model { color: var(--sof-text); }
.sof-suggest-meta {
  font-size: 11px;
  color: var(--sof-muted);
  line-height: 1.45;
}
.sof-suggest-cat {
  font-size: 11px;
  color: var(--sof-muted);
  text-align: right;
}
.sof-suggest-none { padding: 14px; color: var(--sof-muted); text-align: center; }
.sof-suggest-none--rich {
  display: grid;
  gap: 10px;
  text-align: left;
}
.sof-suggest-empty-title {
  color: var(--sof-dark);
  font-size: 14px;
}
.sof-suggest-empty-copy {
  color: var(--sof-muted);
  font-size: 12px;
  line-height: 1.55;
}
.sof-suggest-actions,
.sof-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sof-suggest-actions a,
.sof-empty-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--sof-border);
  background: #fff;
  color: var(--sof-red);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.sof-suggest-actions a:hover,
.sof-empty-actions a:hover {
  border-color: var(--sof-red);
}

.sof-search-help,
.sof-search-status {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.55;
}
.sof-search-help { color: var(--sof-muted); }
.sof-search-status { color: #555; }
.sof-search-status.is-success { color: #1e7e34; }
.sof-search-status.is-warning { color: #9a6700; }
.sof-search-status.is-error { color: var(--sof-red-dark); }

.sof-placeholder { padding: 28px 20px; color: var(--sof-muted); text-align: center; font-size: 14px; }
.sof-placeholder-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
.sof-placeholder-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--sof-border);
  color: var(--sof-red);
  text-decoration: none;
  font-weight: 600;
}
.sof-placeholder-actions a:hover { border-color: var(--sof-red); }

/* --- Detail --- */
.sof-detail-card {
  padding: 20px;
  background: #fff;
  border-radius: var(--sof-radius);
}
.sof-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.sof-detail-title {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sof-dark);
}
.sof-brand { color: var(--sof-red); }
.sof-detail-meta { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sof-pill {
  background: var(--sof-bg);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sof-dark);
  font-weight: 600;
}
.sof-meta-year { color: var(--sof-muted); font-size: 13px; }
.sof-back {
  border: none;
  background: var(--sof-bg);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--sof-dark);
}
.sof-back:hover { background: var(--sof-red); color: #fff; }

.sof-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --- Cockpit-Bild mit Hotspot --- */
.sof-svg-wrap {
  background: #fff;
  border-radius: var(--sof-radius);
  padding: 0;
  border: 1px solid var(--sof-border);
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
  overflow: hidden;
}
.sof-svg-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;
  background: #fff;
}
.sof-svg-inner svg,
.sof-svg-inner .sof-cockpit-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}
.sof-hotspot {
  position: absolute;
  width: 0; height: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.sof-hotspot-dot {
  position: absolute;
  left: 0; top: 0;
  transform: translate(-50%, -50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--sof-red);
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px var(--sof-red), 0 3px 12px rgba(227,6,19,0.5);
  z-index: 2;
}
.sof-hotspot-pulse {
  position: absolute;
  left: 0; top: 0;
  transform: translate(-50%, -50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--sof-red);
  opacity: 0.6;
  animation: sof-pulse 1.8s ease-out infinite;
  z-index: 1;
}
@keyframes sof-pulse {
  0%   { transform: translate(-50%,-50%) scale(1);   opacity: 0.7; }
  100% { transform: translate(-50%,-50%) scale(3.5); opacity: 0;   }
}

/* --- Detail-Text --- */
.sof-detail-text { padding: 4px 0; }
.sof-pos-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--sof-red);
  font-weight: 700;
}
.sof-pos-detail { margin: 0 0 10px; font-size: 14px; }
.sof-instr      { margin: 0 0 10px; font-size: 14px; color: var(--sof-muted); }
.sof-typical-step {
  background: rgba(227,6,19,0.06);
  border-left: 3px solid var(--sof-red);
  padding: 10px 12px;
  border-radius: 4px;
  margin: 12px 0;
  font-size: 14px;
}
.sof-connector {
  font-size: 13px;
  padding: 8px 0;
  border-top: 1px solid var(--sof-border);
  margin-top: 14px;
}
.sof-confidence { font-size: 12px; margin: 8px 0; display: flex; align-items: center; gap: 6px; }
.sof-quality-note {
  margin: 0 0 10px;
  color: #555;
  font-size: 13px;
  line-height: 1.55;
}
.sof-conf-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.sof-detail-quality {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--sof-border);
  font-size: 12px;
  color: #666;
}
.sof-detail-quality strong { color: #333; }
.sof-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.sof-btn-secondary,
.sof-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}
.sof-btn-primary {
  background: var(--sof-red);
  color: #fff;
}
.sof-btn-primary:hover { background: var(--sof-red-dark); }
.sof-btn-secondary {
  border: 1px solid var(--sof-border);
  background: #fff;
  color: var(--sof-dark);
}
.sof-btn-secondary:hover {
  border-color: var(--sof-red);
  color: var(--sof-red);
}
.sof-correction-btn {
  margin-top: 14px;
  background: transparent;
  border: 1px solid var(--sof-border);
  color: var(--sof-dark);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.sof-correction-btn:hover { border-color: var(--sof-red); color: var(--sof-red); }
.sof-source-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--sof-red);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.sof-source-link:hover { text-decoration: underline; }

/* --- Related --- */
.sof-related { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--sof-border); }
.sof-related h5 { margin: 0 0 10px; font-size: 13px; color: var(--sof-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.sof-related-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.sof-related-item {
  background: var(--sof-bg);
  border: 1px solid var(--sof-border);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--sof-dark);
}
.sof-related-item:hover { background: var(--sof-red); color: #fff; border-color: var(--sof-red); }

/* --- Footer --- */
.sof-footer {
  text-align: center;
  padding: 12px;
  color: var(--sof-muted);
  font-size: 12px;
  border-top: 1px solid var(--sof-border);
  margin-top: 16px;
}
.sof-footer a { color: var(--sof-red); text-decoration: none; }

/* --- HUB-Mode --- */
.sof-hub-header { padding: 16px 20px; border-bottom: 2px solid var(--sof-red); margin-bottom: 16px; }
.sof-identifier-panel--hub {
  margin: 0 20px 16px;
}
.sof-hub-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 0 20px 16px;
}
@media (max-width: 700px) {
  .sof-hub-controls { grid-template-columns: 1fr 1fr; }
  .sof-identifier-grid { grid-template-columns: 1fr 1fr; }
  .sof-ident-search { grid-column: 1 / -1; }
}
.sof-hub-help {
  padding: 0 20px 10px;
  color: #555;
  font-size: 13px;
  line-height: 1.55;
}
.sof-hub-stats { padding: 0 20px 8px; color: var(--sof-muted); font-size: 13px; }
.sof-hub-table {
  width: calc(100% - 40px);
  margin: 0 20px;
  border-collapse: collapse;
  font-size: 13px;
}
.sof-hub-table th {
  background: var(--sof-dark);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}
.sof-hub-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--sof-border);
}
.sof-hub-row { cursor: pointer; }
.sof-hub-row:hover td { background: rgba(227,6,19,0.04); }
.sof-hub-row-meta {
  margin-top: 4px;
  color: #777;
  font-size: 12px;
  line-height: 1.45;
}
.sof-hub-pager { padding: 16px 20px; display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--sof-muted); font-size: 13px; }
.sof-hub-pager button {
  background: var(--sof-bg);
  border: 1px solid var(--sof-border);
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
}
.sof-hub-pager button:hover { background: var(--sof-red); color: #fff; border-color: var(--sof-red); }

/* --- Loading / Empty / Error --- */
.sof-loading, .sof-empty, .sof-error {
  padding: 28px;
  text-align: center;
  color: var(--sof-muted);
  font-size: 14px;
}
.sof-error { color: var(--sof-red-dark); }
.sof-empty-hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
}
.sof-empty-hint-wrap {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

/* --- Modal (Korrektur-Formular) --- */
.sof-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.sof-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}
.sof-modal h3 { margin: 0 0 12px; }
.sof-modal-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 32px; height: 32px;
  border: none;
  background: var(--sof-bg);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}
.sof-corr-form label { display: block; margin: 12px 0; font-size: 13px; }
.sof-corr-form select, .sof-corr-form input, .sof-corr-form textarea {
  display: block; width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border: 1px solid var(--sof-border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}
.sof-modal-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.sof-btn-primary {
  background: var(--sof-red);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.sof-btn-primary:hover { background: var(--sof-red-dark); }
.sof-corr-msg { padding: 8px 0; font-size: 13px; }

/* --- Attribution (Embed-Footer) --- */
.sof-attribution {
  text-align: center;
  font-size: 11px;
  color: var(--sof-muted);
  padding: 8px;
  margin-top: 12px;
}
.sof-attribution a { color: var(--sof-red); text-decoration: none; }

/* === SEO Detail/Brand Page: Logo neben H1 === */
.sof-seo-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 12px 0 18px;
  flex-wrap: wrap;
}
.sof-seo-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  padding: 8px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255,0.98), rgba(246,247,250,0.95) 58%, rgba(232,235,241,0.98) 100%);
  border: 1px solid #e8ebf0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 10px 22px rgba(19, 28, 38, 0.08);
  flex-shrink: 0;
}
.sof-seo-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.sof-seo-title-row .sof-seo-h1 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
@media (max-width: 640px) {
  .sof-seo-logo-badge {
    width: 72px;
    height: 72px;
    padding: 6px;
    border-radius: 22px;
  }
}
.sof-seo-wrap { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.sof-seo-breadcrumb { font-size: 13px; margin: 8px 0 16px; color: #888; }
.sof-seo-breadcrumb ol { list-style: none; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.sof-seo-breadcrumb li::after { content: '›'; margin-left: 6px; color: #ccc; }
.sof-seo-breadcrumb li:last-child::after { content: ''; }
.sof-seo-h1 { font-size: 1.6rem; color: #222; line-height: 1.3; }
.sof-seo-lead { font-size: 15px; line-height: 1.6; }
.sof-seo-finder { margin: 24px 0; }
.sof-seo-section { margin: 28px 0; }
.sof-seo-steps ol { padding-left: 24px; }
.sof-seo-steps li { margin: 8px 0; line-height: 1.5; }
.sof-seo-connector { background: #f6f6f6; border-left: 3px solid #e30613; padding: 12px 16px; border-radius: 4px; margin: 16px 0; }
.sof-seo-faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.sof-seo-faq details { border-bottom: 1px solid #ebebeb; }
.sof-seo-faq details[open] summary { color: #e30613; }
.sof-seo-related { margin-top: 32px; }
.sof-seo-related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.sof-seo-related li a { display: block; padding: 8px 12px; background: #f6f6f6; border-radius: 4px; color: #222; text-decoration: none; font-size: 13px; }
.sof-seo-related li a:hover { background: #e30613; color: #fff; }
.sof-seo-muted {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}
.sof-seo-variant-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}
.sof-seo-variant-list li a {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  color: #333;
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sof-seo-variant-list li a:hover,
.sof-seo-variant-list li a:focus-visible {
  border-color: var(--sof-red);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(227,6,19,0.08);
  outline: none;
}
.sof-vl-year,
.sof-vl-chassis,
.sof-vl-pos {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
}
.sof-vl-year {
  background: rgba(227,6,19,0.08);
  color: var(--sof-red-dark);
  font-weight: 700;
}
.sof-vl-name {
  font-weight: 700;
  color: #222;
  font-size: 15px;
}
.sof-vl-chassis {
  background: #f2f4f7;
  color: #555;
}
.sof-vl-pos {
  background: #f6f6f6;
  color: #555;
}
.sof-seo-model-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.sof-seo-model-list li a { display: flex; flex-direction: column; padding: 12px 14px; background: #f6f6f6; border-radius: 6px; color: #222; text-decoration: none; transition: background .15s; }
.sof-seo-model-list li a:hover { background: #e30613; color: #fff; }
.sof-ml-name { font-weight: 600; }
.sof-ml-meta { font-size: 12px; color: #888; }
.sof-seo-model-list li a:hover .sof-ml-meta { color: rgba(255,255,255,0.8); }
.sof-seo-confidence { margin-top: 32px; padding: 12px 16px; background: #f6f6f6; border-radius: 4px; font-size: 13px; color: #555; }
.sof-tool-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 0 24px;
}
.sof-tool-nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #ebebeb;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  text-decoration: none;
  color: #333;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sof-tool-nav-item strong { color: #222; }
.sof-tool-nav-item span {
  color: #666;
  font-size: 13px;
  line-height: 1.45;
}
.sof-tool-nav-item:hover,
.sof-tool-nav-item:focus-visible {
  border-color: var(--sof-red);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(227,6,19,0.08);
  outline: none;
}
.sof-tool-nav-item.is-current {
  border-color: var(--sof-red);
  background: linear-gradient(180deg, #fff7f8 0%, #fff 100%);
}
.sof-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 22px 0 28px;
}
.sof-fact-card {
  padding: 16px;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.sof-fact-label {
  display: block;
  margin-bottom: 6px;
  color: #777;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sof-fact-value {
  display: block;
  color: #222;
  font-size: 1.12rem;
  line-height: 1.25;
}
.sof-fact-note {
  display: block;
  margin-top: 6px;
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}
.sof-link-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.sof-link-card {
  display: block;
  padding: 16px;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  background: #fff;
  color: #333;
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sof-link-card strong {
  display: block;
  margin-bottom: 6px;
  color: #222;
}
.sof-link-card span {
  display: block;
  color: #666;
  font-size: 13px;
  line-height: 1.55;
}
.sof-link-card:hover,
.sof-link-card:focus-visible {
  border-color: var(--sof-red);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(227,6,19,0.08);
  outline: none;
}
.sof-identifier-guide,
.sof-scope-playbook,
.sof-related-model-cards,
.sof-category-brand-cards,
.sof-variant-family-links {
  margin-top: 28px;
}
.sof-identifier-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.sof-identifier-guide-card {
  padding: 16px;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}
.sof-identifier-guide-title {
  display: block;
  margin-bottom: 8px;
  color: #222;
  font-size: 15px;
}
.sof-identifier-guide-card p {
  margin: 0 0 8px;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}
.sof-identifier-guide-note,
.sof-identifier-guide-source {
  font-size: 13px !important;
}
.sof-scope-playbook {
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #ebebeb;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}
.sof-scope-checklist {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #444;
}
.sof-scope-checklist li {
  margin: 8px 0;
  line-height: 1.55;
}
.sof-seo-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sof-seo-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f6f6f6;
  color: #444;
  font-size: 13px;
  line-height: 1.4;
}
.sof-seo-quality {
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 20px;
}
.sof-seo-quality-note {
  margin: 18px 0 0;
  color: #555;
  line-height: 1.6;
}
.sof-offer-bridge {
  padding: 22px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7f8 0%, #fff 100%);
  border: 1px solid rgba(227, 6, 19, 0.18);
}
.sof-offer-bridge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.sof-primary-cta,
.sof-secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
.sof-primary-cta {
  background: var(--sof-red);
  color: #fff;
}
.sof-primary-cta:hover { background: var(--sof-red-dark); }
.sof-secondary-cta {
  border: 1px solid rgba(227, 6, 19, 0.2);
  background: #fff;
  color: #333;
}
.sof-secondary-cta:hover {
  border-color: var(--sof-red);
  color: var(--sof-red);
}
.sof-plugin-context .g-breadcrumbs,
.sof-plugin-context .yoast-breadcrumb,
.sof-plugin-context .l-titlebar .g-breadcrumbs,
.sof-plugin-context .l-titlebar .w-breadcrumbs {
  display: none !important;
}
.sof-plugin-context .l-titlebar { padding-bottom: 12px; }
.sof-plugin-context .l-titlebar h1,
.sof-plugin-context .l-titlebar .page-title { font-size: 1.75rem; }
.sof-tool-page .l-titlebar,
.sof-plugin-context .am-breadcrumbs,
.sof-plugin-context .rank-math-breadcrumb,
.sof-plugin-context .alcWidget,
.sof-plugin-context .cbWidget,
.sof-plugin-context #ufw_1,
.sof-plugin-context .ush_btn_1,
.sof-plugin-context .ush_text_1,
.sof-plugin-context .ush_text_2 {
  display: none !important;
}
.sof-tool-page #page-content {
  padding-top: 12px;
}
.sof-tool-page .l-section.height_medium > .l-section-h {
  max-width: 1180px;
}
.sof-tool-page .sof-finder-page-head,
.sof-tool-page .sof-hub-page-head,
.sof-tool-page .sof-dd-page-head {
  margin-top: 8px;
}


/* === Hub: Marken-Grid oben === */
.sof-hub-brands { margin: 20px 0 32px; }
.sof-hub-brands-title { font-size: 1.2rem; margin: 0 0 16px; padding-left: 20px; border-left: 4px solid var(--sof-red); padding-bottom: 4px; }

/* === v1.6 — UX/Page-Head-Styles für Landing, Hub, Drill-Down === */
.sof-finder-page-head,
.sof-hub-page-head,
.sof-dd-page-head {
  margin: 24px 0 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--sof-red);
}
.sof-finder-h1,
.sof-hub-h1,
.sof-dd-page-h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #222;
  line-height: 1.25;
}
.sof-finder-intro,
.sof-hub-intro,
.sof-dd-page-intro {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  max-width: 780px;
}

.sof-noscript {
  background: #fff7e6;
  border: 1px solid #ffd66e;
  padding: 14px 18px;
  border-radius: 6px;
  margin: 16px 0;
  font-size: 14px;
}
.sof-noscript a { color: #e30613; font-weight: 600; }

/* === v1.6 — Hub-Filter-Tabelle auf Mobile → Card-Layout === */
@media (max-width: 700px) {
  .sof-finder-h1,
  .sof-hub-h1,
  .sof-dd-page-h1 { font-size: 1.4rem; }
  .sof-finder-intro,
  .sof-hub-intro,
  .sof-dd-page-intro { font-size: 14px; }

  /* Hub-Table → Cards */
  .sof-hub-table { display: block; }
  .sof-hub-table thead { display: none; }
  .sof-hub-table tbody { display: block; }
  .sof-hub-row { display: block !important; padding: 12px !important; margin-bottom: 12px; border: 1px solid var(--sof-border); border-radius: 6px; background: #fff; }
  .sof-hub-row td { display: flex !important; padding: 4px 0 !important; border: none !important; gap: 8px; font-size: 13px; }
  .sof-hub-row td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--sof-muted);
    min-width: 90px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
  }

  /* Detail-Page-Bild auf Mobile kleiner */
  .sof-svg-wrap { max-width: 100%; }
  .sof-hotspot-dot,
  .sof-hotspot-pulse { width: 22px; height: 22px; }

  .sof-suggest-item {
    grid-template-columns: 1fr;
  }
  .sof-suggest-cat {
    text-align: left;
  }
  .sof-detail-actions,
  .sof-offer-bridge-actions,
  .sof-placeholder-actions,
  .sof-suggest-actions,
  .sof-empty-actions {
    flex-direction: column;
  }
  .sof-btn-primary,
  .sof-btn-secondary,
  .sof-primary-cta,
  .sof-secondary-cta,
  .sof-placeholder-actions a,
  .sof-suggest-actions a,
  .sof-empty-actions a {
    width: 100%;
  }
}

/* === v1.6 — Print-friendly: Detail-Karte auf 100% wenn gedruckt === */
@media print {
  .sof-search-wrap,
  .sof-hub-brands,
  .sof-back,
  .sof-correction-btn,
  .sof-related { display: none !important; }
  .sof-detail-card { box-shadow: none !important; border: 1px solid #999 !important; }
  body { background: #fff !important; }
}

/* === v1.6 — Drill-Down-Page-Head === */
.sof-dd-page-head + .sof-drilldown {
  margin-top: 0;
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* === v1.6 — Hub Brand-Grid wird "compact" wenn viele Marken (>50) === */
.sof-brand-grid { gap: 12px; }
.sof-brand-card { padding: 14px 12px; }
@media (max-width: 600px) {
  .sof-brand-grid { grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)) !important; gap: 8px; }
  .sof-brand-card { padding: 8px; }
  .sof-brand-logo,
  .sof-brand-logo-img { width: 60px !important; height: 60px !important; }
  .sof-brand-logo { width: 54px !important; height: 54px !important; }
  .sof-brand-name { font-size: 12px !important; }
  .sof-brand-count { font-size: 10px !important; }
}

/* === v1.6 — SEO-Page Detail: bessere Section-Abstände === */
.sof-seo-page .sof-seo-wrap > section,
.sof-seo-page .sof-seo-wrap > div.sof-seo-block {
  margin: 32px 0;
}
.sof-seo-page h2 {
  font-size: 1.3rem;
  margin: 24px 0 12px;
  color: #222;
  border-left: 4px solid var(--sof-red);
  padding-left: 12px;
  line-height: 1.3;
}
.sof-seo-page h3 {
  font-size: 1.05rem;
  margin: 18px 0 8px;
  color: #444;
}

/* === v1.6 — Video-Tutorial-Embed (extrahiert aus inline-style) === */
.sof-seo-video { margin: 32px 0; }
.sof-seo-video-wrap {
  position: relative;
  padding-bottom: 56.25%;  /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  margin: 12px 0;
  background: #000;
}
.sof-seo-video-iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
.sof-seo-video-meta {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
  line-height: 1.5;
}

/* === v1.6 — Admin-Preview-Banner === */
.sof-preview-banner {
  background: #e30613;
  color: #fff;
  padding: 8px 16px;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
}
.sof-preview-banner strong { font-weight: 700; }

/* === v1.6 — Impreza-Theme-Integration: Plugin-Content innerhalb l-section === */
.l-main.sof-seo-page > .l-section > .l-section-h > .sof-seo-wrap {
  max-width: 980px;
  margin: 0 auto;
}

/* === v1.7 — Internal Linking Footer + 404-Actions === */
.sof-seo-also,
.sof-seo-404-actions {
  margin: 36px 0 24px;
  padding: 20px 24px;
  background: #f6f6f6;
  border-radius: 8px;
  border-left: 4px solid #e30613;
}
.sof-seo-also h2,
.sof-seo-404-actions h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  color: #222;
}
.sof-seo-also-list,
.sof-seo-404-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.sof-seo-also-list li a,
.sof-seo-404-list li a {
  display: block;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sof-seo-also-list li a:hover,
.sof-seo-404-list li a:hover {
  border-color: #e30613;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(227,6,19,0.08);
}
.sof-seo-also-list strong,
.sof-seo-404-list strong { color: #e30613; }

/* Kategorie-Shortcuts auf der Marken-Index-Root-Seite (/obd-stecker/) */
.sof-seo-cat-shortcuts {
  margin: 24px 0 32px;
  padding: 20px 24px;
  background: #f9f9f9;
  border-radius: 8px;
}
.sof-seo-cat-shortcuts h2 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #222;
}
.sof-seo-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.sof-seo-cat-list li a {
  display: block;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sof-seo-cat-list li a:hover {
  border-color: #e30613;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(227,6,19,0.08);
}
.sof-seo-cat-list strong { display: block; color: #e30613; margin-bottom: 2px; }
.sof-cat-meta { font-size: 12px; color: #888; }
.sof-seo-brands-heading { margin: 32px 0 12px; }

/* Non-OBD-Banner (v1.7.6) — gut sichtbarer Hinweis wenn Variant
 * keinen Standard-OBD-2-Stecker hat. Roter Border, Icon links,
 * direkt unter dem Breadcrumb, vor dem H1. */
.sof-seo-alert {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 16px 0 24px;
  padding: 18px 22px;
  border-radius: 8px;
  background: #fff7f5;
  border: 2px solid #e30613;
  border-left-width: 6px;
  box-shadow: 0 2px 6px rgba(227, 6, 19, 0.08);
}
.sof-seo-alert.sof-alert-info {
  background: #f0f7ff;
  border-color: #0d6efd;
}
.sof-seo-alert .sof-alert-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
  color: #e30613;
}
.sof-seo-alert.sof-alert-info .sof-alert-icon {
  color: #0d6efd;
}
.sof-seo-alert .sof-alert-body {
  flex: 1;
  min-width: 0;
}
.sof-seo-alert .sof-alert-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  color: #e30613;
  line-height: 1.3;
}
.sof-seo-alert.sof-alert-info .sof-alert-title {
  color: #0d6efd;
}
.sof-seo-alert .sof-alert-text {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
}
.sof-seo-alert .sof-alert-cta {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(227, 6, 19, 0.15);
  font-size: 14px;
  color: #444;
}
.sof-seo-alert.sof-alert-info .sof-alert-cta {
  border-top-color: rgba(13, 110, 253, 0.15);
}
.sof-seo-alert .sof-alert-cta a {
  color: #e30613;
  font-weight: 600;
  text-decoration: none;
}
.sof-seo-alert.sof-alert-info .sof-alert-cta a {
  color: #0d6efd;
}
.sof-seo-alert .sof-alert-cta a:hover {
  text-decoration: underline;
}
@media (max-width: 600px) {
  .sof-seo-alert {
    padding: 14px 16px;
    gap: 12px;
  }
  .sof-seo-alert .sof-alert-icon {
    font-size: 24px;
  }
  .sof-seo-alert .sof-alert-title {
    font-size: 17px;
  }
}

/* Adapter-Intro / FAQ-Title — extrahiert aus Inline-Styles (v1.7.2) */
.sof-adapter-intro {
  margin: 0 0 8px;
  color: #555;
  font-size: 13px;
}
.sof-faq-title {
  margin: 0 0 8px;
  font-size: 22px;
  color: #222;
  font-weight: 700;
}
