@font-face {
    font-family: Audiowide;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/audiowide-latin-400-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: Audiowide;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/audiowide-latin-ext-400-normal.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Roboto;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/roboto-latin-400-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: Roboto;
    font-weight: 400;
    font-display: swap;
    src: url(fonts/roboto-latin-ext-400-normal.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Roboto;
    font-weight: 500;
    font-display: swap;
    src: url(fonts/roboto-latin-500-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: Roboto;
    font-weight: 700;
    font-display: swap;
    src: url(fonts/roboto-latin-700-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: Roboto;
    font-weight: 900;
    font-display: swap;
    src: url(fonts/roboto-latin-900-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: dark;
    --bg: #080b1c;
    --bg-deep: #050816;
    --surface: #031d38;
    --surface-muted: #0a2440;
    --surface-active: #0c3a63;
    --btn-fill: #0f4474;
    --btn-fill-hover: #15558e;
    --accent: #1d90ca;
    --accent-ink: #04101f;
    --link: #4fb3e6;
    --link-hover: #7ec3f3;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.78);
    --text-faint: rgba(255, 255, 255, 0.6);
    --hairline: rgba(126, 195, 243, 0.14);
    --edge: inset 0 0 0 1px rgba(126, 195, 243, 0.08);
    --edge-strong: inset 0 0 0 1px rgba(126, 195, 243, 0.2);
    --live: #22c55e;
    --warn: #f5b301;
    --display: Audiowide, Roboto, Arial, sans-serif;
    --body: Roboto, Arial, sans-serif;

    /* The names under which the motion layer and the moment read the design tokens above */
    --ink: var(--text);
    --muted: var(--text-muted);
    --line: var(--hairline);
    --line-strong: rgba(126, 195, 243, 0.2);
    --card: var(--surface);
    --action: var(--accent);
    --action-ink: var(--accent-ink);
    --font-text: var(--body);
    --s-2: 8px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-7: 48px;
    --gutter: 24px;
    --r-md: 12px;
    --r-btn: 10px;
    --t-lead: 19px;
    --nav: 0px;
    --header-h: 64px;
}

* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
}
a {
    color: var(--link);
}
a:hover {
    color: var(--link-hover);
}
h1,
h2,
h3,
h4,
p {
    margin: 0;
}
:focus-visible {
    outline: 2px solid var(--link-hover);
    outline-offset: 2px;
}

/*
 * The distances to the edge of the display follow iobroker.com: the bars have the distance of its header,
 * the content that of its hero. All content stands left-aligned on one edge, at most 1600px wide.
 */
:root {
    --bar-edge: 32px;
    --page-edge: 64px;
    --tile-pad: 32px;
}
@media (max-width: 899px) {
    :root {
        --page-edge: 32px;
    }
}
@media (max-width: 599px) {
    :root {
        --bar-edge: 20px;
        --page-edge: 20px;
        --tile-pad: 24px;
    }
}
.wrap {
    width: min(1600px, 100% - 2 * var(--page-edge));
    margin-left: var(--page-edge);
}

.skip-link {
    position: absolute;
    left: var(--bar-edge);
    top: 12px;
    z-index: 2;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip-link:focus {
    width: auto;
    height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    clip-path: none;
    border-radius: 10px;
    background: var(--surface-active);
    color: var(--text);
}
/* Header */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid rgba(126, 195, 243, 0.1);
}
.site-header .wrap {
    position: relative;
    width: calc(100% - 2 * var(--bar-edge));
    margin-left: var(--bar-edge);
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 12px 28px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-family: var(--display);
    font-size: 20px;
}
.brand:hover {
    color: var(--text);
}
.brand img {
    width: 34px;
    height: 34px;
    display: block;
}
.brand span span {
    color: var(--accent);
}
.site-nav {
    margin-left: auto;
    display: flex;
    gap: 8px 28px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 15px;
}
.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
}
.site-nav a:hover {
    color: var(--link-hover);
}
/* On a phone the menu stays one bar: the sections are reached by scrolling */
@media (max-width: 760px) {
    .site-nav a:not(:first-child) {
        display: none;
    }
    .site-nav {
        flex-wrap: nowrap;
        gap: 16px;
        white-space: nowrap;
    }
    .site-header .wrap {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
}
@media (max-width: 420px) {
    .site-nav a {
        display: none;
    }
}
.lang-switch {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    background: var(--surface);
}
.lang-switch button {
    padding: 5px 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font: 13px var(--body);
    cursor: pointer;
}
.lang-switch button[aria-pressed='true'] {
    background: var(--surface-active);
    color: var(--text);
}
/* A finger needs a larger target than the pointer */
@media (max-width: 760px) {
    .lang-switch button {
        min-height: 38px;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    font: 14px var(--display);
    text-decoration: none;
    cursor: pointer;
}
.btn--primary {
    background: var(--accent);
    color: var(--accent-ink);
}
.btn--primary:hover {
    background: var(--link-hover);
    color: var(--accent-ink);
}
.btn--secondary,
.btn-quiet {
    background: var(--btn-fill);
    color: var(--text);
}
.btn--secondary:hover,
.btn-quiet:hover {
    background: var(--btn-fill-hover);
    color: var(--text);
}
.btn-muted {
    background: var(--surface-muted);
    color: var(--text-faint);
    cursor: default;
}
.btn svg {
    flex: none;
}
.icon-arrow {
    transition: transform var(--m-out, 120ms) var(--m-ease, ease);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    :is(a, button):hover > .icon-arrow {
        transform: translateX(3px);
        transition-duration: var(--m-in, 150ms);
    }
}
.dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--live);
    animation: live-dot 2s ease-in-out infinite;
}
.dot.off {
    background: var(--warn);
    animation: none;
}
@keyframes live-dot {
    50% {
        opacity: 0;
    }
}

/* Hero */
.hero {
    padding: 56px 0 0;
}
.hero-wrap {
    display: flex;
    flex-direction: column;
    gap: 110px;
}
.hero-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 48px;
    row-gap: 28px;
    align-items: center;
}
.hero-copy {
    grid-column: span 5;
    min-width: 0;
    /* the title takes its size from the width of this column, see .hero h1 */
    container-type: inline-size;
}
.kicker {
    font: 18px var(--display);
    color: var(--accent);
}
.hero h1 {
    margin-top: 14px;
    /* small enough that each line of the title fits the column: the longest line is about 10.7em */
    font-size: clamp(22px, 9cqi, 46px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.01em;
    /* a line break in the title stays: the title is set in lines of its own */
    white-space: pre-line;
}
.hero-lead {
    margin-top: 18px;
    font-size: 19px;
    line-height: 1.55;
    color: var(--text-muted);
}
.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.hero-actions .btn {
    min-height: 50px;
    font-size: 15px;
}
.hero-media {
    grid-column: span 7;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
.hero-shot {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(126, 195, 243, 0.12), 0 30px 80px rgba(0, 0, 0, 0.5);
}
.hero-shot img {
    display: block;
    width: 100%;
}
/* The hero shows every demo: the pictures fade one into the next, a caption with dots names the one shown */
.hero-carousel {
    position: relative;
}
.hero-slides {
    display: grid;
}
.hero-slide {
    grid-area: 1 / 1;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.6s ease,
        visibility 0s linear 0.6s;
}
.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease;
}
.hero-slide img {
    display: block;
    width: 100%;
}
.hero-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: linear-gradient(to top, rgba(8, 11, 28, 0.92), rgba(8, 11, 28, 0));
    pointer-events: none;
}
.hero-caption-title {
    font: 15px var(--display);
    color: var(--text);
    text-decoration: none;
    pointer-events: auto;
}
.hero-caption-title:hover {
    color: var(--accent);
}
.hero-dots {
    display: flex;
    gap: 2px;
    pointer-events: auto;
}
.hero-dot {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.hero-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition:
        width 0.3s ease,
        background 0.3s ease;
}
.hero-dot[aria-current]::before {
    width: 20px;
    border-radius: 4px;
    background: var(--accent);
}
.hero-dot:focus-visible {
    outline: 2px solid var(--accent);
    border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-slide.is-active {
        transition: none;
    }
}
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(8, 11, 28, 0.88);
    font: 13px var(--display);
}
.hero-media .live-pill {
    background: var(--surface);
}
/*
 * Side by side, the text and the picture have the same height: the text starts at the upper edge of the
 * picture and the buttons end at its lower edge. The LIVE mark stands in a row of its own above the picture.
 */
