html,
body {
    overflow: hidden;
}

html {
    visibility: hidden;
}

.article {
    display: flex;
    height: 100vh;
}

.article-left {
    background-color: var(--color-black);
    width: 50vw;
    box-sizing: border-box;
    position: relative;
}

.progress-line {
    position: absolute;
    top: -12px;
    /* 24px / 2 nach oben */
    left: 0;
    width: 100%;

    height: 24px;
    /* Hit-Area */
    background: transparent;
    cursor: ns-resize;
    touch-action: none;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    z-index: 20;
}

.progress-line::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 1px;
    background: var(--color-white);
}


/* linke Map */
.toc-map {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    box-sizing: border-box;
    padding: 0 2.75rem 0 2.75rem;
}

/* Labels links */
.toc-item {
    position: absolute;

    max-width: calc(50vw - 5.5rem);

    font-family: "Timezone Mono", monospace;
    font-size: 1rem;
    line-height: 1.13;
    font-weight: 100;
    margin: 0;

    color: var(--color-white);

    transform: translateY(-50%);
    /* white-space: nowrap; */
    /* overflow: hidden;
    text-overflow: ellipsis; */
    word-break: break-word;

    pointer-events: auto;
    cursor: pointer;
}

.toc-item.is-active {
    /* color: var(--color-black);
    -webkit-text-stroke: 2px var(--color-white);
    paint-order: stroke fill; */
    color: var(--color-neon-green);
}

.toc-item.is-pinned {
    top: auto;
    bottom: 0.5rem;
    transform: none;
    /* wichtig: translateY(-50%) aushebeln */
}

.article-right {
    background-color: var(--color-white);
    width: 50vw;
    box-sizing: border-box;
    display: flex;
    overflow-y: auto;
    position: relative;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.article-right::-webkit-scrollbar {
    display: none;
}

.punchhole-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.75rem 0.875rem 2.75rem 0.875rem;
    box-sizing: border-box;
}

@media screen {
    .punchhole-wrapper {
        position: fixed;
    }
}

.punchhole {
    background-color: var(--color-black);
    width: 1rem;
    height: 1rem;
    border-radius: 0.5rem;
}

.article-text-wrapper {
    padding: 1.375rem 1.375rem 2rem 2.75rem;
    position: relative;
    display: flow-root;
    width: 50vw;
    box-sizing: border-box;
    z-index: 2;
}

.article-head {
    text-align: center;
    margin: 0 0 8.25rem 0;
    position: relative;
}

.article-heading {
    position: fixed;
    top: 1.375rem;
    right: 1.375rem;
    width: calc(50vw - 2.75rem);
    text-align: center;
    margin: 0;
    transform: none;
}

.article-right.crack-root .crack-layer .article-heading {
    position: sticky !important;
    top: 1.375rem;
    /* wie vorher */
    right: 1.375rem;
    width: calc(50vw - 2.75rem);
    z-index: 50;
}

.next-article-preview .article-heading {
    right: 0;
}

.print-titlepage {
    display: none;
}

.print-backmatter {
    display: none;
}

.article-subheading {
    position: sticky;
    top: var(--sticky-subheading-top, 4.1rem);
    z-index: 9;
    margin: 0;
    text-align: center;
}


.head {
    margin-top: 0;
    position: relative;
    top: 0;
}

.author {
    text-decoration: underline;
    cursor: pointer;
}

.paragraph {
    text-align: justify;
    hyphens: auto;
    text-indent: 2.75rem;
    margin-bottom: 1.375rem;
}

.quote {
    box-sizing: border-box;
    padding: 0 0 0 1.375rem;
    border-left: solid var(--color-black) 1px;
    margin-left: 1.375rem;
    text-indent: 0;
}

.article-section {
    padding-bottom: 8rem;
    margin-top: -5rem;
}

.intro {
    margin-top: 0;
}

.fnref a {
    text-decoration: none;
    color: inherit;
    font-family: "Timezone", serif;
    font-size: inherit;
    font-weight: 100;
    cursor: text;
    line-height: 0;
    vertical-align: middle;
    pointer-events: none;
}

.fnref {
    font-size: 0.8em;
    font-family: "Timezone", serif;
    line-height: 0;
}

.fnref-dot {
    width: 0.313rem;
    height: 0.313rem;
    background: var(--color-black);
    border-radius: 1rem;

    display: inline-block;
    margin-right: 0.1rem;
    margin-left: 0.1rem;

    vertical-align: middle;
    position: relative;
}


