/* Nautik-Rechner (js/nautik.js) – Farben über die Variablen der Seite, passt im Dunkelmodus */

.nk-rechner { margin: 1.6em 0; padding: 18px; border: 1px solid var(--linie); border-radius: 16px; background: var(--flaeche); }
.nkr-raster { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 22px; align-items: start; }
.nkr-rechts { display: grid; gap: 14px; min-width: 0; }

.nkr-formular { display: grid; gap: 12px; margin: 0; }
.nkr-gruppe, .nkr-wahl { margin: 0; padding: 10px 12px 12px; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche-2); min-width: 0; }
.nkr-gruppe legend, .nkr-wahl legend { padding: 0 6px; font-weight: 650; font-size: 15px; }
.nkr-gruppe[hidden] { display: none; }
.nkr-gruppe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.nkr-feld { display: grid; gap: 3px; min-width: 0; }
.nkr-feld label { font-size: 14px; color: var(--text-2); }
.nkr-eingabe { display: flex; align-items: center; gap: 6px; }
.nkr-eingabe input {
    width: 100%; min-width: 0; padding: 8px 10px; font: inherit; font-size: 16px; color: var(--text);
    background: var(--flaeche); border: 1px solid var(--linie); border-radius: 9px;
}
.nkr-eingabe input:focus { outline: 2px solid var(--lagune); outline-offset: 1px; }
.nkr-eingabe input[aria-invalid="true"] { border-color: #D62828; background: color-mix(in srgb, #D62828 8%, var(--flaeche)); }
.nkr-einheit { flex: 0 0 auto; width: 2.2em; font-size: 14px; color: var(--text-2); }
.nkr-wahl label { display: inline-flex; align-items: center; gap: 6px; margin: 4px 14px 0 0; font-size: 15px; cursor: pointer; }
.nkr-wahl input { width: 18px; height: 18px; accent-color: var(--lagune); }

.nkr-werte { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 10px; font-size: 15.5px; }
.nkr-werte dt { color: var(--text-2); }
.nkr-werte dd { margin: 0; font-variant-numeric: tabular-nums; }
.nkr-warn { color: #D62828; font-weight: 650; }
.nkr-gut { color: #2A9D4F; font-weight: 650; }
.nkr-hinweis { margin: 6px 0; padding: 8px 12px; border-radius: 10px; background: var(--flaeche-2); font-size: 15px; }
.nkr-warnung { background: color-mix(in srgb, #D62828 12%, var(--flaeche)); border-left: 4px solid #D62828; }
.nkr-ok { background: color-mix(in srgb, #2A9D4F 12%, var(--flaeche)); border-left: 4px solid #2A9D4F; }
.nkr-fehler { color: #D62828; }

/* Zeichnung */
.nkr-bild { min-width: 0; }
.nkr-plot { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; }
.nkr-schirm { fill: var(--flaeche-2); stroke: var(--linie); stroke-width: 1.5; }
.nkr-ring { fill: none; stroke: var(--text-2); stroke-opacity: .35; stroke-width: 1; }
.nkr-strahl { stroke: var(--text-2); stroke-opacity: .18; stroke-width: 1; }
.nkr-nord { fill: var(--text-2); font-size: 14px; font-weight: 700; text-anchor: middle; }
.nkr-klein { fill: var(--text-2); font-size: 14px; }
.nkr-rechtsb { text-anchor: end; }
.nkr-beschr { fill: var(--text); font-size: 15px; font-weight: 600; paint-order: stroke; stroke: var(--flaeche-2); stroke-width: 3px; stroke-linejoin: round; }
.nkr-sicher { fill: color-mix(in srgb, var(--sonne) 10%, transparent); stroke: var(--sonne); stroke-width: 1.8; stroke-dasharray: 6 4; }
.nkr-tangente { stroke: var(--sonne); stroke-width: 1.4; stroke-dasharray: 3 4; }
.nkr-relbahn { stroke: var(--lagune); stroke-width: 2.4; }
.nkr-gestrichelt { stroke-dasharray: 7 5; }
.nkr-cpa-linie { stroke: var(--text-2); stroke-width: 1.2; stroke-dasharray: 2 3; }
.nkr-cpa { fill: var(--lagune); stroke: var(--flaeche); stroke-width: 1.5; }
.nkr-vek-ziel { stroke: var(--sonne); stroke-width: 2.6; }
.nkr-vek-rel { stroke: var(--lagune); stroke-width: 2.6; }
.nkr-vek-eigen { stroke: var(--text); stroke-width: 2.6; }
.nkr-spitze-ziel { fill: var(--sonne); }
.nkr-spitze-rel { fill: var(--lagune); }
.nkr-spitze-eigen { fill: var(--text); }
.nkr-hilfskreis { fill: none; stroke: var(--text-2); stroke-opacity: .55; stroke-width: 1; stroke-dasharray: 2 3; }
.nkr-schiff-eigen { fill: var(--text); stroke: var(--flaeche); stroke-width: 1; }
.nkr-schiff-ziel { fill: var(--sonne); stroke: var(--flaeche); stroke-width: 1; }

.nkr-legende { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--text-2); }
.nkr-legende li { display: inline-flex; align-items: center; gap: 6px; }
.nkr-farbe { display: inline-block; width: 20px; height: 0; border-top: 3px solid; }
.nkr-farbe.nkr-eigen { border-color: var(--text); }
.nkr-farbe.nkr-ziel { border-color: var(--sonne); }
.nkr-farbe.nkr-rel { border-color: var(--lagune); }
.nkr-farbe.nkr-kreis { border-top-style: dashed; border-color: var(--sonne); }
.nkr-farbe.nkr-tang { border-top-style: dotted; border-color: var(--sonne); }

@media (max-width: 860px) {
    .nkr-raster { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
    .nk-rechner { padding: 12px; }
    .nkr-werte { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
    .nkr-werte dd { margin-bottom: 6px; }
}
