/* ============================================================================
    DEVPANICZONE - TUTORIALS STYLESHEET
    ===========================================================================
     
    TABLE OF CONTENTS:
    1. Tutorial Layout & Wrapper..................... Zeile 27   ===
    2. Tutorial Sections............................. Zeile 57   ===
    3. Tutorial Grid Boxes........................... Zeile 496  ===
    4. Tutorial Code Blocks Copy Code................ Zeile 496  ===
    5. Tutorial Info-Boxes........................... Zeile 57   ===   
    6. Tutorial Reference Tables..................... Zeile 536  ===
    7. Tutorial Description Lists.................... Zeile 536  ===
    8. Tutorial Toggle............................... Zeile 536  ===
    9. Tutorial Navigation (Prev/Next)............... Zeile 536  ===

   10. bash-terminal.html............................ Zeile 536  ===

   
    =========================================================================== */

/* ============================================================================
    1. TUTORIAL LAYOUT & WRAPPER
=============================================================================== */

/* ----- Sections ----- */
.tutorials-content {
    padding: 1.5rem 0;
}

/* ============================================================================
2. TUTORIAL SECTIONS
=============================================================================== */

/* ----- Tutorial Hero ----- */
.tutorial-hero {
    padding: 3rem 0;
    margin-bottom: 0.5rem;
}

/* Kleiner als Homepage */
.tutorial-hero .hero-title {
    font-size: 2rem;
    padding-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.tutorial-hero .hero-subtitle {
    font-size: 1.125rem;
    /* margin-bottom: 0; */
}

/* ============================================================================
3. TUTORIAL GRID BOXES
=============================================================================== */

/* Comparison Grid - für Side-by-Side Vergleiche (z.B. unsafe vs safe code) */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.comparison-box {
    padding: 15px;
    border-radius: 8px;
}

.unsafe-example {
    background-color: var(--bg-secondary);
    border: 1px solid var(--accent-red-light);
}

.safe-example {
    background-color: var(--bg-secondary);
    border: 1px solid var(--accent-green);
}

.example-label {
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.example-label::before {
    content: "✗";
    display: inline-block;
    margin-right: 8px;
    font-size: 20px;
}

.safe-example .example-label::before {
    content: "✓";
    color: #28a745;
}

.unsafe-example .example-label::before {
    content: "✗";
    color: #dc3545;
}

/* Responsive: Bei kleinen Bildschirmen untereinander statt nebeneinander */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- TAG GRID ---- */
.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.tag-grid h3 {
    font-size: 1.4rem;
    border-bottom: 2px solid var(--accent-blue);
    padding: 0.5rem 0 0.5rem;
}

.tag-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    border-left: 4px solid var(--accent-blue);
    transition: all 150ms ease;
}

.tag-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tag-item .inline {
    color: var(--accent-blue);
    font-weight: 600;
}

/* ----- Tag Color Variants ----- */
.tag-item.tag-blue {
    border-left-color: var(--accent-blue);
}

.tag-item.tag-blue .inline {
    color: var(--accent-blue);
}

.tag-item.tag-green {
    border-left-color: var(--accent-green);
}

.tag-item.tag-green .inline {
    color: var(--accent-green);
}

.tag-item.tag-yellow {
    border-left-color: var(--accent-yellow-light);
}

.tag-item.tag-yellow .inline {
    color: var(--accent-yellow-light);
}

.tag-item.tag-orange {
    border-left-color: var(--accent-orange);
}

.tag-item.tag-orange .inline {
    color: var(--accent-orange);
}

.tag-item.tag-red {
    border-left-color: var(--accent-red);
}

.tag-item.tag-red .inline {
    color: var(--accent-red);
}

.tag-item.tag-cyan {
    border-left-color: var(--accent-cyan);
}

.tag-item.tag-cyan .inline {
    color: var(--accent-cyan);
}

.tag-item.tag-mint {
    border-left-color: var(--accent-mint);
}

.tag-item.tag-mint .inline {
    color: var(--accent-mint);
}

.tag-item.tag-purple {
    border-left-color: var(--accent-purple);
}

.tag-item.tag-purple .inline {
    color: var(--accent-purple);
}

.tag-item.tag-magenta {
    border-left-color: var(--accent-magenta);
}

.tag-item.tag-magenta .inline {
    color: var(--accent-magenta);
}

.tag-item.tag-gray {
    border-left-color: var(--text-secondary);
}

.tag-item.tag-gray .inline {
    color: var(--text-secondary);
}

/* Shortcut Grid */
.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.shortcut-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.shortcut-card kbd {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.shortcut-card code {
    display: inline-block;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.shortcut-card p {
    margin: 0;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-muted);
}

/* Cheatsheet Grid */
/* Spezialfall: auto-fit + minmax() */
/* ist von Natur aus responsiv und passt sich automatisch an */
.cheatsheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.cheatsheet-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 200ms ease;
}

.cheatsheet-section:hover,
.grid-2col-bg:hover,
.tutorial-card:hover,
.shortcut-card:hover,
.grid-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-blue-hover);
}

