/* ── Werkstoffkundelabor — Zugversuch ────────────────────────────── */

/* ─── Hinweis: Pilot-spezifische Chart/Marker-Palette ───
   Diese Datei enthält bewusst Literal-Farbwerte für drei semantische Paletten,
   die nicht zum Brand-Token-System gehören:

   - Compare-chips (Model / Real / Upload Data):
     Teal   rgb(13, 148, 136) / rgba(20, 184, 166, …)
     Orange rgb(234, 88, 12) / rgba(249, 115, 22, …)
     Violet rgb(139, 92, 246) / rgb(109, 40, 217) / rgba(139, 92, 246, …) / #8b5cf6

   - m5-Kennwert-Marker (Ag/Rm/Rp02/ReH): Violet #8b5cf6 für Ag, die anderen
     nutzen --warning-600-rgb / --signals-successcolor-rgb als kennwert-color.

   - m3-Probe-Card-Akzente: Teal #0d9488, Orange #c2410c.

   - Dark-shade Hover-Aliases:
     #059669 (emerald-600, darker than --signals-successcolor #10b981)
     #b45309 (amber-700, darker than --warning-600 #d97706)

   Diese Werte sind didaktisch gewählt (semantische Zuordnung zu Daten-Quellen
   und Kennwerten im Zugversuch-E-Learning) und werden bei künftigen Refactors
   NICHT durch generische Brand-Tokens ersetzt.
   (STYLE_GUIDE §4.6 Ausnahme-Regel, Phase 3d-3)
*/

/* Versuchsstand-Tab: zentriertes Bild mit Beschriftung */
.tensile-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl);
}
.tensile-stage__image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 18px rgba(var(--primary-rgb), 0.15);
    background: var(--surface-bg);
}
.tensile-stage__placeholder {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16 / 9;
    border: 2px dashed var(--surface-border);
    border-radius: var(--radius-lg);
    color: var(--textcolor-50contrast);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}
.tensile-stage__caption {
    max-width: 720px;
    text-align: center;
    color: var(--textcolor-80contrast);
}
.tensile-stage__caption h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

/* Versuch-Tab: Sidebar + Charts */
.tensile-versuch-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    grid-template-rows: 1fr;
    gap: var(--spacing-xl);
    align-items: stretch;
}
.tensile-versuch-grid__sidebar,
.tensile-versuch-grid__charts {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    height: 100%;
    min-height: 0;
}
.tensile-versuch-grid__charts {
    min-width: 0;
}
/* Sidebar: letzte Karte füllt den verbliebenen Spaltenraum */
.tensile-versuch-grid__sidebar > .fmu-card:last-child {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
/* Charts-Spalte: beide Diagramm-Karten teilen sich den Raum zu gleichen Teilen */
.tensile-versuch-grid__charts > .tensile-chart-card {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
@media (max-width: 1024px) {
    .tensile-versuch-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .tensile-versuch-grid__sidebar,
    .tensile-versuch-grid__charts {
        height: auto;
    }
    .tensile-versuch-grid__sidebar > .fmu-card:last-child,
    .tensile-versuch-grid__charts  > .tensile-chart-card {
        flex: 0 0 auto;
    }
}

/* Eingabefelder */
.tensile-input-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}
.tensile-input {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}
.tensile-input__label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--textcolor-80contrast);
}
.tensile-input__field {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: var(--neutrals-0);
    color: var(--textcolor-fullcontrast);
    font-size: 0.95rem;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.tensile-input__field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}
.tensile-input__field:disabled {
    background: var(--surface-bg);
    color: var(--textcolor-50contrast);
    cursor: not-allowed;
}

.tensile-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

/* Status-Zeile */
.tensile-status {
    margin-top: var(--spacing-sm);
    font-size: 0.85rem;
    min-height: 1.2em;
    color: var(--textcolor-50contrast);
}
.tensile-status--running { color: var(--primary-color); font-weight: 500; }
.tensile-status--done    { color: var(--signals-successcolor); font-weight: 500; }
.tensile-status--error   { color: var(--accent-color); font-weight: 500; }

/* Kennwerte-Karte — wächst über `:last-child`-Regel oben, hier nur die
   Innenstruktur (Grid + Save-Button am unteren Rand). */
