/* ==========================================================================
   CampMatic — Home-Assistant-Tutorial
   Aufsatz auf css/style.css. Uebernimmt deren Tokens (--orange, --navy, ...)
   und ergaenzt nur, was die Doku-Strecke zusaetzlich braucht.
   ========================================================================== */

:root {
    --tut-sidebar-w: 288px;
    --tut-nav-h: 78px;
    --tut-measure: 72ch;

    /* Code-Flaeche: eine Nuance tiefer als --navy, damit sie sich abhebt */
    --code-bg: #141C24;
    --code-bg-head: #1E2933;
    --code-border: #2B3845;
    --code-fg: #D6DEE6;
    --code-key: #FFD93D;
    --code-str: #8FD6A0;
    --code-num: #7FC4EA;
    --code-comment: #6B7B8A;
    --code-punct: #8896A4;

    --tut-rule: #E2E6EB;
    --tut-ink-soft: #5D6D7E;
    --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
}

/* --- Grundgeruest ------------------------------------------------------- */

.tut {
    display: grid;
    grid-template-columns: var(--tut-sidebar-w) minmax(0, 1fr);
    gap: 0;
    max-width: 1420px;
    margin: 0 auto;
    align-items: start;
}

/* --- Sidebar ------------------------------------------------------------ */

.tut-side {
    position: sticky;
    top: var(--tut-nav-h);
    height: calc(100vh - var(--tut-nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--navy);
    color: #AFBDCB;
    padding: 32px 0 48px;
    scrollbar-width: thin;
    scrollbar-color: #3A4A59 transparent;
}
.tut-side::-webkit-scrollbar { width: 8px; }
.tut-side::-webkit-scrollbar-thumb { background: #3A4A59; border-radius: 4px; }

.tut-side__head {
    padding: 0 28px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 24px;
}
.tut-side__eyebrow {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 8px;
}
.tut-side__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 18px;
}

/* Fortschritt */
.tut-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tut-progress__track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
}
.tut-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--orange), var(--gold));
    border-radius: 2px;
    transition: width 0.6s var(--transition);
}
.tut-progress__label {
    font-size: 0.72rem;
    font-weight: 500;
    color: #8A9AA9;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tut-side__group {
    padding: 0 16px;
    margin-bottom: 26px;
}
.tut-side__grouptitle {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64778A;
    padding: 0 12px;
    margin-bottom: 10px;
}
.tut-side__list { list-style: none; margin: 0; padding: 0; }

.tut-side__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: #AFBDCB;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.45;
    transition: background 0.18s ease, color 0.18s ease;
}
.tut-side__link:hover { background: rgba(255, 255, 255, 0.06); color: var(--white); }

.tut-side__num {
    flex: 0 0 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-heading);
    background: rgba(255, 255, 255, 0.08);
    color: #8A9AA9;
    transition: background 0.18s ease, color 0.18s ease;
}

/* erledigte Kapitel */
.tut-side__link.is-done .tut-side__num {
    background: rgba(39, 174, 96, 0.18);
    color: var(--green);
}
.tut-side__link.is-done .tut-side__num::before { content: '✓'; font-size: 0.72rem; }
.tut-side__link.is-done .tut-side__num span { display: none; }

/* aktives Kapitel */
.tut-side__link.is-active {
    background: rgba(232, 83, 14, 0.14);
    color: var(--white);
    font-weight: 500;
    box-shadow: inset 2px 0 0 var(--orange);
}
.tut-side__link.is-active .tut-side__num { background: var(--orange); color: var(--white); }

/* --- Inhaltsbereich ----------------------------------------------------- */

.tut-main {
    padding: 44px 56px 88px;
    min-width: 0;
    background: var(--white);
}

.tut-crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--slate-light);
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.tut-crumbs a { color: var(--slate-light); text-decoration: none; }
.tut-crumbs a:hover { color: var(--orange); }
.tut-crumbs__sep { opacity: 0.45; }

.tut-head { margin-bottom: 40px; }
.tut-head__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 14px;
}
.tut-head__eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--orange);
    border-radius: 1px;
}
.tut-head h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin: 0 0 16px;
}
.tut-head__lead {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--tut-ink-soft);
    max-width: var(--tut-measure);
    margin: 0 0 22px;
}
.tut-head__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--tut-rule);
    font-size: 0.82rem;
    color: var(--slate-light);
}
.tut-head__meta-item { display: inline-flex; align-items: center; gap: 7px; }
.tut-head__meta-item svg { flex: 0 0 auto; opacity: 0.7; }

