/* Speedtest polarhub.de/speedtest/ (ergänzt /shared/polar.css) */
[hidden] { display: none !important; }
.hero { padding-bottom: 24px; }
.reihe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.reihe.mitte { justify-content: center; }
.klein { font-size: .88rem; margin-top: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.klein { margin: 0; padding: 6px 12px; font-size: .9rem; }
.btn.gross { min-width: 180px; padding: 14px 32px; border-radius: 999px; font-size: 1.2rem; }

/* Tacho: der Bogen füllt sich mit der Geschwindigkeit (Länge setzt speedtest.js über stroke-dasharray) */
.messung { text-align: center; }
.tacho { display: block; width: min(100%, 380px); margin: 0 auto; }
.tacho path { fill: none; stroke-width: 14; stroke-linecap: round; }
.tacho .bahn { stroke: var(--line); }
.tacho .wert { stroke: var(--accent); transition: stroke-dasharray .25s linear; }
.tacho.hoch .wert { stroke: var(--ok); }
.tacho text { text-anchor: middle; fill: var(--text); }
.tacho .zahl { font-size: 46px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tacho .phase, .tacho .einheit { font-size: 12px; font-weight: 600; fill: var(--muted); }
.tacho .phase { letter-spacing: .08em; text-transform: uppercase; }
.tacho #skala text { font-size: 9px; fill: var(--muted); dominant-baseline: middle; }

/* Kennzahlen */
.werte { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 16px; }
.werte .value { font-variant-numeric: tabular-nums; }
.werte small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.werte .tile { transition: border-color .15s ease; }
.werte .tile.aktiv { border-color: var(--accent); box-shadow: var(--shadow); }
.urteil { margin-top: 16px; }

/* Verlauf */
.liste { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-variant-numeric: tabular-nums; }
.liste th, .liste td { padding: 10px 16px; text-align: right; }
.liste th:first-child, .liste td:first-child { text-align: left; }
.liste th { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.liste tr + tr td { border-top: 1px solid var(--line); }
@media (max-width: 520px) { .liste th, .liste td { padding: 8px 8px; font-size: .9rem; } }

/* Einstellungen (aufklappbar) */
.opt { margin-top: 16px; padding: 0; }
.opt summary { display: flex; align-items: center; gap: 10px; padding: 16px 24px; cursor: pointer; list-style: none; }
.opt summary::-webkit-details-marker { display: none; }
.opt summary .ic { width: 1.5rem; height: 1.5rem; }
.opt summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.opt[open] summary::after { content: "▴"; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 16px; align-items: end; padding: 4px 24px 24px; }
.felder label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.felder select, .felder input[type=text], #filter { width: 100%; padding: 10px 12px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.felder label.haken { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 44px; font-weight: 500; color: var(--text); }
.felder .haken input { width: 18px; height: 18px; accent-color: var(--accent); }
.felder .haken small { flex-basis: 100%; padding-left: 26px; color: var(--muted); font-size: .82rem; }
.felder .breit { grid-column: 1 / -1; }
.felder p.klein { margin-top: 0; }

/* Verlauf: Zeile mit Gerät und Standort unter dem Datum, Auswahl des Geräts neben der Überschrift */
.kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
#filter { width: auto; max-width: 100%; background: var(--surface); }
.liste td:first-child span { display: block; font-weight: 600; }
.liste td small { display: block; color: var(--muted); font-size: .82rem; font-variant-numeric: normal; overflow-wrap: anywhere; }
.liste td:last-child, .liste th:last-child { width: 1%; padding-left: 0; }
.liste .weg { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.liste .weg:hover { background: var(--accent-soft); color: var(--err); }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 520px) {   /* Handy: Datum, Gerät und Standort über die ganze Breite, die Werte in einer Zeile darunter */
    .liste, .liste thead, .liste tbody { display: block; }
    .liste tr { display: grid; grid-template-columns: 1fr 1fr 1fr 38px; align-items: center; }
    .liste th, .liste td { text-align: left; }
    .liste th:first-child, .liste td:first-child { grid-column: 1 / -1; padding-bottom: 0; }
    .liste tr + tr td { border-top: 0; }
    .liste tbody tr + tr { border-top: 1px solid var(--line); }
    .liste td:last-child, .liste th:last-child { width: auto; }
}

/* Notiz unter dem Start-Knopf, Prozent vom Tarif in den Kacheln */
.notizfeld { margin-top: 14px; }
.notizfeld input { width: min(100%, 420px); padding: 9px 12px; font: inherit; font-size: .92rem; text-align: center; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.tarifwert { margin-top: 2px; min-height: 1.2em; font-size: .82rem; color: var(--muted); }
.liste td small + small, .liste td:nth-child(4) small { white-space: nowrap; }

/* Verlaufs-Diagramm. Linienfarben mit dem Palettenprüfer getestet (hell auf Weiß, dunkel eigene Töne); Upload zusätzlich gestrichelt mit eckigen Punkten. */
.dia { --dia-d: #0b5fd0; --dia-u: #1a7f37; position: relative; margin: 0 0 16px; padding: 16px 16px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
@media (prefers-color-scheme: dark) { .dia { --dia-d: #4a8fef; --dia-u: #39ad4b; } }
.dia figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-bottom: 8px; font-size: .88rem; }
.dia .legende { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.dia figcaption .muted { margin-left: auto; font-size: .82rem; }
.dia svg { display: block; overflow: visible; }
.dia .reihe { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dia .runter { stroke: var(--dia-d); } .dia .rauf { stroke: var(--dia-u); }
.dia .reihe.rauf { stroke-dasharray: 6 4; }
.dia .punkt { stroke: var(--surface); stroke-width: 2; }
.dia .punkt.runter { fill: var(--dia-d); } .dia .punkt.rauf { fill: var(--dia-u); }
.dia .gitter { stroke: var(--line); stroke-width: 1; }
.dia .tarif { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 4; }
.dia .achse { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.dia .lot { stroke: var(--muted); stroke-width: 1; visibility: hidden; }
.dia .lot.an { visibility: visible; }
.dia .flaeche { fill: transparent; cursor: crosshair; outline-offset: 2px; }
.tipp { position: absolute; top: 46px; z-index: 5; display: grid; gap: 1px; padding: 8px 12px; pointer-events: none; white-space: nowrap; font-size: .85rem; font-variant-numeric: tabular-nums;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.tipp small { color: var(--muted); }