.cheatsheet-section h3 {
    color: var(--accent-blue);
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding: 0 0 0.5rem;
    border-bottom: 2px solid var(--accent-blue);
}

.cheatsheet-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cheatsheet-grid .cheatsheet-section ul li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
}

.cheatsheet-section code,
.grid-2col-bg:hover code,
.tutorial-card:hover code,
.shortcut-card:hover code {
    transition: color 150ms ease;
}

.cheatsheet-section:hover code,
.grid-2col-bg:hover:hover code,
.tutorial-card:hover:hover code,
.tutorial-card:hover:hover kbd,
.shortcut-card:hover:hover code,
.shortcut-card:hover:hover kbd {
    color: var(--accent-blue-hover);
}

@media (max-width: 768px) {
    .cheatsheet-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* V2 Farbcodierte Kategorien */
.cheatsheet-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.cheatsheet-section-2 {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    border-left: 4px solid var(--accent-blue);
    transition: all 200ms ease;
}

.cheatsheet-section-2:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Farbvarianten für verschiedene Kategorien */
.cheatsheet-section-2:nth-child(1) {
    border-left-color: var(--accent-blue);
}

.cheatsheet-section-2:nth-child(2) {
    border-left-color: var(--accent-green);
}

.cheatsheet-section-2:nth-child(3) {
    border-left-color: var(--accent-purple);
}

.cheatsheet-section-2:nth-child(4) {
    border-left-color: var(--accent-orange);
}

.cheatsheet-section-2:nth-child(5) {
    border-left-color: var(--accent-cyan);
}

.cheatsheet-section-2:nth-child(6) {
    border-left-color: var(--accent-red);
}

.cheatsheet-section-2:nth-child(7) {
    border-left-color: var(--accent-mint);
}

.cheatsheet-section-2:nth-child(1) h3 {
    color: var(--accent-blue);
}

.cheatsheet-section-2:nth-child(2) h3 {
    color: var(--accent-green);
}

.cheatsheet-section-2:nth-child(3) h3 {
    color: var(--accent-purple);
}

.cheatsheet-section-2:nth-child(4) h3 {
    color: var(--accent-orange);
}

.cheatsheet-section-2:nth-child(5) h3 {
    color: var(--accent-cyan);
}

.cheatsheet-section-2:nth-child(6) h3 {
    color: var(--accent-red);
}

.cheatsheet-section-2:nth-child(7) h3 {
    color: var(--accent-mint);
}

.cheatsheet-section-2 h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding: 0 0 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.cheatsheet-section-2 ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cheatsheet-section-2 li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .cheatsheet-grid-2 {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* V3 Akzent */

.cheatsheet-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.cheatsheet-section-3 {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    border-left: 4px solid var(--accent-blue);
    transition: all 200ms ease;
}

.cheatsheet-section-3:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left-color: var(--accent-blue-hover);
}

.cheatsheet-section-3 h3 {
    color: var(--accent-blue);
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding: 0 0 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.cheatsheet-section-3 ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cheatsheet-section-3 li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    transition: color 150ms ease;
}

.cheatsheet-section-3 li:hover {
    color: var(--accent-blue);
}

@media (max-width: 768px) {
    .cheatsheet-grid-3 {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* ============================================================================
4. TUTORIAL COPY CODE-BLOCKS
=============================================================================== */

/* ---- Code Block ---- */
.code-block {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 1rem 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.code-lang {
    font-family: var(--font-code);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.code-actions {
    display: flex;
    gap: 0.5rem;
}

.code-copy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 150ms ease;
}

.code-copy:hover {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.code-copy:active {
    transform: scale(0.95);
}

.code-copy.copied {
    background-color: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.copy-icon {
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.copy-icon img {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(89%) sepia(2%) saturate(158%) hue-rotate(182deg) brightness(85%) contrast(87%);
    transition: filter 150ms ease;
}

.code-copy:hover .copy-icon img,
.code-copy.copied .copy-icon img {
    filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}

.code-input,
.code-output {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-mono);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 1rem;
    border: none;
    resize: vertical;
    min-height: 100px;
}

.code-output {
    border-top: 1px solid var(--border-color);
}


/* ---- Code-Footer ---- */
.code-footer {
    padding: 1rem 1.5rem;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    /* Untere Ecken abrunden */
    font-size: 0.9rem;
}

.code-footer p {
    margin: 0.5rem 0;
}

.code-footer p:first-child {
    margin-top: 0;
}

.code-footer p:last-child {
    margin-bottom: 0;
}

.code-footer {
    color: var(--text-secondary);
}


@media (max-width: 640px) {
    .copy-text {
        display: none;
    }
}

/* ---- Code Block Inhalt ---- */
.code-block pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
    white-space: pre;
    background: transparent;
}

.code-block code {
    display: block;
    /* Default für Code in <pre> */
    width: auto;
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.6;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* Inline-Code in Listen, Header und Footer */
.grid-2col-cards .code-block .arrow-list code,
.grid-2col-cards .code-block .check-list code,
.grid-2col-cards .code-block .cross-list code,
.grid-2col-cards .code-header code,
.grid-2col-cards .code-footer code {
    display: inline;
    width: auto;
    background-color: var(--bg-light);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

/* ---- Scrollbar ---- */
.code-block pre::-webkit-scrollbar {
    height: 8px;
}

.code-block pre::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.code-block pre::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.code-block pre::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* ---- Prism.js Override ---- */
.code-block pre[class*="language-"] {
    background: var(--bg-tertiary);
    border: none;
    margin: 0;
    padding: 1.5rem;
}

.code-block code[class*="language-"] {
    background: transparent;
    color: var(--text-tertiary);
}

.code-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

.code-comment {
    color: var(--text-secondary);
}

/* ===============================================================================
    5. TUTORIAL INFO BOXES
   =============================================================================== */

/* === Title === */
strong.box-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
    padding: 0 0 0.75rem 0;
    /* position: relative; */
    border-bottom: 2px solid var(--accent-blue-hover);
}

/* .box-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70%;
    border-bottom: 2px solid var(--accent-blue-hover);
} */

/* === Icons === */
.icon-success {
    color: var(--color-success);
}

.icon-warning {
    color: var(--color-warning);
}

.icon-danger {
    color: var(--color-error);
}

.icon-blue {
    color: var(--accent-blue);
}

/* ---- Standard Blue ---- */

.info-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-blue);
    border-radius: 0 8px 8px 0;
    padding: 1.5rem;
    margin: 2rem 0;
}

/* .box-title {
    margin-top: 0;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--accent-blue-hover);
} */

.info-box p:last-child,
.info-box ul:last-child {
    margin-bottom: 0;
}

.info-box.notice .icon-right {
    position: absolute;
    top: 2rem;
    right: 2rem;
}

.info-box.notice .box-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-box.notice svg {
    flex-shrink: 0;
}

.info-box .arrow-list {
    margin-top: 0;
}

/* ---- NOTICE GREEN ---- */

.info-box.notice {
    border-left: 4px solid var(--accent-green);
    position: relative;
}

.box-title.notice {
    color: var(--text-secondary);
    border-bottom: 2px solid var(--accent-green);
}

.info-box.notice .icon-right {
    position: absolute;
    top: 2rem;
    right: 2rem;
}

.box-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-box svg,
.info-box .icon,
.info-box .icon-ui {
    flex-shrink: 0;
}

ul.info-box.notice li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}

/* .box-title.notice {
    color: var(--accent-green);
} */

.info-box.notice strong {
    color: var(--text-secondary);
}

/* ---- DANGER RED ---- */

.info-box.danger {
    border-left: 4px solid var(--accent-red-light);
    position: relative;
}

.box-title.danger {
    border-bottom: 2px solid var(--accent-red-light);
}

.info-box.danger .icon-right {
    position: absolute;
    top: 2rem;
    right: 2rem;
}

.info-box.danger .box-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-box.danger svg {
    flex-shrink: 0;
}

ul.info-box.danger li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-red-light);
    font-weight: bold;
}

.info-box.danger strong {
    color: var(--text-secondary);
}

/* ---- WARNING ORANGE ---- */

.info-box.warning {
    border-left: 4px solid var(--color-warning);
    position: relative;
    /* padding-right: 2rem; */
    /* Platz für das Icon schaffen */
}

.box-title.warning {
    border-bottom: 2px solid var(--color-warning);
}

.info-box.warning .icon-right {
    position: absolute;
    top: 2rem;
    right: 2rem;
}

.info-box.warning .box-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-box.warning svg {
    flex-shrink: 0;
}

ul.info-box.warning li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-warning);
    font-weight: bold;
}