.tensile-kennwerte__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    flex-shrink: 0;
}
.tensile-kennwerte > .fmu-card__title {
    flex-shrink: 0;
}
/* Speichern-Button an den unteren Rand der Karte schieben. */
.tensile-eval__bottom-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}
.tensile-kennwerte > #tensileSaveBtn {
    width: 100%;
    padding-bottom: var(--spacing-md);
}
.tensile-kennwerte__item {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}
.tensile-kennwerte__label {
    font-size: 0.75rem;
    color: var(--textcolor-50contrast);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tensile-kennwerte__value {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

/* Charts */
.tensile-chart-card .fmu-card__title {
    margin-bottom: var(--spacing-md);
    flex-shrink: 0;
}
/* Italic-Mathefont (KaTeX_Math) hat negativen Side-Bearing — ohne Padding
   kollidiert z. B. das L in Δ<i>L</i> mit dem Δ bzw. das F mit „über". */
.tensile-chart-card .fmu-card__title i {
    padding: 0 0.12em;
}
.tensile-chart-box {
    position: relative;
    width: 100%;
    height: 280px;
}
/* Im Versuch-Tab wachsen die Chart-Boxen gleichmäßig mit den Karten,
   damit beide Diagramme dieselbe Höhe haben. */
.tensile-versuch-grid__charts > .tensile-chart-card .tensile-chart-box {
    flex: 1 1 auto;
    height: auto;
    min-height: 260px;
}

/* Vergleichs-Tab: Chart oben, Tabelle darunter */
.tensile-compare-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}
.tensile-compare-chart-wrapper {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 520px;
    background: var(--neutrals-0);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border-light);
    padding: var(--spacing-lg);
}
.tensile-compare-table-wrapper {
    background: var(--neutrals-0);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border-light);
    padding: var(--spacing-md);
}
.tensile-compare-table-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--textcolor-80contrast);
    margin: 0 0 var(--spacing-sm) 0;
    padding: 0 var(--spacing-xs);
}
.tensile-compare-table-scroll {
    overflow-x: auto;
}
.tensile-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.tensile-compare-table th,
.tensile-compare-table td {
    padding: 8px 12px;
    text-align: right;
    border-bottom: 1px solid var(--surface-border-light);
    border-right: 1px solid var(--surface-border-light);
    white-space: nowrap;
}
.tensile-compare-table th:last-child,
.tensile-compare-table td:last-child { border-right: none; }
.tensile-compare-table tbody tr:last-child td { border-bottom: none; }
.tensile-compare-table tbody tr:nth-child(even) td { background: rgba(0,0,0,0.015); }
.tensile-compare-table tbody tr:hover td { background: var(--surface-hover); }
.tensile-compare-table th:first-child,
.tensile-compare-table td:first-child { padding-left: 6px; padding-right: 6px; width: 20px; text-align: center; }
.tensile-compare-table th:nth-child(2),
.tensile-compare-table td:nth-child(2),
.tensile-compare-table th:nth-child(3),
.tensile-compare-table td:nth-child(3) { text-align: left; }
.tensile-compare-table thead th {
    color: var(--textcolor-80contrast);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--surface-bg);
    border-bottom: 2px solid var(--surface-border);
}
.tensile-compare-table td.tensile-compare-table__color {
    padding: 8px 6px;
}
.tensile-compare-table__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
}
.tensile-compare-table__dim {
    color: var(--textcolor-50contrast);
}
.tensile-compare-table-empty {
    color: var(--textcolor-50contrast);
    font-size: 0.8rem;
    text-align: center;
    padding: var(--spacing-lg);
    margin: 0;
}
@media (max-width: 1100px) {
    .tensile-compare-chart-wrapper { height: 420px; }
}

/* Series chips für Vergleich (lehnt sich an .fmu-viz-series-bar) */
#tensileCompareBar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}
.fmu-viz-series-chip {
    --chip-color: var(--primary-color);
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-xl);
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    color: var(--textcolor-80contrast);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 150ms ease;
}
.fmu-viz-series-chip:hover {
    border-color: var(--chip-color);
}
.fmu-viz-series-chip--active {
    background: var(--neutrals-0);
    border-color: var(--chip-color);
    color: var(--textcolor-fullcontrast);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.fmu-viz-series-chip__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--chip-color);
}

/* Icon-Button für Tabellen-Aktionen */
.fmu-icon-btn {
    background: transparent;
    border: none;
    color: var(--textcolor-50contrast);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 120ms ease, color 120ms ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.fmu-icon-btn:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-color);
}
.fmu-icon-btn[data-action="delete"]:hover {
    color: var(--accent-color);
}
.tensile-row-actions {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: flex-end;
}

/* ── Anleitung-Tab (E-Learning) ───────────────────────────────────── */
/* Container vom Lab-Introduction übernimmt sich die Hauptarbeit; hier
   nur ein paar Ergänzungen für die tensile-eigenen Elemente. */
#tensileElearning {
    max-width: 880px;       /* angenehme Lesebreite */
}
#tensileElearning .tnsel-nav-row {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}
#tensileElearning .tnsel-nav-row > .elearn-btn:only-child {
    margin-left: auto;
}

/* Zentrierter „Weiter zu Modul X"-Button am Ende jedes Moduls
   (Pattern wie im lab_introduction E-Learning). */
#tensileElearning .tnsel-next-module {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--surface-border-light);
}
#tensileElearning .tnsel-next-module .elearn-btn-success {
    background: var(--signals-successcolor);
    color: var(--neutrals-0);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    /* no equivalent token yet */
    box-shadow: 0 2px 6px rgba(var(--signals-successcolor-rgb), 0.25);
    transition: all 150ms ease;
}
#tensileElearning .tnsel-next-module .elearn-btn-success:hover {
    /* no equivalent token yet */
    background: #059669;
    transform: translateY(-1px);
    /* no equivalent token yet */
    box-shadow: 0 4px 10px rgba(var(--signals-successcolor-rgb), 0.3);
}

/* Kompaktere Step-Phase-Abstände — lab_introduction.css hat .stat-phase
   mit großzügigem margin/padding/border-top, das für die mehrschrittigen
   Anleitungen hier zu luftig wirkt. */