.figref {
    font-size: 0.8em;
    font-family: "Timezone", serif;
    line-height: 0;
    vertical-align: 0.35em;
}

.figref a {
    color: inherit;
    font-family: "Timezone", serif;
    font-size: inherit;
    font-weight: 100;
    text-decoration: none;
    line-height: 0;
    vertical-align: middle;
    cursor: text;
    pointer-events: none;
}

.figref-diamond {
    background-color: var(--color-black);
    width: 0.313rem;
    height: 0.313rem;

    display: inline-block;
    margin-right: 0.1rem;
    margin-left: 0.1rem;

    vertical-align: middle;
    position: relative;
    transform: rotate(45deg);
}


.footnote-panel {
    position: absolute;
    inset: 0;
    z-index: 12;
    overflow: hidden;
    pointer-events: none;
    box-sizing: border-box;
}

.footnote-panel .fn {
    position: absolute;
    top: 0;
    right: 2.75rem;

    will-change: transform;
}

.fn {
    width: 13rem;
    position: relative;
    pointer-events: all;
}

.fn-content {
    background-color: var(--color-white);
    margin-top: -0.3rem;
}


.fn-content p,
.fn-content a,
.fn-content li {
    font-family: "Timezone Mono", monospace;
    font-size: 0.7rem;
    line-height: 1.1;
    font-weight: 100;
    color: var(--color-black);
    margin: 0;
    hyphens: auto;
}


.fn-content p {
    margin: 0;
}

.fn-number {
    display: inline-block;
    background-color: var(--color-white);
    padding-right: 1.375rem;
    padding-top: -0.5rem;
}

.article-ruler-wrapper {
    position: absolute;
    right: 0;
    height: 100%;
    display: flex;
    flex-direction: row;
}

.article-ruler {
    justify-content: space-between;
    display: flex;
    flex-direction: column;
}

.ruler-line {
    width: 0.875rem;
    background-color: var(--color-white);
    height: 1px;
}

.article-ruler-footnotes {
    position: relative;
    height: 100%;
    width: 0.313rem;
}

.ruler-footnote {
    background-color: var(--color-white);
    width: 0.313rem;
    height: 0.313rem;
    border-radius: 1rem;
    position: absolute;
    right: 0;
    transform: translateY(-50%);
    margin-right: 0.313rem;
}

.article-ruler-figures {
    position: relative;
    height: 100%;
    width: 0.313rem;
    margin-right: -0.2rem;
}

.ruler-figure {
    background-color: var(--color-white);
    width: 0.313rem;
    height: 0.313rem;
    margin-right: 0.313rem;
    position: absolute;
    right: 0;
    transform: rotate(45deg) translateY(-50%);
}

/* =========================
   Figure fly-in animation
   ========================= */

/* Wrapper bleibt nur Layoutcontainer */
.article-image-wrapper .figure {

    position: absolute;

    /* wichtig: kein inset */
    top: 50%;
    left: 50%;

    margin: 0;

    opacity: 0;
    pointer-events: none;

    transition: transform 0.8s ease-out;

    /* JS variables */
    --tx: 0vw;
    --ty: 0vh;
    --rot: 0deg;
    --scale: 1;
    --centerOffset: 0rem;

    transform:
        translate(-50%, calc(-50% + var(--centerOffset))) translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(var(--scale));
}

.article-image-wrapper .figure {
    z-index: 11;
}

.article-image-wrapper .figure:hover {
    z-index: 12;
}

/* aktive Figure sichtbar */
.article-image-wrapper .figure.is-active {
    opacity: 1;
    pointer-events: auto;
}


/* =========================
   Base image behaviour
   ========================= */

.article-image {
    display: block;
    height: auto;
}


/* =========================
   Portrait
   ========================= */

.article-image-wrapper .figure.is-active.is-portrait .article-image {

    width: auto;
    height: 70vh;

}


.slideshow-slide.is-portrait img {
    width: auto;
}


/* =========================
   Landscape
   ========================= */

.article-image-wrapper .figure.is-active.is-landscape .article-image {

    width: 70vh;
    height: auto;

}

.slideshow-slide.is-landscape img {
    max-width: 90vw;
    height: auto;
}