.info-box.warning strong {
    color: var(--text-secondary);
}


/* ---- Check List ---- */
.check-list {
    list-style: none;
    /* padding-left: 0; */
}

.check-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

ul.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
    font-weight: bold;
}

.grid-2col-bg .check-list {
    padding-left: 0;
}

ul.grid-2col-bg .check-list {
    padding-left: 1.5rem;
}

/* ---- Cross List ---- */
.cross-list {
    list-style: none;
    padding-left: 0;
}

.cross-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

ul.cross-list li::before {
    content: '⛌';
    size: 1.4rem;
    position: absolute;
    left: 0;
    color: var(--text-secondary);
    font-weight: bold;
}

/* ===============================================================================
    6. REFERENCE TABLES
   =============================================================================== */

.ref-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ref-table thead {
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--heading-primary);
}

.ref-table th {
    padding: 1rem;
    text-align: left;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--heading-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ref-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.ref-table tbody tr:last-child td {
    border-bottom: none;
}

.ref-table tbody tr {
    transition: background-color 150ms ease;
}

.ref-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.ref-table code {
    font-family: var(--font-code);
    font-size: 0.875rem;
    background: var(--bg-tertiary);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    /* color: var(--accent-blue); */
    white-space: nowrap;
}

/* ---- Flexible Spalten-Breiten ---- */
.ref-table th,
.ref-table td {
    width: auto;
}

/* Erste Spalte bekommt eine Mindestbreite */
.ref-table thead th:first-child {
    min-width: 100px;
    white-space: nowrap;
}

/* Optional: Bestimmte Spalten sollen nicht umbrechen */
.ref-table td:first-child {
    white-space: nowrap;
}

/* Falls doch mal fixe Breiten, diese explizite Klasse */
.ref-table.table-3col thead th:nth-child(1) {
    width: 15%;
    min-width: 100px;
}

.ref-table.table-3col thead th:nth-child(2) {
    width: 45%;
}

.ref-table.table-3col thead th:nth-child(3) {
    width: 40%;
}

/* ---- Responsive: Cards auf Mobile ---- */
@media (max-width: 767px) {
    .ref-table thead {
        display: none;
    }

    .ref-table,
    .ref-table tbody,
    .ref-table tr {
        display: block;
        width: 100%;
    }

    .ref-table tr {
        margin-bottom: 1rem;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
    }

    .ref-table tr:hover {
        background: var(--bg-tertiary);
    }

    .ref-table td {
        display: block;
        padding: 0.5rem 0;
        border: none;
        text-align: left;
    }

    .ref-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: var(--accent-blue);
        font-size: 0.75rem;
        text-transform: uppercase;
        margin-bottom: 0.25rem;
    }

    .ref-table td:first-child {
        font-size: 1.125rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0.5rem;
    }

    .ref-table td:first-child::before {
        display: none;
    }
}