#tensileElearning .stat-phase {
    margin-top: var(--spacing-lg);
    padding-top: 0;
    border-top: none;
}
/* Karten innerhalb einer Phase enger stapeln */
#tensileElearning .elearning-module .elearn-card {
    margin-bottom: var(--spacing-md);
}
/* Schritt-Label direkt über der ersten Karte einer Phase */
#tensileElearning .elearning-module .stat-phase > p:first-child {
    margin-bottom: var(--spacing-xs);
}
#tensileElearning .tnsel-assign {
    padding: 0.4rem 0.75rem;
    border: 2px solid var(--surface-border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    width: 100%;
    max-width: 360px;
    background: var(--neutrals-0);
    color: var(--textcolor-fullcontrast);
    transition: border-color 120ms ease;
}
#tensileElearning .tnsel-assign:focus {
    outline: none;
    border-color: var(--primary-color);
}
#tensileElearning .formula-example {
    font-size: 1.05rem;
}
#tensileElearning .elearn-btn-success {
    background: var(--signals-successcolor);
    color: var(--neutrals-0);
    border: none;
}
#tensileElearning .elearn-btn-success:hover {
    /* no equivalent token yet */
    background: #059669;
}

/* ── Modul 4: Interaktive Phasengrafik (matplotlib) ─────────────── */
#tensileElearning .m4-material-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: var(--surface-bg);
    border-radius: var(--radius-md);
}
#tensileElearning .m4-material-picker .m4-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--textcolor-80contrast);
    margin-right: var(--spacing-sm);
}
#tensileElearning .m4-mat-btn {
    padding: 0.4rem 0.9rem;
    border: 1.5px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: var(--neutrals-0);
    color: var(--textcolor-80contrast);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
}
#tensileElearning .m4-mat-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
#tensileElearning .m4-mat-btn--active {
    background: var(--primary-color);
    color: var(--neutrals-0);
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.25);
}

/* Figur-Wrapper — Overlay liegt genau über dem matplotlib-Bild */
#tensileElearning .m4-figure .m4-figure-wrap {
    position: relative;
    display: block;
    width: 100%;
    line-height: 0;
}
#tensileElearning .m4-image {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--surface-border-light);
    border-radius: var(--radius-md);
    background: var(--neutrals-0);
    transition: opacity 200ms ease;
}
#tensileElearning .m4-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* no equivalent token yet */
    background: rgba(var(--neutrals-0-rgb), 0.85);
    color: var(--textcolor-50contrast);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    z-index: 2;
}
#tensileElearning .m4-phase-zones {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}
#tensileElearning .m4-phase-zone {
    position: absolute;
    pointer-events: auto;
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
#tensileElearning .m4-phase-zone:hover,
#tensileElearning .m4-phase-zone--hover {
    background: rgba(var(--primary-rgb), 0.12);
    border-color: rgba(var(--primary-rgb), 0.4);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.15);
}
#tensileElearning .m4-phase-zone:focus-visible {
    outline: none;
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary-color);
}

/* ── Modul 5: Interaktive Kennwerte-Marker ─────────────────────── */
#tensileElearning .m5-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    min-width: 18px;
    min-height: 18px;
    padding: 0;
    background: var(--neutrals-0);
    border: 2px solid var(--primary-color);
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
#tensileElearning .m5-marker::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--marker-color, var(--primary-color));
    transition: transform 160ms ease;
}
#tensileElearning .m5-marker__label {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: var(--neutrals-0);
    border: 1px solid var(--marker-color, var(--primary-color));
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--marker-color, var(--primary-color));
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* Hover-Skalierung nur auf den inneren Punkt anwenden — so skaliert
   das Label nicht mit und Rahmen/Text bleiben bündig. */
#tensileElearning .m5-marker:hover,
#tensileElearning .m5-marker:focus-visible {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    outline: none;
}
#tensileElearning .m5-marker:hover::before,
#tensileElearning .m5-marker:focus-visible::before {
    transform: scale(1.5);
}
#tensileElearning .m5-marker:hover .m5-marker__label,
#tensileElearning .m5-marker:focus-visible .m5-marker__label {
    display: block;
}
/* Farbzuweisung pro Kennwert-Marker — identisch mit matplotlib-Diagramm
   und den Konstruktionslinien im Versuchsstand. */
#tensileElearning .m5-marker--rp02   { --marker-color: var(--warning-600); border-color: var(--warning-600); } /* Amber — Rp0,2/ReH */
#tensileElearning .m5-marker--rm     { --marker-color: var(--signals-successcolor); border-color: var(--signals-successcolor); } /* Grün — Rm */
/* purple accent — no equivalent token yet */
#tensileElearning .m5-marker--ag     { --marker-color: #8b5cf6; border-color: #8b5cf6; } /* Violett — Ag */
#tensileElearning .m5-marker--abreak { --marker-color: var(--primary-light); border-color: var(--primary-light); } /* Blau — A */

/* Unsichtbarer Click-Hotspot für den E-Modul — liegt über der matplotlib
   „E ≈ X GPa"-Label-Box, damit der Text lesbar bleibt. Auf Hover färbt
   sich der Bereich leicht rot und zeigt so die Klickbarkeit an. */
#tensileElearning .m5-marker-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 38px;
    padding: 0;
    background: transparent;
    border: 2px dashed transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
    pointer-events: auto;
}
#tensileElearning .m5-marker-hotspot--emod:hover,
#tensileElearning .m5-marker-hotspot--emod:focus-visible {
    /* no equivalent token yet */
    background: rgba(var(--accent-rgb), 0.10);
    /* no equivalent token yet */
    border-color: rgba(var(--accent-rgb), 0.55);
    outline: none;
}