/* Sprachumschalter */
.tut-lang { display: inline-flex; margin-left: auto; border: 1px solid var(--tut-rule); border-radius: 999px; overflow: hidden; }
.tut-lang a {
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--slate-light);
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.tut-lang a.is-active { background: var(--navy); color: var(--white); }
.tut-lang a:not(.is-active):hover { background: var(--light); color: var(--navy); }

/* --- Fliesstext --------------------------------------------------------- */

.tut-body { max-width: var(--tut-measure); }
.tut-body > * + * { margin-top: 1.15em; }

.tut-body h2 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.015em;
    line-height: 1.3;
    margin-top: 2.4em;
    scroll-margin-top: calc(var(--tut-nav-h) + 20px);
}
.tut-body h3 {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--navy);
    margin-top: 1.9em;
    scroll-margin-top: calc(var(--tut-nav-h) + 20px);
}
.tut-body p { color: var(--slate); line-height: 1.75; }
.tut-body a { color: var(--orange); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.tut-body a:hover { color: var(--orange-hover); }
.tut-body ul, .tut-body ol { padding-left: 1.4em; color: var(--slate); }
.tut-body li + li { margin-top: 0.5em; }
.tut-body strong { color: var(--navy); font-weight: 600; }

/* Inline-Code */
.tut-body :not(pre) > code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--light);
    border: 1px solid var(--tut-rule);
    border-radius: 5px;
    padding: 0.1em 0.38em;
    color: var(--navy);
    word-break: break-word;
}

/* Platzhalter, die der Kunde ersetzen muss */
var, .ph {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.875em;
    background: rgba(232, 83, 14, 0.1);
    border: 1px dashed rgba(232, 83, 14, 0.45);
    border-radius: 5px;
    padding: 0.1em 0.38em;
    color: var(--orange-hover);
    font-weight: 500;
    white-space: nowrap;
}

/* --- Nummerierte Schritte (Timeline) ------------------------------------ */

.tut-steps { counter-reset: tutstep; margin-top: 2em; }

.tut-step {
    position: relative;
    padding-left: 56px;
    padding-bottom: 36px;
}
.tut-step:last-child { padding-bottom: 0; }

/* Verbindungslinie */
.tut-step::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 38px;
    bottom: 0;
    width: 2px;
    background: var(--tut-rule);
}
.tut-step:last-child::before { display: none; }

.tut-step__num {
    counter-increment: tutstep;
    position: absolute;
    left: 0;
    top: 2px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--orange);
    color: var(--orange);
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    z-index: 1;
}
.tut-step__num::before { content: counter(tutstep); }

.tut-step__title {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--navy);
    margin: 6px 0 10px;
    line-height: 1.35;
    scroll-margin-top: calc(var(--tut-nav-h) + 20px);
}
.tut-step > * + * { margin-top: 0.9em; }
.tut-step > .tut-step__title + * { margin-top: 0; }

/* --- Tabs --------------------------------------------------------------- */

.tut-tabs { margin-top: 2em; }

.tut-tabs__list {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--light);
    border-radius: var(--radius);
    overflow-x: auto;
    scrollbar-width: none;
}
.tut-tabs__list::-webkit-scrollbar { display: none; }

.tut-tabs__btn {
    flex: 1 1 auto;
    white-space: nowrap;
    padding: 10px 18px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-light);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.tut-tabs__btn:hover { color: var(--navy); }
.tut-tabs__btn[aria-selected="true"] {
    background: var(--white);
    color: var(--navy);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.tut-tabs__btn-hint {
    display: block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--slate-light);
    margin-top: 2px;
}
.tut-tabs__btn[aria-selected="true"] .tut-tabs__btn-hint { color: var(--orange); }

.tut-tabs__panel { padding-top: 26px; }
.tut-tabs__panel[hidden] { display: none; }

/* --- Code-Viewer -------------------------------------------------------- */

.tut-code {
    margin-top: 1.6em;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    box-shadow: 0 6px 24px rgba(26, 37, 47, 0.14);
}

.tut-code__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 16px;
    background: var(--code-bg-head);
    border-bottom: 1px solid var(--code-border);
}
.tut-code__file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #9FB0BF;
    min-width: 0;
}
.tut-code__file svg { flex: 0 0 auto; opacity: 0.6; }
.tut-code__file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tut-code__lang {
    font-family: var(--font-heading);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--code-comment);
    border: 1px solid var(--code-border);
    border-radius: 4px;
    padding: 2px 6px;
}

.tut-code__actions { margin-left: auto; display: flex; gap: 6px; }