.paragraph-mono {
    font-family: "Timezone Mono", monospace;
    margin-left: 4.875rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.mono {
    font-family: "Timezone Mono", monospace;
    font-size: 1rem;
    line-height: 1.13;
    color: var(--color-black);
    font-weight: 100;
    margin-bottom: 2rem;
}

.paragraph-note {
    font-family: "Timezone", serif;
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.13;
    color: var(--color-black);
    font-weight: 100;
    margin-top: 6rem;
}

.paragraph-author {
    font-family: "Timezone", serif;
    font-size: 1.25rem;
    line-height: 1.13;
    color: var(--color-black);
    font-weight: 100;
    margin-top: 2.75rem;
}

.kurzvita-wrapper {
    width: 23.625rem;
    background-color: var(--color-white);
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 3000;
    padding: 1.375rem;
    box-sizing: border-box;

    opacity: 0;
    pointer-events: none;

    transform: translateX(105vh) translateY(-110vh) rotate(45deg);
    transform-origin: top right;

    transition:
        transform 600ms linear,
        opacity 0ms linear 600ms;

    will-change: transform;
}

.kurzvita-wrapper.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) translateY(0) rotate(0deg);

    transition:
        transform 600ms linear,
        opacity 0ms linear 0ms;
}

.kurzvita {
    text-indent: 2.75rem;
    margin: 0;
    font-family: "Timezone Mono", monospace;
    font-size: 1rem;
    hyphens: auto;
}

.paperclip {
    position: absolute;
    right: -0.1rem;
    top: 2rem;
    cursor: pointer;

    opacity: 0;
    transform: translateX(140%) translateY(-160%);

    transition:
        transform 250ms linear,
        opacity 0ms linear 250ms;

    will-change: transform;
}

/* Clip sichtbar + an Position */
.kurzvita-wrapper.is-open.is-clip-in .paperclip {
    opacity: 1;
    transform: translateX(0) translateY(0);

    transition:
        transform 250ms linear,
        opacity 0ms linear 0ms;
}

.pagefold {
    --fold: 22vw;
    /* muss zur border-width Größe passen */
    position: fixed;
    right: 0;
    bottom: 0;
    width: var(--fold);
    height: var(--fold);
    pointer-events: none;
    z-index: 50;
}

/* Label ist an der Ecke "befestigt" und bewegt sich mit */
.pagefold .pagefold-label {
    position: absolute;

    top: 1rem;
    left: 1rem;
    padding-right: 7rem;

    margin: 0;
    max-width: 22rem;

    /* ✅ Start: zusammen mit dem Fold "draußen" */
    transform: translate3d(300%, 300%, 0);

    /* ✅ gleiche Dauer/Ease wie Fold */
    transition: transform 600ms ease;

    pointer-events: none;
}

/* ✅ Wenn Fold auf: Label fährt rein und bleibt stehen */
.pagefold.is-complete .pagefold-label {
    transform: translate3d(0, 0, 0);
}


.pagefold.is-label-visible .pagefold-label {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.pagefold.is-complete.is-label-visible {
    pointer-events: auto;
}




/* Dreieck (Start: unsichtbar) */
.pagefold::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;

    border-top-color: var(--color-white);
    border-right-color: var(--color-white);
    border-bottom-color: transparent;
    border-left-color: transparent;

    border-width: 0 0 0 0;
    transition: border-width 600ms ease;
    will-change: border-width;
}

.pagefold.is-complete::before {
    border-width: var(--fold) var(--fold) 0 0;
}


.pagefold.is-complete:hover::before {
    border-top-color: var(--color-neon-green);
}

/* optional: respektiere Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .pagefold::before {
        transition: none;
    }
}


/* ===== Crack (Full duplicate, in-flow) ===== */
.article-right.crack-root {
    position: relative;
    --crack-x: 50%;
    --crack-drop: 3px;
}

.article-right .crack-stage {
    position: relative;
    width: 100%;
}

/* Source bestimmt Layout/Scrollhöhe, ist aber unsichtbar */
.article-right .crack-source {
    position: relative;
    z-index: 1;
    opacity: 0;
}

/* Die zwei Duplikate liegen darüber */
.article-right .crack-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* OBEN: nur linke Hälfte sichtbar */
.article-right .crack-layer.first-half {
    clip-path: polygon(0 0, var(--crack-x) 0, var(--crack-x) 100%, 0 100%);
    transform: translateY(0px);
    pointer-events: auto;
    user-select: text;
}