/* Kennwert-Cards in passenden Farben — analog zu den Phase-Cards in M4 */
#tensileElearning .m5-kennwert-card {
    transition: box-shadow 250ms ease, border-color 250ms ease, background 250ms ease, transform 250ms ease;
}
#tensileElearning .m5-kennwert-card[data-kennwert-key="emod"] {
    --kennwert-color: 220, 38, 38;       /* Rot — Hooksche Gerade / E */
}
#tensileElearning .m5-kennwert-card[data-kennwert-key="rp02"] {
    --kennwert-color: var(--warning-600-rgb);       /* Amber — Rp0,2 / ReH / 0,2%-Versatz */
}
#tensileElearning .m5-kennwert-card[data-kennwert-key="rm"] {
    --kennwert-color: var(--signals-successcolor-rgb);      /* Grün — Rm */
}
#tensileElearning .m5-kennwert-card[data-kennwert-key="ag"] {
    --kennwert-color: 139, 92, 246;      /* Violett — Ag */
}
#tensileElearning .m5-kennwert-card[data-kennwert-key="abreak"] {
    --kennwert-color: 59, 130, 246;      /* Blau — Bruchdehnung A */
}

/* Override the blueprint-elearning ::before so the left stripe matches
   the kennwert color (not the default primary-blue gradient). */
#tensileElearning .m5-kennwert-card::before {
    background: rgb(var(--kennwert-color));
}
#tensileElearning .m5-kennwert-card h4 {
    color: rgb(var(--kennwert-color, var(--primary-rgb)));
}
#tensileElearning .m5-kennwert-card--highlight {
    box-shadow: 0 0 0 3px rgba(var(--kennwert-color), 0.35),
                0 6px 18px rgba(var(--kennwert-color), 0.22);
    transform: translateY(-1px);
}

/* Phasen-Cards in den passenden Diagramm-Farben tönen. Jede Phase trägt
   eine eigene CSS-Variable --phase-color (R,G,B), die für Border, Background
   und Highlight-Zustand wiederverwendet wird. */
#tensileElearning .m4-phase-card {
    transition: box-shadow 250ms ease, border-color 250ms ease, background 250ms ease, transform 250ms ease;
}
#tensileElearning .m4-phase-card[data-phase-key="elastisch"] {
    --phase-color: 59, 130, 246;   /* blau */
}
#tensileElearning .m4-phase-card[data-phase-key="plastisch"] {
    --phase-color: var(--signals-successcolor-rgb);   /* grün */
}
#tensileElearning .m4-phase-card[data-phase-key="necking"] {
    --phase-color: var(--warning-600-rgb);    /* amber */
}
#tensileElearning .m4-phase-card[data-phase-key="bruch"] {
    --phase-color: 220, 38, 38;    /* rot */
}

/* Override the blueprint-elearning ::before so the left stripe matches
   the phase color (not the default primary-blue gradient). */
#tensileElearning .m4-phase-card::before {
    background: rgb(var(--phase-color));
}
#tensileElearning .m4-phase-card h4 {
    color: rgb(var(--phase-color, var(--primary-rgb)));
}
/* Hervorhebung nach Klick — verwendet die jeweilige Phasenfarbe */
#tensileElearning .m4-phase-card--highlight {
    box-shadow: 0 0 0 3px rgba(var(--phase-color), 0.35),
                0 6px 18px rgba(var(--phase-color), 0.22);
    transform: translateY(-1px);
}

/* ── Modul 3: Interaktiver Mini-Versuch ─────────────────────────── */
#tensileElearning .m3-probe-card {
    background: var(--slate-50);
    border: 1px solid var(--surface-border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid var(--surface-border);
}
/* no equivalent token yet */
#tensileElearning .m3-probe-card[data-probe="1"] { border-left-color: #0d9488; }
/* no equivalent token yet */
#tensileElearning .m3-probe-card[data-probe="2"] { border-left-color: #c2410c; }
#tensileElearning .m3-probe-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}
/* no equivalent token yet */
#tensileElearning .m3-probe-title[data-probe="1"] { color: #0d9488; }
/* no equivalent token yet */
#tensileElearning .m3-probe-title[data-probe="2"] { color: #c2410c; }
#tensileElearning .m3-hint {
    font-size: 0.85rem;
    color: var(--textcolor-50contrast);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}
#tensileElearning .m3-probe-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: var(--spacing-md);
    align-items: end;
}
@media (max-width: 700px) {
    #tensileElearning .m3-probe-grid {
        grid-template-columns: 1fr;
    }
}
#tensileElearning .m3-probe-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
}
#tensileElearning .m3-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--textcolor-80contrast);
}
#tensileElearning .m3-probe-grid input,
#tensileElearning .m3-probe-grid select {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1.5px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: var(--neutrals-0);
    color: var(--textcolor-fullcontrast);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
#tensileElearning .m3-probe-grid input:focus,
#tensileElearning .m3-probe-grid select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}
#tensileElearning .m3-probe-grid input:disabled,
#tensileElearning .m3-probe-grid select:disabled {
    background: var(--surface-bg);
    color: var(--textcolor-50contrast);
    cursor: not-allowed;
}
#tensileElearning .m3-probe-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}
#tensileElearning .m3-status {
    font-size: 0.85rem;
    color: var(--textcolor-50contrast);
    min-height: 1.2em;
}
#tensileElearning .m3-status--running { color: var(--primary-color); font-weight: 500; }
#tensileElearning .m3-status--done    { color: var(--signals-successcolor); font-weight: 600; }
#tensileElearning .m3-status--error   { color: var(--accent-color); font-weight: 500; }

