/* Sensorfinder — Seitenstile, gescoped unter .ln-sensorfinder.
Entstanden als eigenständige Seite (ehem. altipard.github.io); seit
2026-08-26 in base.html integriert. Die lokalen Variablen der Seite
werden hier auf die Uferlicht-Tokens gemappt — die *-soft-Töne haben
(noch) kein Token-Gegenstück und bleiben Literale. Alles Weitere ist
der unveränderte Seitenstil, per CSS-Nesting unter dem Scope: die
Element-Selektoren (h1, h2, footer …) dürfen nicht in Nav und
Seitenfuß der umgebenden Seite lecken. */
.ln-sensorfinder {
  --bg: var(--ln-surface);
  --surface: var(--ln-card);
  --ink: var(--ln-ink);
  --muted: var(--ln-ink-muted);
  --line: var(--ln-line);
  --accent: var(--ln-primary);
  --accent-ink: var(--ln-primary-deep);
  --accent-soft: #e2ebe6;
  --ok: var(--ln-ok);
  --ok-soft: #e6efdf;
  --code-bg: #eee9dc;
  --s-oxy: var(--ln-series-oxygen);
  --s-oxy-soft: #e6efdf;
  --s-temp: var(--ln-series-temp);
  --s-temp-soft: #f8e7e1;
  --s-level: var(--ln-series-level);
  --s-level-soft: #e2edf2;
  --radius: var(--ln-radius);
  --radius-sm: var(--ln-radius-sm);
  --shadow: var(--ln-shadow);
  --shadow-raised: var(--ln-shadow-raised);

  /* stand vorher auf body: die Seite ist bewusst einen Hauch größer
  gesetzt als der App-Grundtext */
  font-size: 16.5px;
  line-height: 1.55;

  img {
    max-width: 100%
  }

  .wrap {
    max-width: 1060px;
    margin: 0 auto;
    /* horizontal 0: den Seitenrand stellt schon main.container aus base */
    padding: 0 0 72px
  }

  header.hero {
    padding: 44px 0 8px
  }

  .eyebrow {
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: .55em;
    margin-bottom: 14px;
  }

  .eyebrow::before {
    content: "";
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent)
  }

  h1 {
    font-weight: 800;
    font-size: clamp(1.9rem, 4.5vw, 2.8rem);
    line-height: 1.08;
    letter-spacing: -.02em;
    margin: 0 0 14px;
    text-wrap: balance;
  }

  .lede {
    max-width: 62ch;
    color: var(--muted);
    font-size: 1.08rem;
    margin: 0 0 8px
  }

  .lede strong {
    color: var(--ink)
  }

  .lede a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none
  }

  .lede a:hover {
    text-decoration: underline
  }

  h2 {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -.01em;
    margin: 0 0 6px;
    text-wrap: balance;
  }

  .sec {
    margin-top: 44px
  }

  .sec,
  .sec>h2[id] {
    scroll-margin-top: calc(var(--toolbar-h, 200px) + 16px)
  }

  .sec>p.sub {
    color: var(--muted);
    margin: 0 0 18px;
    max-width: 70ch
  }

  /* Szenarien */
  .scenarios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 16px
  }

  .scenario {
    text-align: left;
    font: inherit;
    cursor: pointer;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: border-color .15s, transform .15s;
  }

  .scenario:hover {
    border-color: var(--accent);
    transform: translateY(-1px)
  }

  .scenario:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
  }

  .scenario .q {
    font-weight: 700;
    display: block;
    margin-bottom: 2px
  }

  .scenario .a {
    font-size: .85rem;
    color: var(--muted)
  }

  /* Filterleiste */
  .toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg);
    padding: 14px 0 12px;
    margin-top: 34px;
    border-bottom: 1px solid var(--line);
  }

  .search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px
  }

  .search input {
    flex: 1;
    min-width: 220px;
    font: inherit;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
  }

  .search input::placeholder {
    color: var(--muted)
  }

  .search input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px
  }

  .seg {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    padding: 3px;
    gap: 2px;
  }

  .seg-btn {
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    padding: 5px 14px;
    background: transparent;
    color: var(--muted);
    transition: background .12s, color .12s;
  }

  .seg-btn[aria-pressed="true"] {
    background: var(--accent);
    color: var(--surface)
  }

  .seg-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
  }

  .seg-hint {
    font-size: .85rem;
    color: var(--muted);
    flex-basis: 100%;
    margin-top: 2px
  }

  .seg-hint a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap
  }

  .seg-hint a:hover {
    text-decoration: underline
  }

  .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
  }

  .chip {
    font: inherit;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    padding: 5px 14px;
    transition: background .12s, border-color .12s, color .12s;
  }

  .chip:hover {
    border-color: var(--accent)
  }

  .chip[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--surface)
  }

  .chip:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
  }

  .chip.reset {
    border-style: dashed;
    color: var(--muted);
    font-weight: 400
  }

  .count {
    font-size: .88rem;
    color: var(--muted);
    margin-top: 10px
  }

  /* Kombi-Tipp */
  .combo {
    display: none;
    margin-top: 12px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: .95rem;
  }

  .combo.show {
    display: block
  }

  .combo b {
    color: var(--accent-ink)
  }

  /* Karten */
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 22px
  }

  .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 18px 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .kind {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .kind.base {
    color: var(--accent)
  }

  .code {
    font-family: "Geist Mono", ui-monospace, monospace;
    font-weight: 600;
    font-size: .85rem;
    background: var(--code-bg);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    display: inline-block;
    color: var(--accent-ink);
  }

  .card h3 {
    font-weight: 700;
    font-size: 1.08rem;
    margin: 2px 0 0;
    line-height: 1.25
  }

  .card p.desc {
    margin: 0;
    font-size: .95rem;
    color: var(--muted)
  }

  .badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px
  }

  .badge {
    font-size: .8rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 2.5px 11px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    border: 1px solid transparent;
  }

  .badge.m-o2 {
    background: var(--s-oxy-soft);
    color: var(--s-oxy)
  }

  .badge.m-temp {
    background: var(--s-temp-soft);
    color: var(--s-temp)
  }

  .badge.m-level {
    background: var(--s-level-soft);
    color: var(--s-level)
  }

  .badge.inkl {
    background: transparent;
    border: 1px dashed currentColor
  }

  .badge.inkl:not(.m-o2):not(.m-temp):not(.m-level) {
    color: var(--ok)
  }

  .badge.hit {
    box-shadow: 0 0 0 2px var(--accent)
  }

  .specs {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    margin-top: auto;
    display: grid;
    gap: 4px;
    font-size: .88rem;
  }

  .specs div {
    display: flex;
    gap: 8px
  }

  .specs dt {
    color: var(--muted);
    min-width: 88px;
    flex-shrink: 0;
    font-weight: 600
  }

  .specs dd {
    margin: 0
  }

  .note {
    font-size: .83rem;
    color: var(--muted);
    border-left: 3px solid var(--accent);
    padding: 2px 0 2px 10px;
  }

  /* Callout */
  .callout {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--ok);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 26px;
    box-shadow: var(--shadow);
  }

  .callout h2 {
    font-size: 1.08rem;
    margin-bottom: 4px
  }

  .callout p {
    margin: 0;
    font-size: .97rem;
    color: var(--muted);
    max-width: 75ch
  }

  .callout p strong {
    color: var(--ink)
  }

  /* Namenscode */
  .decoder {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
    margin-top: 16px
  }

  .dec {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
  }

  .dec .code {
    margin-bottom: 6px
  }

  .dec p {
    margin: 6px 0 0;
    font-size: .92rem;
    color: var(--muted)
  }

  .dec p b {
    color: var(--ink)
  }

  /* Funkweg-Vergleich */
  .versus {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 14px;
    margin-top: 18px
  }

  .vs {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 11px;
  }

  .vs-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
  }

  .vs-head .tag {
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted)
  }

  .vs p.claim {
    margin: 0;
    font-size: .95rem;
    color: var(--muted)
  }

  .vs p.claim b {
    color: var(--ink)
  }

  .vs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
    font-size: .9rem;
    color: var(--muted)
  }

  .vs li {
    position: relative;
    padding-left: 27px
  }

  .vs li::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1;
    background: var(--ok-soft);
    color: var(--ok);
  }

  .vs li.con::before {
    content: "\2013";
    background: var(--s-temp-soft);
    color: var(--s-temp)
  }

  .vs li b {
    color: var(--ink)
  }

  /* Vergleichstabelle */
  .tablewrap {
    overflow-x: auto;
    margin-top: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  table.cmp {
    border-collapse: collapse;
    width: 100%;
    min-width: 560px;
    font-size: .9rem
  }

  table.cmp th,
  table.cmp td {
    text-align: left;
    padding: 11px 15px;
    border-bottom: 1px solid var(--line);
    vertical-align: top
  }

  table.cmp thead th {
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap
  }

  table.cmp tbody th {
    font-weight: 600;
    color: var(--muted);
    width: 1%;
    white-space: nowrap
  }

  table.cmp tbody td small {
    display: block;
    color: var(--muted);
    font-size: .84rem;
    margin-top: 3px;
    line-height: 1.4
  }

  table.cmp tbody tr:last-child th,
  table.cmp tbody tr:last-child td {
    border-bottom: 0
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap
  }

  /* Sprungmarken */
  .jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .jump .jump-label {
    font-weight: 600;
    font-size: .74rem;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: 4px;
  }

  .jump a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--accent-soft);
    color: var(--accent-ink);
    border-radius: 999px;
    padding: 6px 15px;
    transition: background .12s, color .12s;
  }

  .jump a::before {
    content: "\2193";
    font-size: .85em;
    opacity: .6
  }

  .jump a:hover {
    background: var(--accent);
    color: var(--surface)
  }

  .jump a:hover::before {
    opacity: 1
  }

  .jump a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
  }

  .totop {
    display: inline-block;
    margin-top: 14px;
    font-weight: 600
  }

  /* Callout-Varianten */
  .callout.tip {
    border-left-color: var(--accent)
  }

  .callout ul {
    margin: 8px 0 0;
    padding-left: 1.15em;
    font-size: .94rem;
    color: var(--muted)
  }

  .callout li {
    margin: 4px 0
  }

  .callout li strong {
    color: var(--ink)
  }

  /* CTA zu limnonetz.de */
  .cta {
    margin-top: 52px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 26px 28px;
    box-shadow: var(--shadow-raised);
    display: flex;
    flex-wrap: wrap;
    gap: 18px 32px;
    align-items: center;
    justify-content: space-between;
  }

  .cta h2 {
    margin-bottom: 6px
  }

  .cta p {
    margin: 0;
    color: var(--muted);
    max-width: 58ch
  }

  .cta p strong {
    color: var(--ink)
  }

  .cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0
  }

  .btn-solid,
  .btn-ghost {
    font: inherit;
    font-weight: 650;
    text-decoration: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }

  .btn-solid {
    background: var(--accent);
    color: var(--surface);
    border: 1px solid var(--accent)
  }

  .btn-solid:hover {
    background: var(--accent-ink);
    border-color: var(--accent-ink)
  }

  .btn-ghost {
    background: transparent;
    color: var(--accent-ink);
    border: 1px solid var(--accent)
  }

  .btn-ghost:hover {
    background: var(--surface)
  }

  .btn-solid:focus-visible,
  .btn-ghost:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
  }

  footer {
    margin-top: 56px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    font-size: .87rem;
    color: var(--muted);
  }

  footer a {
    color: var(--accent);
    text-decoration: none
  }

  footer a:hover {
    text-decoration: underline
  }

  @media (prefers-reduced-motion: reduce) {

    .scenario,
    .chip,
    .jump a {
      transition: none
    }

    .scenario:hover {
      transform: none
    }
  }

  /* djlint H021: fruehere Inline-Styles der beiden Stellen */
  .sec-tight {
    margin-top: 18px
  }

  .sub-spaced {
    margin-top: 18px
  }
}