@media (min-width: 1024px) {
    .hero-grid {
        row-gap: 12px;
        align-items: stretch;
    }
    .hero-copy {
        grid-column: 1 / span 5;
        grid-row: 2;
        display: flex;
        flex-direction: column;
    }
    .hero-actions {
        margin-top: auto;
        padding-top: 28px;
    }
    .hero-media {
        display: contents;
    }
    .hero-media .live-pill {
        grid-column: 6 / span 7;
        grid-row: 1;
        justify-self: start;
    }
    .hero-shot {
        grid-column: 6 / span 7;
        grid-row: 2;
    }
    .hero-carousel .hero-slides,
    .hero-carousel .hero-slide {
        height: 100%;
    }
    /* If the text is the taller one, the picture fills the height instead of ending above the buttons */
    .hero-shot img {
        min-height: 100%;
        object-fit: cover;
        object-position: left top;
    }
}
/* One column: the 12 columns and their gaps would not fit on a narrow screen */
@media (max-width: 1023px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .hero-copy,
    .hero-media {
        grid-column: auto;
    }
}

/* Generic cards and sections */
.panel {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--edge);
}
.grid-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: var(--gutter);
}
/* Four tiles stand in one row or in two rows of two, never three and a single one */
.grid-highlights:has(> .highlight:nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 1100px) {
    .grid-highlights:has(> .highlight:nth-child(4):last-child) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 599px) {
    .grid-highlights:has(> .highlight:nth-child(4):last-child) {
        grid-template-columns: 1fr;
    }
}
.highlight {
    padding: var(--tile-pad);
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--edge);
}
.highlight p {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}
.highlight p.highlight-title {
    margin-bottom: 16px;
    font: 400 16px var(--display);
    color: var(--accent);
}
.highlight p a {
    color: var(--link);
}
.highlight p a:hover {
    color: var(--link-hover);
}
.section {
    padding: 128px 0 0;
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px 16px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hairline);
}
.section-head h2 {
    font: 400 26px var(--display);
    color: var(--accent);
    overflow-wrap: anywhere;
}
.section-head p {
    font-size: 16px;
    color: var(--text-faint);
}