#tensileElearning .m3-chart-box {
    background: var(--neutrals-0);
    border: 1px solid var(--surface-border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
#tensileElearning .m3-chart-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}
#tensileElearning .m3-chart-header h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--textcolor-fullcontrast);
}
#tensileElearning .m3-chart-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--error-100);
    color: var(--error-800);
}
#tensileElearning .m3-chart-badge.m3-chart-badge--normiert {
    background: var(--success-100);
    color: var(--success-800);
}
#tensileElearning .m3-canvas-wrap {
    position: relative;
    width: 100%;
    height: 340px;
}

/* Figuren (inline SVG) */
#tensileElearning .tnsel-figure {
    margin: var(--spacing-xl) auto;
    max-width: 740px;
    text-align: center;
}
#tensileElearning .tnsel-figure svg {
    display: block;
    width: 100%;
    height: auto;
    background: var(--neutrals-0);
    border: 1px solid var(--surface-border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
#tensileElearning .tnsel-figure figcaption {
    font-size: 0.83rem;
    color: var(--textcolor-50contrast);
    margin-top: var(--spacing-sm);
    line-height: 1.55;
    font-style: italic;
    padding: 0 var(--spacing-md);
}

/* ── Realdaten checkbox ── */
.tensile-input--checkbox {
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-sm);
}
.tensile-input__checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}
.tensile-input--checkbox .tensile-input__label {
    margin-bottom: 0;
    cursor: pointer;
}

/* ── Messreihen: Info-Icons (click-to-open popup) ── */
.tensile-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    /* no equivalent token yet */
    background: rgba(var(--neutrals-0-rgb),0.9);
    color: var(--primary-color);
    font-size: 9px;
    font-weight: 700;
    font-style: normal;
    cursor: pointer;
    margin-left: 3px;
    vertical-align: middle;
    /* no equivalent token yet */
    border: 1px solid rgba(var(--neutrals-0-rgb),0.5);
}
.tensile-info-popup {
    position: fixed;
    z-index: 10000;
    background: var(--neutrals-0);
    color: var(--textcolor);
    padding: var(--spacing-md);
    padding-top: calc(var(--spacing-md) + 20px);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.55;
    width: 260px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18), 0 0 0 1px var(--surface-border-light);
    pointer-events: auto;
}
.tensile-info-popup__close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: 50%;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--textcolor-50contrast);
    line-height: 1;
}
.tensile-info-popup__close:hover {
    color: var(--textcolor);
    background: var(--surface-hover);
}

/* ── Vergleich: Chip + Linien-Toggle ── */
.tensile-compare-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}
.tensile-compare-chip-wrap {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    border-radius: 999px;
    border: 1px solid var(--surface-border);
    overflow: hidden;
    background: var(--surface-bg);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.tensile-compare-chip-wrap:has(.fmu-viz-series-chip--active) {
    border-color: var(--chip-color, var(--primary-color));
    box-shadow: 0 0 0 1px var(--chip-color, var(--primary-color));
}
.tensile-compare-chip-wrap .fmu-viz-series-chip {
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 4px 10px 4px 12px;
}
.tensile-compare-chip-source {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0 8px;
    border-left: 1px solid var(--surface-border);
    background: transparent;
    color: var(--textcolor-50contrast);
    white-space: nowrap;
}
.tensile-compare-chip-source--model { color: rgb(13, 148, 136); }
.tensile-compare-chip-source--real  { color: rgb(234, 88, 12); }

.tensile-compare-lines-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    border-left: 1px solid var(--surface-border);
    border-radius: 0;
    padding: 0 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--textcolor-50contrast);
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
    line-height: 1;
}
.tensile-compare-lines-btn:hover:not(:disabled) {
    background: var(--surface-hover);
    color: var(--textcolor-80contrast);
}
.tensile-compare-lines-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.tensile-compare-lines-btn--active {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--chip-color, var(--primary-color));
}
.tensile-compare-lines-btn__icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* ── Evaluation start button (amber/yellow) ── */
.fmu-btn--eval-start {
    background: var(--warning-600);
    color: var(--neutrals-0);
    border-color: var(--warning-600);
}
.fmu-btn--eval-start:hover {
    /* no equivalent token yet */
    background: #b45309;
    /* no equivalent token yet */
    border-color: #b45309;
    /* no equivalent token yet */
    box-shadow: 0 2px 10px rgba(var(--warning-600-rgb), 0.35);
}
.fmu-btn--eval-start:disabled,
.fmu-btn--eval-start:disabled:hover {
    background: var(--slate-200);
    color: var(--slate-400);
    border-color: var(--slate-200);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}