/* ---- Table Varianten ---- */
.ref-table.table-striped tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.ref-table.table-compact td,
.ref-table.table-compact th {
    padding: 0.5rem 0.75rem;
}

.ref-table.table-bordered {
    border: 1px solid var(--border-color);
}

/* ---- Früher Umbruch für Tabellen mit langen Code-Beispielen ---- */
/* Verwendung: <table class="ref-table ref-table-early-break"> */
@media (max-width: 1024px) {
    .ref-table.ref-table-early-break thead {
        display: none;
    }

    .ref-table.ref-table-early-break,
    .ref-table.ref-table-early-break tbody,
    .ref-table.ref-table-early-break tr {
        display: block;
        width: 100%;
    }

    .ref-table.ref-table-early-break tr {
        margin-bottom: 1rem;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
    }

    .ref-table.ref-table-early-break tr:hover {
        background: var(--bg-tertiary);
    }

    .ref-table.ref-table-early-break td {
        display: block;
        padding: 0.5rem 0;
        border: none;
        text-align: left;
        white-space: normal;
        /* Überschreibt nowrap für längere Inhalte */
    }

    .ref-table.ref-table-early-break td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: var(--accent-blue);
        font-size: 0.75rem;
        text-transform: uppercase;
        margin-bottom: 0.25rem;
    }

    .ref-table.ref-table-early-break td:first-child {
        font-size: 1.125rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0.5rem;
        white-space: nowrap;
        /* Erste Spalte (Element) bleibt kompakt */
    }

    .ref-table.ref-table-early-break td:first-child::before {
        display: none;
    }

    /* Code in Cards darf umbrechen */
    .ref-table.ref-table-early-break code {
        white-space: pre-wrap;
        word-break: break-word;
    }
}