/* Demo blocks: one per visualization, side by side on the columns of the page */
.demo-blocks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px var(--gutter);
    margin-top: 28px;
}
.demo-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.demo-block--2 {
    grid-column: span 2;
}
.demo-block--3 {
    grid-column: 1 / -1;
}
.block-title {
    margin-bottom: 14px;
    font: 400 18px var(--display);
    color: var(--text);
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.grid-demos {
    flex-grow: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gutter);
}
.demo-block--2 .grid-demos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.demo-block--3 .grid-demos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1100px) {
    .demo-blocks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .demo-block--2,
    .demo-block--3 {
        grid-column: 1 / -1;
    }
    .demo-block--3 .grid-demos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .demo-blocks {
        grid-template-columns: minmax(0, 1fr);
    }
    .demo-block--2 .grid-demos,
    .demo-block--3 .grid-demos {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Demo cards */
.demo-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.demo-media {
    display: block;
    position: relative;
    aspect-ratio: 3 / 2;
    max-height: 50vh;
    max-height: 50svh;
    width: 100%;
    /* the same blue as the card below: the cover pictures carry this blue around their window too */
    background: var(--surface);
}
.demo-media:focus-visible {
    outline-offset: -4px;
}
.demo-media img.shot {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.demo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font: 15px var(--display);
    color: var(--text-faint);
}
.demo-placeholder img {
    width: 56px;
    height: 56px;
    opacity: 0.85;
}
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(8, 11, 28, 0.88);
    color: var(--text);
    font: 12px var(--display);
}
.demo-body {
    padding: var(--tile-pad) var(--tile-pad) 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}
.demo-body h4 {
    font-size: 19px;
    line-height: 1.3;
    font-weight: 700;
    overflow-wrap: anywhere;
}
/* A card shows only the start of the description, the live view shows all of it */
.demo-body p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-muted);
}
.tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.tag {
    font-size: 12px;
    color: var(--link-hover);
    background: rgba(29, 144, 202, 0.16);
    border-radius: 999px;
    padding: 4px 9px;
}
.demo-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    gap: 10px;
    padding: 24px var(--tile-pad) var(--tile-pad);
}
.demo-actions .btn {
    padding: 0 8px;
    font-size: 13px;
}
.empty {
    margin-top: 24px;
    padding: var(--tile-pad);
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.55;
}