.tensile-eval__choice {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* ── Evaluation panel ── */
.tensile-eval {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}
.tensile-eval__hint {
    font-size: 0.8rem;
    color: var(--textcolor-50contrast);
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
}
.tensile-eval__group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}
.tensile-eval__row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}
.tensile-eval__label {
    font-size: 0.8rem;
    color: var(--textcolor-80contrast);
    white-space: nowrap;
    min-width: 5.5rem;
}
.tensile-eval__input {
    width: 7rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--surface-bg);
    color: var(--textcolor);
}
.tensile-eval__input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.15);
}
.tensile-eval__input--correct {
    border-color: var(--success-600);
    /* no equivalent token yet */
    background: rgba(var(--success-rgb),0.05);
}
.tensile-eval__input--wrong {
    border-color: var(--error-600);
    /* no equivalent token yet */
    background: rgba(var(--error-rgb),0.05);
}
.tensile-eval__result {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 1.2rem;
}
.tensile-eval__result--correct { color: var(--success-600); }
.tensile-eval__result--wrong { color: var(--error-600); }
.tensile-eval__slider-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
}
.tensile-eval__slider-header .tensile-eval__label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;        /* Override .tensile-eval__label nowrap */
    overflow-wrap: break-word;
    line-height: 1.3;
}
.tensile-eval__index {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex: 0 0 auto;
    margin-left: auto;
}
.tensile-eval__value-label {
    font-size: 0.8rem;
    color: var(--textcolor-80contrast);
    white-space: nowrap;
    margin-left: var(--spacing-xs);
}
.tensile-eval__value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--textcolor);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 5rem;
}
.tensile-eval__slider {
    width: 100%;
    cursor: pointer;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 3px;
    outline: none;
    /* Default gradient — JS updates this dynamically */
    background: linear-gradient(to right, var(--primary-color) 50%, var(--surface-border) 50%);
}
.tensile-eval__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid var(--neutrals-0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.tensile-eval__slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid var(--neutrals-0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.tensile-eval__slider::-moz-range-progress {
    background: var(--primary-color);
    border-radius: 3px;
    height: 6px;
}
.tensile-eval__actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}
.tensile-eval__attempts {
    font-size: 0.8rem;
    color: var(--textcolor-50contrast);
}
.tensile-eval__feedback {
    font-size: 0.85rem;
    line-height: 1.4;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}
.tensile-eval__feedback:empty {
    display: none;
}
.tensile-eval__feedback--correct {
    /* no equivalent token yet */
    background: rgba(var(--success-rgb),0.1);
    color: var(--success-600);
    /* no equivalent token yet */
    border: 1px solid rgba(var(--success-rgb),0.3);
}
.tensile-eval__feedback--wrong {
    /* no equivalent token yet */
    background: rgba(var(--error-rgb),0.1);
    color: var(--error-600);
    /* no equivalent token yet */
    border: 1px solid rgba(var(--error-rgb),0.3);
}
.tensile-eval__feedback--hint {
    /* no equivalent token yet */
    background: rgba(var(--warning-rgb),0.1);
    color: var(--warning-600);
    /* no equivalent token yet */
    border: 1px solid rgba(var(--warning-rgb),0.3);
}
.tensile-eval__progress {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--textcolor-50contrast);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tensile-eval__prompt {
    font-size: 0.85rem;
    color: var(--textcolor-80contrast);
    line-height: 1.45;
}
.tensile-eval__step {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}
/* ── Messreihen-Tabelle: vertikale Trennlinien + Zentrierung ── */
#tensileSeriesTable thead th,
#tensileSeriesTable tbody td {
    text-align: center;
    border-right: 1px solid var(--surface-border-light);
}
#tensileSeriesTable thead th:first-child,
#tensileSeriesTable tbody td:first-child {
    text-align: center;
}
#tensileSeriesTable thead th:last-child,
#tensileSeriesTable tbody td:last-child {
    border-right: none;
}

/* ── Datenquellen-Toolbar über beiden Charts ── */
.tensile-source-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--surface-bg);
    border: 1px solid var(--surface-border-light);
    border-radius: var(--radius-md);
    flex: 0 0 auto;
}
.tensile-source-toolbar__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--textcolor-80contrast);
    margin-right: var(--spacing-xs);
}
.tensile-source-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--surface-border);
    background: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--textcolor-50contrast);
    cursor: pointer;
    transition: all 0.15s ease;
}
.tensile-source-chip:hover:not(:disabled) {
    border-color: var(--textcolor-50contrast);
    color: var(--textcolor-80contrast);
}
.tensile-source-chip:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.tensile-source-chip__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}
.tensile-source-chip--active .tensile-source-chip__dot { opacity: 1; }
.tensile-source-chip--model.tensile-source-chip--active {
    /* no equivalent token yet */
    color: rgb(13, 148, 136);
    /* no equivalent token yet */
    background: rgba(20, 184, 166, 0.12);
    /* no equivalent token yet */
    border-color: rgba(20, 184, 166, 0.4);
}
.tensile-source-chip--real.tensile-source-chip--active {
    /* no equivalent token yet */
    color: rgb(234, 88, 12);
    /* no equivalent token yet */
    background: rgba(249, 115, 22, 0.12);
    /* no equivalent token yet */
    border-color: rgba(249, 115, 22, 0.4);
}

/* ── Zoom-Hinweis (in der Datenquellen-Toolbar) ── */
.tensile-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}
.tensile-chart-header .fmu-card__title { margin: 0; }
.tensile-zoom-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    letter-spacing: 0.02em;
    white-space: nowrap;
    animation: tensile-zoom-pulse 2s ease-in-out infinite;
}
.tensile-zoom-badge[hidden] { display: none; }
.tensile-zoom-badge svg { flex-shrink: 0; }
@keyframes tensile-zoom-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.25); }
    50%      { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0); }
}