.tut-code__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid var(--code-border);
    border-radius: 6px;
    background: transparent;
    color: #9FB0BF;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.tut-code__btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--white); border-color: #3D4D5C; }
.tut-code__btn.is-copied { color: var(--green); border-color: rgba(39, 174, 96, 0.5); background: rgba(39, 174, 96, 0.12); }
.tut-code__btn svg { flex: 0 0 auto; }

.tut-code pre {
    margin: 0;
    padding: 18px 20px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.83rem;
    line-height: 1.65;
    color: var(--code-fg);
    tab-size: 2;
}
.tut-code pre::-webkit-scrollbar { height: 9px; }
.tut-code pre::-webkit-scrollbar-thumb { background: #3A4A59; border-radius: 5px; }
.tut-code code { font-family: inherit; background: none; border: none; padding: 0; }

/* Syntax-Farben (vom Highlighter in js/tutorial.js gesetzt) */
.tok-key { color: var(--code-key); }
.tok-str { color: var(--code-str); }
.tok-num { color: var(--code-num); }
.tok-bool { color: var(--code-num); font-weight: 500; }
.tok-comment { color: var(--code-comment); font-style: italic; }
.tok-punct { color: var(--code-punct); }
.tok-ph { color: #FF9E6B; background: rgba(232, 83, 14, 0.16); border-radius: 3px; padding: 0 3px; }

/* --- Callouts ----------------------------------------------------------- */

.tut-note {
    display: flex;
    gap: 14px;
    margin-top: 1.6em;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--blue);
    background: rgba(93, 173, 226, 0.08);
}
.tut-note__icon { flex: 0 0 auto; color: var(--blue); margin-top: 2px; }
.tut-note__body { min-width: 0; font-size: 0.925rem; line-height: 1.65; color: var(--slate); }
.tut-note__body > * + * { margin-top: 0.6em; }
.tut-note__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--navy);
    margin-bottom: 4px;
}

.tut-note--warn { border-left-color: var(--gold); background: rgba(255, 217, 61, 0.14); }
.tut-note--warn .tut-note__icon { color: #C99A00; }

.tut-note--error { border-left-color: var(--red); background: rgba(231, 76, 60, 0.07); }
.tut-note--error .tut-note__icon { color: var(--red); }

.tut-note--ok { border-left-color: var(--green); background: rgba(39, 174, 96, 0.08); }
.tut-note--ok .tut-note__icon { color: var(--green); }

/* --- Screenshot --------------------------------------------------------- */

.tut-shot { margin-top: 1.8em; }
.tut-shot__frame {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--tut-rule);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--light);
    cursor: zoom-in;
    position: relative;
    transition: box-shadow 0.25s var(--transition), border-color 0.25s var(--transition);
}
.tut-shot__frame:hover { box-shadow: var(--shadow); border-color: #CBD3DB; }
.tut-shot__frame img { display: block; width: 100%; height: auto; }

.tut-shot__zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(26, 37, 47, 0.82);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}
.tut-shot__frame:hover .tut-shot__zoom { opacity: 1; transform: translateY(0); }

.tut-shot__caption {
    margin-top: 10px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--slate-light);
    display: flex;
    gap: 8px;
}
.tut-shot__caption b { color: var(--navy); font-weight: 600; flex: 0 0 auto; }

/* Lightbox */
.tut-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 4vmin;
    background: rgba(20, 28, 36, 0.92);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.tut-lightbox.is-open { opacity: 1; visibility: visible; }
.tut-lightbox img {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    transform: scale(0.97);
    transition: transform 0.25s var(--transition);
}
.tut-lightbox.is-open img { transform: scale(1); }
.tut-lightbox__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease;
}
.tut-lightbox__close:hover { background: rgba(255, 255, 255, 0.2); }

/* --- Pruefliste am Kapitelende ------------------------------------------ */

.tut-check {
    margin-top: 2.4em;
    padding: 22px 24px;
    border: 1px solid var(--tut-rule);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--white), var(--light));
}
.tut-check__title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 14px;
}
.tut-check__title svg { color: var(--green); }
.tut-check ul { list-style: none; padding: 0; margin: 0; }
.tut-check li {
    position: relative;
    padding-left: 28px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--slate);
}
.tut-check li + li { margin-top: 9px; }
.tut-check li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    border: 2px solid #C3CCD5;
    border-radius: 4px;
}

/* --- Kapitelnavigation unten -------------------------------------------- */