/* UNTEN: nur rechte Hälfte sichtbar + 3px down */
.article-right .crack-layer.second-half {
    transform: translateY(var(--crack-drop));
    clip-path: polygon(var(--crack-x) 0, 100% 0, 100% 100%, var(--crack-x) 100%);
    pointer-events: none;
    user-select: text;
}

@media print {

    .article-right .crack-layer,
    .article-right .crack-line {
        display: none !important;
    }

    .article-right .crack-source {
        opacity: 1 !important;
    }
}

/* Highlight, das wir per JS in die Klone einbauen */
.crack-hl {
    background: var(--color-neon-green);
    border-radius: 2px;
}


/* ===== Pageflip SVG Overlay (clean) ===== */

/* Beide SVGs: full viewport overlay */
.pageflip-svg {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

/* STACKING:
   - Preview (masked content) unter Black
   - Black oben drauf
   - White ist NUR "guide" / kann unsichtbar sein (empfohlen)
*/
.pageflip-svg--white {
    z-index: 59;
}

.pageflip-svg--black {
    z-index: 60;
}

/* Polys */
.pageflip-poly {
    opacity: 0;
}

.pageflip-poly--black {
    fill: var(--color-black);
}

/* ✅ White NICHT sichtbar zeichnen (sonst übermalt es dein Preview)
   Wir benutzen seine Geometrie nur für die clip-path-Berechnung im JS.
*/
.pageflip-poly--white {
    fill: transparent;
    opacity: 0 !important;
}

/* wenn Flip aktiv: altes border-Dreieck weg */
.pagefold.is-flip-active::before {
    opacity: 0;
    transition: opacity 80ms linear;
}

/* ===== Next article preview (masked by JS clip-path) ===== */

/* ✅ MUSS full-screen sein, weil clip-path Punkte in Viewport-Pixeln kommen */
.next-article-preview {
    position: fixed;
    inset: 0;
    /* full viewport */
    z-index: 58;
    /* unter white/black overlays */
    pointer-events: none;
    overflow: hidden;

    clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    -webkit-clip-path: polygon(0 0, 0 0, 0 0, 0 0);
}


/* Der injizierte Preview-Content sitzt rechts und füllt 50vw */
.next-article-preview .crack-layer.first-half,
.next-article-preview .article-right,
.next-article-preview .article-text-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 50vw;
    height: 100vh;
}

/* Optional: Performance */
.next-article-preview {
    will-change: clip-path;
}

/* ===============================
SLIDESHOW
=============================== */

.slideshow-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;

    background-color: rgb(255 255 255 / 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);

    pointer-events: none;

    transition:
        background-color 1200ms ease,
        backdrop-filter 1200ms ease,
        -webkit-backdrop-filter 1200ms ease;

    overflow: hidden;
}

.slideshow-overlay.open {
    background-color: rgb(255 255 255 / 0.9);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);

    pointer-events: auto;
}

/* Stage */

.slideshow-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Slide */

.slideshow-slide {
    position: absolute;
    display: inline-block;

    left: 50%;
    top: 50%;

    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;

    cursor: pointer;

    will-change: transform, left, top, opacity;
    transform: translate(-50%, -50%);

    transition:
        left 1100ms cubic-bezier(.22, .61, .36, 1),
        top 1100ms cubic-bezier(.22, .61, .36, 1),
        transform 1100ms cubic-bezier(.22, .61, .36, 1),
        opacity 400ms ease;
}

/* Slide states */

.slideshow-slide.is-active {
    z-index: 3;
}

.slideshow-slide.is-prev,
.slideshow-slide.is-next {
    z-index: 2;
}

.slideshow-slide.is-off-left,
.slideshow-slide.is-off-right {
    z-index: 1;
}

/* Image */

.slideshow-slide-image {
    display: block;

    width: auto;
    height: auto;

    object-fit: contain;

    max-width: none;
    max-height: none;
}

/* ===============================
SLIDESHOW META
=============================== */

/* Wrapper um Bild + Meta (bestimmt die echte Breite = Bildbreite) */
.slideshow-frame {
    position: relative;
    display: inline-block;
}

/* Meta sitzt am unteren Rand des Bildes */
.slideshow-meta {
    position: absolute;
    left: 0;
    bottom: 0;

    display: flex;
    flex-direction: row;
    align-items: flex-start;

    box-sizing: border-box;

    opacity: 1 !important;
}