/* ── Datenquelle-Badge (Messreihen + Vergleich) ── */
.tensile-source-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.tensile-source-badge--model {
    /* no equivalent token yet */
    background: rgba(20, 184, 166, 0.15);
    /* no equivalent token yet */
    color: rgb(13, 148, 136);
    /* no equivalent token yet */
    border: 1px solid rgba(20, 184, 166, 0.3);
}
.tensile-source-badge--real {
    /* no equivalent token yet */
    background: rgba(249, 115, 22, 0.15);
    /* no equivalent token yet */
    color: rgb(234, 88, 12);
    /* no equivalent token yet */
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* ── Auswertungs-Zusammenfassung ── */
.tensile-eval__summary-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px var(--spacing-sm);
    margin: 0 0 var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(var(--primary-rgb), 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
}
.tensile-eval__summary-info dt {
    font-weight: 600;
    color: var(--textcolor-80contrast);
    white-space: nowrap;
}
.tensile-eval__summary-info dd {
    margin: 0;
    color: var(--textcolor);
}
.tensile-eval__summary-table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}
.tensile-eval__summary-table th,
.tensile-eval__summary-table td {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-bottom: 1px solid var(--surface-border-light);
    border-right: 1px solid var(--surface-border-light);
    text-align: center;
}
.tensile-eval__summary-table th:first-child,
.tensile-eval__summary-table td:first-child {
    text-align: left;
}
.tensile-eval__summary-table th:last-child,
.tensile-eval__summary-table td:last-child {
    border-right: none;
}
.tensile-eval__summary-table th {
    color: var(--textcolor-50contrast);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* ── Modus-Tabs in der Probenparameter-Karte ── */
.fmu-card--tabbed {
    padding: 0;
    overflow: hidden;
}
.tensile-mode-tabs {
    display: flex;
    background: var(--surface-bg);
    border-bottom: 1px solid var(--surface-border-light);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.tensile-mode-tab {
    flex: 1 1 0;
    padding: 10px 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--textcolor-50contrast);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    text-align: center;
    white-space: nowrap;
}
.tensile-mode-tab:hover:not(.tensile-mode-tab--active) {
    color: var(--textcolor-80contrast);
}
.tensile-mode-tab--active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.tensile-mode-body {
    padding: var(--spacing-md);
}
.tensile-mode-panel[hidden] { display: none; }

/* ── Upload-Panel: Sektionen ── */
.tensile-upload-panel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}
.tensile-upload-section {
    display: flex;
    flex-direction: column;
}
.tensile-upload-section__title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--textcolor-50contrast);
    margin: 0 0 8px 2px;
}
.tensile-upload-section__body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}
.tensile-upload-section__note {
    margin: 8px 0 0;
    font-size: 0.72rem;
    color: var(--textcolor-50contrast);
    line-height: 1.4;
}
.tensile-upload-section__note code {
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--surface-hover);
    font-size: 0.9em;
}

/* ── Radio-Karten (Datentyp + Probenform) ── */
.tensile-upload-radio-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.tensile-upload-radio {
    display: block;
    cursor: pointer;
    position: relative;
}
.tensile-upload-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.tensile-upload-radio__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 8px;
    border: 1.5px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: var(--neutrals-0);
    text-align: center;
    transition: all 120ms ease;
}
/* purple accent — no equivalent token yet */
.tensile-upload-radio:hover .tensile-upload-radio__card {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.03);
}
/* purple accent — no equivalent token yet */
.tensile-upload-radio input[type="radio"]:checked + .tensile-upload-radio__card {
    border-color: rgb(139, 92, 246);
    background: rgba(139, 92, 246, 0.08);
    box-shadow: 0 0 0 1px rgb(139, 92, 246);
}
/* purple accent — no equivalent token yet */
.tensile-upload-radio input[type="radio"]:focus-visible + .tensile-upload-radio__card {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}
.tensile-upload-radio__title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--textcolor);
}
.tensile-upload-radio__sub {
    font-size: 0.72rem;
    color: var(--textcolor-50contrast);
}

/* ── Probengeometrie-Container ── */
.tensile-upload-geometry {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}
.tensile-upload-geometry[hidden] { display: none; }
.tensile-upload-geometry__inputs {
    display: grid;
    /* Auto-fit: passt sich an Anzahl sichtbarer Felder an (1-3) */
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: var(--spacing-sm);
    align-items: end; /* Input-Felder bündig unten, unabhängig von Label-Höhe */
}
.tensile-upload-geometry__inputs > .tensile-input {
    margin: 0;
    min-width: 0;
}
.tensile-upload-geometry__inputs > .tensile-input[hidden] { display: none; }
/* Labels in der Geometrie-Zeile: einheitliche Höhe, damit Inputs ausgerichtet sind */
.tensile-upload-geometry__inputs .tensile-input__label {
    min-height: 1.6em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
/* purple accent — no equivalent token yet */
.tensile-upload-geometry__auto {
    color: rgb(109, 40, 217);
    font-weight: 600;
    font-size: 0.68rem;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.12);
}