/* ============================================
   MULTI-COLUMN TABLE STYLES
   Erweiterung für Tabellen mit 4+ Spalten
   ============================================ */

/* ---- Wrapper für horizontales Scrollen ---- */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    /* Scrollbar-Hinweis auf Mobile */
    -webkit-overflow-scrolling: touch;
}

/* Optionaler Scroll-Hinweis */
.table-wrapper::after {
    content: '';
    display: none;
}

@media (max-width: 767px) {
    .table-wrapper {
        /* Subtiler Schatten rechts als Scroll-Hinweis */
        background:
            linear-gradient(to right, var(--bg-secondary), var(--bg-secondary)),
            linear-gradient(to right, var(--bg-secondary), var(--bg-secondary)),
            linear-gradient(to right, rgba(0, 0, 0, 0.15), transparent),
            linear-gradient(to left, rgba(0, 0, 0, 0.15), transparent);
        background-position: left center, right center, left center, right center;
        background-repeat: no-repeat;
        background-size: 20px 100%, 20px 100%, 10px 100%, 10px 100%;
        background-attachment: local, local, scroll, scroll;
    }
}

/* ---- Styled Table (Multi-Column) ---- */
.styled-table {
    width: 100%;
    min-width: 600px;
    /* Verhindert zu starkes Quetschen */
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.styled-table thead {
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--heading-primary);
}

.styled-table th {
    padding: 0.875rem 0.75rem;
    text-align: left;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--heading-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.styled-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    font-size: 0.9375rem;
}

.styled-table tbody tr:last-child td {
    border-bottom: none;
}

.styled-table tbody tr {
    transition: background-color 150ms ease;
}

.styled-table tbody tr:hover {
    background: var(--bg-tertiary);
}

/* Code in Tabellen */
.styled-table code {
    font-family: var(--font-code);
    font-size: 0.8125rem;
    background: var(--bg-tertiary);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    white-space: nowrap;
}

/* Erste Spalte hervorheben */
.styled-table td:first-child {
    font-weight: 500;
    color: var(--heading-secondary);
}

/* ---- Kompakte Variante für viele Spalten ---- */
.styled-table.table-compact th,
.styled-table.table-compact td {
    padding: 0.625rem 0.5rem;
    font-size: 0.875rem;
}