/* Hintergrund der Meta-Blöcke */
.slideshow-meta .abb-number-con,
.slideshow-meta .figcaption-con {
    background-color: var(--color-black);
}

/* Abb.-Nummer fix */
.slideshow-meta .abb-number-con {
    flex: 0 0 auto;
}

/* Caption nimmt restliche Breite ein */
.slideshow-meta .figcaption-con {
    flex: 0 1 auto;
}

/* Caption Text */
.slideshow-meta .figcaption-con p {
    font-family: "Timezone Mono", monospace;
    font-size: 0.8rem;
    line-height: 1.1;
    font-weight: 100;

    color: var(--color-white);

    margin: 0 0.3rem -0.1rem 0;
    hyphens: auto;
    text-align: left;

    padding-bottom: 1rem;
}

/* Abb.-Nummer Text */
.slideshow-meta .abb-number-con h5 {
    color: var(--color-white);
    font-size: 0.8rem;
}

/* ===============================
FIGURE META (inline hover)
=============================== */

.figure-meta {
    display: flex;
    justify-content: flex-start;
    opacity: 0;
}

.figure:hover .figure-meta {
    opacity: 1;
}

/* ===============================
FIGURE META STYLING
=============================== */

.abb-number-con {
    background-color: var(--color-neon-green);
    display: inline-block;
    align-self: flex-start;
}

.abb-number {
    margin: 0 0.3rem -0.1rem 0;

    font-family: "Timezone Mono", monospace;
    font-size: 0.7rem;
    line-height: 1.1;
    font-weight: 100;
}

.figcaption-con {
    background-color: var(--color-neon-green);
    display: inline-block;
    width: 13rem;
}

.figcaption-con p {
    font-family: "Timezone Mono", monospace;
    font-size: 0.7rem;
    line-height: 1.1;
    font-weight: 100;

    color: var(--color-black);

    margin: 0 0.3rem -0.1rem 0;
    hyphens: auto;
    text-align: left;
}

/* ===============================
CLICK FIX
=============================== */

.article-image-wrapper .figure {
    pointer-events: none;
}

.article-image-wrapper .figure.is-active {
    pointer-events: auto;
}

.article-image-wrapper .figure.is-active .article-image {
    cursor: pointer;
}

/* ===============================
INLINE SLIDESHOW PREVIEW
=============================== */

.slideshow-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;
    margin: 2rem 0;
}

.slideshow-inline-items {
    display: flex;
    gap: 0.688rem;
    align-items: center;
}

.slideshow-inline-item {
    border: none;
    background: none;
    padding: 0;
    margin: 0;

    cursor: pointer;
}

.slideshow-inline-item img {
    display: block;

    width: 6.5vw;
    height: auto;

    filter: grayscale(100%);
}

.slideshow-inline-arrow {
    border: none;
    background: none;

    padding: 0;
    margin: 0;

    cursor: pointer;

    font-family: "Timezone Mono", monospace;
    font-size: 2rem;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.glossary-box {
    border: 1px solid var(--color-black);
    padding: 1rem;
}

.glossary-entry {
    padding: 0.5rem 0;
}

.glossary-entry p {
    padding-left: 3rem;
}

.glossary-entry h4 {
    background-color: var(--color-black);
    color: var(--color-white);
}

.glossary-link {
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.8em;
    vertical-align: super;
    line-height: 0;
    color: var(--color-black);
    background-color: var(--color-neon-green);
}

@media (max-width: 768px) {

    .article-right,
    .article-text-wrapper {
        width: 100vw;
        overflow-x: hidden;
    }

    .article-left {
        display: none;
    }

    .article-text-wrapper {
        padding: 0.75rem;
    }

    .punchhole-wrapper {
        display: none;
    }

    .article-right.crack-root .crack-layer .article-heading {
        text-align: center;
        width: auto;
    }

    .paragraph {
        font-size: 1.15rem;
        text-align: left;
    }

    h2 {
        font-size: 3rem;
        position: sticky !important;
    }

    h3 {
        font-size: 2rem;
    }

    .kurzvita {
        font-size: 0.8rem;
    }

    .mono {
        font-size: 0.8rem;
    }

    .pagefold {
        --fold: 50vw;
    }

    .paragraph-mono {
        font-size: 0.8rem;
    }

    .kurzvita-wrapper {
        padding: 1rem;
    }
}