/* ── CSV-Drop-Zone ── */
.tensile-upload-zone {
    padding: var(--spacing-md);
    border: 2px dashed var(--surface-border);
    border-radius: var(--radius-md);
    background: var(--surface-bg);
    color: var(--textcolor-50contrast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}
/* purple accent — no equivalent token yet */
.tensile-upload-zone:hover,
.tensile-upload-zone:focus,
.tensile-upload-zone--dragover {
    outline: none;
    border-color: rgb(139, 92, 246);
    background: rgba(139, 92, 246, 0.06);
    color: rgb(109, 40, 217);
}
.tensile-upload-zone__text {
    margin: 0;
    font-size: 0.82rem;
}
.tensile-upload-zone__hint {
    margin: 0;
    font-size: 0.72rem;
    opacity: 0.75;
}
/* purple accent — no equivalent token yet */
.tensile-upload-zone--has-file {
    border-style: solid;
    border-color: rgb(139, 92, 246);
    background: rgba(139, 92, 246, 0.08);
    color: rgb(109, 40, 217);
}

/* Muster-CSV Links */
.tensile-upload-samples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: var(--spacing-sm);
    font-size: 0.75rem;
}
.tensile-upload-samples__label {
    color: var(--textcolor-50contrast);
    font-weight: 600;
}
.tensile-upload-samples__link {
    appearance: none;
    border: 1px solid var(--surface-border);
    background: transparent;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--textcolor-80contrast);
    cursor: pointer;
    transition: all 120ms ease;
}
/* purple accent — no equivalent token yet */
.tensile-upload-samples__link:hover {
    border-color: rgb(139, 92, 246);
    color: rgb(109, 40, 217);
    background: rgba(139, 92, 246, 0.06);
}

/* Lila Varianten für Upload-Datenquelle */
/* purple accent — no equivalent token yet */
.tensile-source-chip--upload.tensile-source-chip--active {
    color: rgb(109, 40, 217);
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.4);
}
/* purple accent — no equivalent token yet */
.tensile-source-badge--upload {
    background: rgba(139, 92, 246, 0.15);
    color: rgb(109, 40, 217);
    border: 1px solid rgba(139, 92, 246, 0.3);
}
/* purple accent — no equivalent token yet */
.tensile-compare-chip-source--upload { color: rgb(109, 40, 217); }

/* ── Transform-Step (neuer Schritt 1: F-ΔL → σ-ε) ────────────── */

.tensile-eval__transform {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.tensile-eval__transform-intro {
    font-size: 13px;
    line-height: 1.5;
    color: var(--textcolor-50contrast);
    margin: 0 0 var(--spacing-sm) 0;
}

.tensile-eval__transform-block {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
}

.tensile-eval__transform-block-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--textcolor-50contrast);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tensile-eval__transform-formula {
    font-family: 'Source Code Pro', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.7;
    color: var(--textcolor-fullcontrast);
}

.tensile-eval__transform-formula em {
    font-style: italic;
    color: var(--primary-color);
    font-weight: 600;
}

.tensile-eval__transform-formula strong {
    font-weight: 700;
    color: var(--textcolor-fullcontrast);
}

/* ── σ-ε-Card im versteckten Zustand (vor Transform) ─────────── */

.tensile-chart-card.is-hidden {
    display: none;
}

/* ── Slide-In Animation für σ-ε-Card beim Transform ──────────── */

.tensile-chart-card.is-mounting {
    animation: tensileCardSlideIn 400ms ease-out;
}

@keyframes tensileCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Step-Toast: kurzes Erfolgs-Popup im σ-ε-Diagramm ────────── */

.tensile-step-toast {
    position: absolute;
    /* Zentrierung via inset+margin:auto statt translate(-50%,-50%) — sonst
       Sub-Pixel-Offsets bei ungerader Toast-Breite/-Höhe und damit unscharfer
       Text. Animation versetzt nur in ganzen Pixeln (translateY). */
    inset: 0;
    margin: auto;
    width: max-content;
    height: max-content;
    max-width: 90%;
    background: var(--success-600);        /* success green, konsistent mit eval-feedback */
    color: var(--neutrals-0);
    padding: 16px 28px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 32px rgba(var(--success-600-rgb), 0.4);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Alle Inhalte (auch Formelzeichen mit eigener Schrift, SVG-Icon und
   Sub-Tags) sollen zwingend weiß bleiben. !important schlägt evtl.
   später geladene Regeln (z.B. KaTeX) und Browser-Defaults für <sub>. */
.tensile-step-toast,
.tensile-step-toast *,
.tensile-step-toast .tensile-formula,
.tensile-step-toast .tensile-formula sub,
.tensile-step-toast .tensile-formula sup,
.tensile-step-toast svg,
.tensile-step-toast svg * {
    color: var(--neutrals-0) !important;
    fill: none !important;
    stroke: var(--neutrals-0) !important;
}
.tensile-step-toast svg polyline,
.tensile-step-toast svg path,
.tensile-step-toast svg line {
    stroke: var(--neutrals-0) !important;
    fill: none !important;
}

/* Formelzeichen im Toast in der KaTeX-Math-Schrift — gleicher Look wie
   im Physiklabor-Onboarding (KaTeX_Math italic für Variablen, KaTeX_Main
   upright für Subscripts wie in der Mathe-Notation üblich). */
.tensile-formula {
    font-family: KaTeX_Math, 'Cambria Math', 'STIX Two Math', 'Latin Modern Math', serif;
    font-style: italic;
    font-size: 1.05em;
    letter-spacing: 0.01em;
}
.tensile-formula sub {
    font-family: KaTeX_Main, 'Cambria Math', 'STIX Two Math', serif;
    font-style: normal;
    font-size: 0.78em;
    padding-left: 0.05em;
}

.tensile-step-toast.is-visible {
    animation: tensileStepToast 2800ms ease-out forwards;
}

@keyframes tensileStepToast {
    0%   { opacity: 0; transform: translateY(-12px) scale(0.92); }
    8%   { opacity: 1; transform: translateY(0) scale(1); }
    88%  { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-8px) scale(1); }
}