.styled-table.table-compact code {
    font-size: 0.75rem;
    padding: 0.1em 0.3em;
}

/* ---- Zentrierte Spalten (für Sterne, Icons, kurze Werte) ---- */
.styled-table th.text-center,
.styled-table td.text-center {
    text-align: center;
}

/* ---- Responsive: Horizontales Scrollen statt Cards ---- */
/* Bei vielen Spalten ist Scrollen besser als Card-Layout */
@media (max-width: 767px) {
    .styled-table {
        font-size: 0.875rem;
    }

    .styled-table th {
        font-size: 0.75rem;
        padding: 0.75rem 0.5rem;
    }

    .styled-table td {
        padding: 0.625rem 0.5rem;
    }
}

/* ---- Alternative: Card-Layout für styled-table ---- */
/* Nur aktivieren wenn gewünscht mit .table-cards-mobile */
@media (max-width: 767px) {
    .styled-table.table-cards-mobile {
        min-width: unset;
    }

    .styled-table.table-cards-mobile thead {
        display: none;
    }

    .styled-table.table-cards-mobile,
    .styled-table.table-cards-mobile tbody,
    .styled-table.table-cards-mobile tr {
        display: block;
        width: 100%;
    }

    .styled-table.table-cards-mobile tr {
        margin-bottom: 1rem;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
    }

    .styled-table.table-cards-mobile td {
        display: block;
        padding: 0.5rem 0;
        border: none;
        text-align: left;
    }

    .styled-table.table-cards-mobile td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: var(--accent-blue);
        font-size: 0.75rem;
        text-transform: uppercase;
        margin-bottom: 0.25rem;
    }

    .styled-table.table-cards-mobile td:first-child {
        font-size: 1.125rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0.5rem;
    }

    .styled-table.table-cards-mobile td:first-child::before {
        display: none;
    }
}

/* ===============================================================================
    7. LISTS
   =============================================================================== */


/* ---- Beschreibungslisten ---- */
dl {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    /* background: var(--dark-light); */
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    padding: 2rem;
}

dt {
    font-family: var(--font-heading);
    color: var(--heading-secondary);
    font-weight: 600;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--border-color);
    padding: 0.8rem 0 0;
    margin-bottom: 1rem;
}

dd {
    color: var(--text-primary);
}

.list-demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .list-demo-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================================================================
    8. TOGGLE MORE INFO
   =============================================================================== */

details {
    margin-top: 1rem;
}

/* details[open] summary {
    margin-bottom: 0;
    padding-bottom: 2rem;
} */

summary {
    cursor: pointer;
    user-select: none;
    font-family: var(--font-code);
    color: var(--accent-blue);
    font-weight: bold;
    /* padding: 0.5rem 0; */
    text-align: left;
}

summary:hover {
    color: var(--accent-blue-hover);
}

.toggle-detail {
    padding: 0.5rem 0 0.5rem 0;
    margin-top: 10px;
}


/* ===============================================================================
    9. TUTORIAL NAVIGATION (Prev/Next)
   =============================================================================== */

.tutorial-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 3rem 0 4rem;
    border-top: 2px solid var(--border-color);
}

.tutorial-nav-prev,
.tutorial-nav-next {
    flex: 1;
    max-width: 48%;
}

.tutorial-nav a {
    display: block;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 150ms ease;
    text-decoration: none;
}

.tutorial-nav a:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.2);
}

.tutorial-nav-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: normal;
    margin-bottom: 0.25rem;
}

.tutorial-nav-link {
    display: block;
    color: var(--heading-secondary);
    font-weight: 400;
}

.tutorial-nav-prev {
    text-align: left;
}

.tutorial-nav-next {
    text-align: right;
}

@media (max-width: 640px) {

    .tutorial-nav {
        flex-direction: column;
    }

    .tutorial-nav-prev,
    .tutorial-nav-next {
        max-width: 100%;
        text-align: center;
    }
}

/* Unterkategorie-Hinweis in Prev/Next Navigation */
.tutorial-nav-category {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
    font-weight: 400;
}

/* Highlight wenn Kategorie wechselt */
.tutorial-nav-category.is-new {
    color: var(--accent-blue);
    font-weight: 600;
}