/* How-to */
.grid-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 20px;
    margin-top: 24px;
}
.step {
    padding: var(--tile-pad);
}
.step-no {
    font: 28px var(--display);
    color: var(--accent);
}
.step h3 {
    margin: 16px 0;
    font-size: 18px;
    font-weight: 700;
}
.step p {
    font-size: 16px;
    line-height: 1.55;
    color: var(--text-muted);
}
.howto-action {
    margin-top: var(--s-5);
}
.section-title {
    font: 400 26px var(--display);
    color: var(--accent);
    overflow-wrap: anywhere;
}
.howto-chapters .mo-pc__step h3 {
    font-weight: 700;
}
.step-no-inline {
    margin-right: 12px;
    font: 400 1em var(--display);
    color: var(--accent);
}
.howto-chapters .mo-pc__visuals,
.howto-chapters .mo-pc__visual {
    background: var(--bg-deep);
}
.howto-chapters .frame {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--edge-strong);
}

/* Install call to action */
.cta {
    padding: var(--tile-pad);
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.cta-copy {
    max-width: 720px;
}
.cta h2 {
    font-size: 22px;
    font-weight: 700;
}
.cta p {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text-muted);
}
/* Footer */
.site-footer {
    padding-top: 128px;
}
.footer-bar {
    margin-top: 64px;
    border-top: 1px solid rgba(126, 195, 243, 0.1);
    padding-top: 22px;
    padding-bottom: 22px;
    display: flex;
    gap: 12px 20px;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-faint);
}
.footer-links {
    display: flex;
    gap: 8px 20px;
    flex-wrap: wrap;
}