.tut-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--tut-rule);
}
.tut-pager__link {
    display: block;
    padding: 18px 20px;
    border: 1px solid var(--tut-rule);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.22s var(--transition), box-shadow 0.22s var(--transition), transform 0.22s var(--transition);
}
.tut-pager__link:hover { border-color: var(--orange); box-shadow: var(--shadow); transform: translateY(-2px); }
.tut-pager__link--next { text-align: right; }
.tut-pager__dir {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--slate-light);
    margin-bottom: 6px;
}
.tut-pager__link--next .tut-pager__dir { justify-content: flex-end; }
.tut-pager__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.35;
}
.tut-pager__link:hover .tut-pager__title { color: var(--orange); }

/* --- Mobile-Umschalter fuer die Kapitelliste ---------------------------- */

.tut-side__toggle { display: none; }
.tut-side__backdrop { display: none; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 1100px) {
    :root { --tut-sidebar-w: 248px; }
    .tut-main { padding: 40px 34px 76px; }
}

@media (max-width: 860px) {
    .tut { grid-template-columns: 1fr; }

    /* Kapitelliste wird zur Schublade */
    .tut-side {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        height: 100%;
        z-index: 1200;
        padding-top: 24px;
        transform: translateX(-100%);
        transition: transform 0.3s var(--transition);
        box-shadow: var(--shadow-lg);
    }
    .tut-side.is-open { transform: translateX(0); }

    .tut-side__backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1150;
        background: rgba(26, 37, 47, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .tut-side__backdrop.is-open { opacity: 1; visibility: visible; }

    .tut-side__toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        margin-bottom: 26px;
        padding: 13px 16px;
        border: 1px solid var(--tut-rule);
        border-radius: var(--radius-sm);
        background: var(--white);
        font-family: var(--font-heading);
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--navy);
        cursor: pointer;
    }
    .tut-side__toggle svg { color: var(--orange); }
    .tut-side__toggle span { margin-left: auto; font-family: var(--font-body); font-size: 0.78rem; color: var(--slate-light); font-variant-numeric: tabular-nums; }

    .tut-main { padding: 26px 22px 72px; }
    .tut-head__meta { gap: 14px; }
    .tut-lang { margin-left: 0; }
    .tut-pager { grid-template-columns: 1fr; }
    .tut-pager__link--next { text-align: left; }
    .tut-pager__link--next .tut-pager__dir { justify-content: flex-start; }
}

@media (max-width: 560px) {
    .tut-main { padding: 22px 16px 64px; }
    .tut-step { padding-left: 44px; }
    .tut-step::before { left: 13px; }
    .tut-step__num { width: 28px; height: 28px; font-size: 0.82rem; }
    .tut-code pre { font-size: 0.78rem; padding: 14px 15px; }
    .tut-code__head { flex-wrap: wrap; }
    .tut-code__actions { margin-left: 0; width: 100%; }
    .tut-code__btn { flex: 1; justify-content: center; }
    .tut-tabs__btn { flex: 0 0 auto; }
    .tut-code__lang { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- Druck -------------------------------------------------------------- */

@media print {
    .tut { display: block; }
    .tut-side, .tut-side__toggle, .tut-side__backdrop,
    .tut-code__actions, .tut-pager, .tut-lang, .nav, .tut-shot__zoom { display: none !important; }
    .tut-main { padding: 0; }
    .tut-body { max-width: none; }
    .tut-code { border: 1px solid #CCC; box-shadow: none; }
    .tut-code pre { background: #F6F7F9; color: #1A252F; white-space: pre-wrap; word-break: break-word; }
    .tok-key, .tok-str, .tok-num, .tok-bool, .tok-comment, .tok-punct, .tok-ph { color: #1A252F !important; background: none !important; }
    .tok-comment { color: #666 !important; }
    a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 0.75em; color: #666; }
}

/* --- Abschnitte innerhalb des aktiven Kapitels --------------------------- */

.tut-side__sub {
    list-style: none;
    margin: 4px 0 6px;
    padding: 0 0 0 46px;
    position: relative;
}
.tut-side__sub::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 4px;
    bottom: 6px;
    width: 1px;
    background: rgba(255, 255, 255, 0.12);
}
.tut-side__sublink {
    display: block;
    padding: 5px 12px 5px 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #8A9AA9;
    text-decoration: none;
    transition: color 0.18s ease;
}
.tut-side__sublink:hover { color: var(--white); }
.tut-side__sublink.is-current { color: var(--orange); font-weight: 500; }
.tut-side__sublink.is-current::before {
    content: '';
    position: absolute;
    left: 23px;
    width: 1px;
    height: 18px;
    margin-top: 3px;
    background: var(--orange);
}