/* Live view */
.live {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.live-header {
    position: relative;
    padding: 6px var(--bar-edge);
    display: flex;
    align-items: center;
    gap: 10px 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(126, 195, 243, 0.1);
}
.live-header .brand {
    font-size: 18px;
}
.live-header .brand img {
    width: 30px;
    height: 30px;
}
.live-header .live-pill {
    background: var(--surface);
    font-size: 12px;
}
/* The views take a row of their own below brand and actions; on a wide screen everything fits in one row */
.live-tabs {
    flex: 1 1 100%;
    margin-left: -14px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
@media (min-width: 1700px) {
    .live-tabs {
        flex-basis: auto;
        order: 1;
        margin-left: 8px;
    }
    .live-actions {
        order: 2;
    }
}
.live-tabs button {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font: 15px var(--body);
    cursor: pointer;
}
.live-tabs button[aria-pressed='true'] {
    background: var(--surface-active);
    color: var(--link-hover);
    font-weight: 700;
}
.live-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.live-actions {
    align-items: center;
}
.live-actions .btn {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
}
.live-main {
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px var(--bar-edge);
}
/* The visualization always takes the full width, the description lies below it in a row.
   This holds on every screen width, so a dialog of the visualization always opens in view. */
.live-stage {
    position: relative;
    flex: 1 1 100%;
    min-width: 0;
    min-height: min(82vh, 960px);
    display: flex;
    background: var(--bg-deep);
    border-radius: 16px;
    box-shadow: var(--edge);
    overflow: hidden;
}
.live-stage iframe {
    flex: 1;
    width: 100%;
    border: 0;
    background: var(--bg-deep);
}
/* Stands over the live view until it shows something */
.live-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    transition: opacity 200ms ease;
}
.live-loading.is-done {
    opacity: 0;
    pointer-events: none;
}
.live-loading img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0.45;
}
.live-loading-note {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 10px;
    background: rgba(8, 11, 28, 0.88);
    font-size: 15px;
}
.spinner {
    flex: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--line-strong);
    border-top-color: var(--link);
    border-radius: 50%;
    animation: spin 900ms linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    .spinner,
    .dot {
        animation: none;
    }
    .live-loading {
        transition: none;
    }
}
.live-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px;
    text-align: center;
}
.live-message h2 {
    font-size: 20px;
    font-weight: 700;
}
.live-message p {
    max-width: 480px;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text-muted);
}
.live-message img {
    max-width: 100%;
    max-height: 50vh;
    border-radius: 10px;
}
.live-side {
    flex: 1 1 100%;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
}
.live-side > * {
    flex: 1 1 340px;
}
.live-side > a,
.live-side > .btn {
    flex: 0 1 340px;
}
.live-side section {
    padding: var(--tile-pad);
}
/* Label and title on the left, the action (download or guide) on the right; on a narrow screen it goes below */
.side-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 32px;
    /* a clear gap between the head and the text (it collapses with the 16px above the description) */
    margin-bottom: 32px;
}
.side-head > div {
    min-width: 0;
}
.side-head .side-action {
    flex: 0 0 auto;
    gap: 24px;
}
.side-label {
    font: 13px var(--display);
    color: var(--accent);
}
.live-side h1 {
    margin-top: 8px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    overflow-wrap: anywhere;
}
/* The description keeps its line breaks and flows in columns below the visualization */
.live-side section > p:not(.side-label):not(.side-note) {
    margin-top: 16px;
    white-space: pre-line;
    columns: 3 300px;
    column-gap: 40px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-muted);
}
.live-side section > p a {
    color: var(--link);
    overflow-wrap: anywhere;
}
.live-side section > p a:hover {
    color: var(--link-hover);
}
.side-note {
    margin: 16px 0 8px;
    font-size: 13px;
    color: var(--text-faint);
}
.btn-row {
    display: flex;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 16px;
    font-size: 13px;
}


.status {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.55;
}

/* Dialog "Projekt herunterladen" */
.setup-dialog {
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 28px 32px;
    border: 0;
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--edge-strong), 0 30px 80px rgba(0, 0, 0, 0.6);
}
.setup-dialog::backdrop { background: rgba(3, 6, 18, 0.72); backdrop-filter: blur(3px); }
.setup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.setup-head h2 { margin-top: 6px; font-size: 24px; line-height: 1.25; }
.setup-close { flex: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--surface-muted); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.setup-close:hover { background: var(--surface-active); }
.setup-intro { margin-top: 16px; color: var(--text-muted); font-size: 16px; line-height: 1.5; }
.setup-files { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.setup-steps { margin: 24px 0 0; padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 18px; }
.setup-steps > li { position: relative; padding-left: 48px; counter-increment: step; }
.setup-steps > li::before {
    content: counter(step);
    position: absolute; left: 0; top: -2px;
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.setup-steps h3 { font-size: 17px; line-height: 1.3; }
.setup-steps p { margin-top: 6px; color: var(--text-muted); font-size: 15px; line-height: 1.5; }
.setup-steps ul { margin: 6px 0 0 18px; }
.setup-steps ul li { margin-top: 4px; }
.setup-steps b { color: var(--text); font-weight: 600; }
.setup-hint { margin-top: 22px; padding: 12px 14px; border-radius: 10px; background: var(--surface-muted); color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.setup-more { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--accent); font-size: 15px; text-decoration: none; }
.setup-more:hover { text-decoration: underline; }
@media (max-width: 599px) { .setup-dialog { padding: 20px 18px; } .setup-steps > li { padding-left: 40px; } }
