/* ══ The Playground home (/): start ══
 * views/home.ejs with homeNext, after home.css. Everything here is under .st-home-next, so today's home is untouched.
 * The look: ink outlines and offset shadows, bright bands (lilac, sun, mint), a dotted hero, and heavy Outfit
 * headings. The hero is new (who it's for, the title that builds in, a picture for each); the code pad and every
 * section below keep their ids, words and scripts, restyled. public/js/home-next.js runs the switch and the title. */

.st-home-next {
    --hn-ink: #17131f;
    --hn-muted: #4f4a60;
    --hn-brand: #7c3aed;
    --hn-brand-deep: #5b21b6;
    --hn-y: #ffe234;
    --hn-lilac: #efe8ff;
    --hn-mint: #d6f5e3;
    --hn-sun: #fff2a1;
    --hn-sky: #dbeaff;
    --hn-rose: #ffe1ec;
    --hn-disp: "Outfit", var(--st-font-display, system-ui), sans-serif;
    --hn-mono: "IBM Plex Mono", var(--st-font-mono, ui-monospace), monospace;
    background: #fff;
}

/* The bolt dividers between sections, and the blueprint lines down the page, give way to the bands' own edges. */
.st-home-next .st-divider,
.st-home-next .st-outline-v {
    display: none;
}

/* ── Hero ── */

/* The dots run under the hero and the frameworks below it, one ground with no line between them; every later
   section paints its own band over them. */
.st-home-next .st-home {
    background: radial-gradient(circle at 1px 1px, rgba(23, 19, 31, 0.13) 1px, transparent 1.5px) 0 0 / 22px 22px, #fff;
}

.st-home-next .hn-hero {
    min-height: 0;
    padding: 40px 0 28px;
    background: transparent;
}

/* display: block undoes site-layout.css's two-column grid for today's hero from 1,600 px, which would put this whole
   hero in one half of the frame. */
.st-home-next .hn-hero .st-hero-inner {
    display: block;
    max-width: none;
    text-align: left;
}

.hn-grid {
    display: grid;
    gap: 44px;
    align-items: center;
}

.hn-grid > * {
    min-width: 0;
}

@media (min-width: 980px) {
    .st-home-next .hn-hero {
        padding: 64px 0 40px;
    }

    .hn-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 56px;
    }

    /* The pad is half as wide as on today's home: narrower language and image chips leave the file name room. */
    .st-home-next .hn-art .st-hero-lang,
    .st-home-next .hn-art .st-hero-pad-top.is-compact .st-hero-lang {
        flex: 0 1 150px;
        width: auto;
        max-width: none;
    }

    .st-home-next .hn-art .st-hero-docker {
        flex: 0 1 222px;
        width: auto;
        max-width: none;
    }

    .st-home-next .hn-art .st-hero-filename {
        min-width: 96px;
    }

    .st-home-next .hn-art .st-hero-pad-top.is-compact .st-hero-filename {
        max-width: none;
    }
}

/* Who it's for */
.hn-aud {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px;
    border: 2px solid var(--hn-ink);
    border-radius: 14px;
    background: #fff;
    box-shadow: 3px 3px 0 var(--hn-ink);
}

/* Four audiences: one row where they fit, else two by two, never three and one. */
@media (min-width: 980px) and (max-width: 1279px) {
    .hn-aud {
        display: inline-grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hn-hero:lang(es) .hn-aud,
.hn-hero:lang(pt) .hn-aud {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hn-aud button {
    min-height: 44px;
    padding: 8px 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--hn-ink);
    font: 700 14px var(--st-font-body, "DM Sans"), system-ui, sans-serif;
    cursor: pointer;
}

.hn-aud button:hover {
    background: var(--hn-lilac);
}

.hn-aud button[aria-pressed="true"] {
    background: var(--hn-ink);
    color: #fff;
}

.hn-aud button:focus-visible,
.hn-btn:focus-visible {
    outline: 3px solid var(--hn-brand);
    outline-offset: 2px;
}

/* Striqr's own line, word for word, over every audience's title. */
.hn-kicker {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 22px 0 0;
    font: 700 13.5px/1.35 var(--hn-mono);
    letter-spacing: 0.01em;
    color: var(--hn-brand-deep);
    text-wrap: balance;
}

.hn-kicker svg {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    color: var(--hn-brand);
}

/* The title: the chosen audience's, typed in (public/js/home-next.js), the second line on a yellow highlighter. */
.hn-title {
    position: relative;
    margin: 10px 0 0;
    font-family: var(--hn-disp);
    font-size: clamp(38px, 3.9vw, 54px);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.03em;
    color: var(--hn-ink);
    text-wrap: balance;
}

.hn-title-line {
    display: block;
}

/* Each word, character and space is its own span, all inline, so the lines wrap where the plain title's do. */
.hn-word {
    white-space: nowrap;
}

/* One highlighter stroke under the whole line (a span around its words), broken cleanly where the line wraps. */
.hn-mark {
    background: linear-gradient(var(--hn-y), var(--hn-y)) no-repeat 0 88% / 100% 0.86em;
    border-radius: 0.14em;
    padding: 0 0.08em;
    margin: 0 -0.08em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* While it's typed (is-typing), every character holds its place from the start, hidden until it's typed (is-on), so
   nothing moves. The highlighter comes once the second line is typed (is-marked). */
.hn-title.is-typing .hn-ch {
    visibility: hidden;
}

.hn-title.is-typing .hn-ch.is-on {
    visibility: visible;
}

/* It sweeps in, and goes at once when a switch starts deleting. */
.hn-title.is-typing .hn-mark {
    background-size: 0% 0.86em;
}

.hn-title.is-typing .hn-mark.is-marked {
    background-size: 100% 0.86em;
    transition: background-size 0.32s cubic-bezier(0.6, 0, 0.2, 1);
}

/* The caret: the brand's bar after the last character typed, or before the first while none is. One bar, out of the
   title's text (public/js/home-next.js moves it, with a transform, to the character it follows): any box among the
   letters, even one that takes no room, let Chrome's balanced wrapping move a word to the next line and back as the
   caret moved. It blinks a few times once the title is typed, then goes. */
.hn-caret {
    position: absolute;
    left: 0;
    top: 0;
    display: none;
    width: 0.075em;
    margin-left: 0.03em;
    border-radius: 2px;
    background: var(--hn-brand);
    pointer-events: none;
}

.hn-caret.is-on {
    display: block;
}

.hn-title.is-blink .hn-caret {
    animation: hn-caret-blink 0.8s steps(1, end) 3 forwards;
}

@keyframes hn-caret-blink {
    50%,
    to {
        opacity: 0;
    }
}

.hn-lead {
    max-width: 36rem;
    margin: 22px 0 0;
    font-size: 18.5px;
    line-height: 1.55;
    color: var(--hn-muted);
}

.hn-lead strong {
    color: var(--hn-ink);
}

/* Only the words for who it's for. */
.hn-hero [data-for] {
    display: none !important;
}

.hn-hero[data-aud="share"] [data-for="share"],
.hn-hero[data-aud="learn"] [data-for="learn"],
.hn-hero[data-aud="teach"] [data-for="teach"],
.hn-hero[data-aud="discord"] [data-for="discord"] {
    display: revert !important;
}

.hn-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hn-hero[data-aud] .hn-ctas [data-for] {
    display: none !important;
}

.hn-hero[data-aud="share"] .hn-ctas [data-for="share"],
.hn-hero[data-aud="learn"] .hn-ctas [data-for="learn"],
.hn-hero[data-aud="teach"] .hn-ctas [data-for="teach"],
.hn-hero[data-aud="discord"] .hn-ctas [data-for="discord"] {
    display: inline-flex !important;
}

.hn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 2px solid var(--hn-ink);
    border-radius: 14px;
    background: #fff;
    box-shadow: 4px 4px 0 var(--hn-ink);
    color: var(--hn-ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.hn-btn--pri {
    background: var(--hn-brand);
    color: #fff;
}

.hn-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 var(--hn-ink);
}

.hn-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--hn-ink);
}

.hn-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--hn-muted);
}

.hn-hero[data-aud="share"] .hn-proof [data-for="share"],
.hn-hero[data-aud="learn"] .hn-proof [data-for="learn"],
.hn-hero[data-aud="teach"] .hn-proof [data-for="teach"],
.hn-hero[data-aud="discord"] .hn-proof [data-for="discord"] {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
}

.hn-proof li::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hn-brand);
}

/* ── The picture beside the words: the pad (sharing's and learning's), the class, or the Discord channel ── */

.hn-art {
    position: relative;
}

.hn-art-item {
    display: none;
    position: relative;
}

.hn-hero[data-aud="share"] .hn-art-item[data-art~="share"],
.hn-hero[data-aud="learn"] .hn-art-item[data-art~="learn"],
.hn-hero[data-aud="teach"] .hn-art-item[data-art~="teach"],
.hn-hero[data-aud="discord"] .hn-art-item[data-art~="discord"] {
    display: block;
}

.hn-art-item.is-swapping {
    animation: hn-art-in 0.55s cubic-bezier(0.3, 1.3, 0.4, 1) both;
}

.hn-art-item.is-swapping .hn-sticker {
    animation: hn-pop 0.5s cubic-bezier(0.3, 1.5, 0.4, 1) both;
    animation-delay: var(--d, 0.3s);
}

@keyframes hn-art-in {
    from {
        opacity: 0;
        transform: translateY(16px) rotate(-2deg);
    }
}

.hn-sticker {
    position: absolute;
    z-index: 8;
    padding: 7px 12px;
    border: 2px solid var(--hn-ink);
    border-radius: 12px;
    box-shadow: 3px 3px 0 var(--hn-ink);
    font: 800 14px var(--hn-disp);
    color: var(--hn-ink);
    white-space: nowrap;
    pointer-events: none;
    transform: rotate(var(--r, 0deg));
    animation: hn-pop 0.6s cubic-bezier(0.3, 1.6, 0.4, 1) both;
    animation-delay: var(--d, 0.9s);
}

.hn-sticker--y { background: var(--hn-y); }
.hn-sticker--m { background: var(--hn-mint); }
.hn-sticker--l { background: var(--hn-lilac); }
.hn-sticker--s { background: var(--hn-sky); }

@keyframes hn-pop {
    from {
        opacity: 0;
        transform: scale(0.2) rotate(-20deg);
    }
}

/* "I'm sharing": the link the pad makes, under it; a phone that opened it, at its side; a sticker. A picture only
   (partials/home-next-share.ejs): no piece takes a click, and none covers the pad's buttons or its first lines. */
.hn-share {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
}

.hn-share-link {
    position: absolute;
    left: -28px;
    top: calc(100% - 6px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, 78%);
    box-sizing: border-box;
    padding: 14px 16px;
    border: 2px solid var(--hn-ink);
    border-radius: 16px;
    background: #fff;
    box-shadow: 6px 6px 0 var(--hn-ink);
    transform: rotate(-1deg);
    animation: hn-pop 0.6s cubic-bezier(0.3, 1.5, 0.4, 1) 0.5s both;
}

.hn-share-ok {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #15803d;
}

.hn-share svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hn-share-ok svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.8;
}

.hn-share-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hn-share-url {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 7px 12px;
    border: 2px solid var(--hn-ink);
    border-radius: 999px;
    background: #f7f5fc;
    font: 500 13px var(--hn-mono);
    color: var(--hn-ink);
}

.hn-share-url span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hn-share-copy {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
    border: 2px solid var(--hn-ink);
    border-radius: 999px;
    background: var(--hn-y);
    box-shadow: 2px 2px 0 var(--hn-ink);
    font-size: 14px;
    font-weight: 700;
    color: var(--hn-ink);
}

/* The phone: what the pad's example makes (a gold page with its heading and button), opened from the link. It sits
   over the pad's right edge, between its top bar and Launch, and goes where there's room beside the pad: two columns
   only, and not where the frame's edge is too near. */
.hn-share-phone {
    position: absolute;
    right: -58px;
    top: 70px;
    width: 128px;
    height: 236px;
    box-sizing: border-box;
    padding: 7px;
    border: 2px solid var(--hn-ink);
    border-radius: 24px;
    background: var(--hn-ink);
    box-shadow: 6px 6px 0 var(--hn-brand);
    transform: rotate(4deg);
    animation: hn-phone-in 0.7s cubic-bezier(0.3, 1.4, 0.4, 1) 0.65s both;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes hn-phone-in {
    from {
        opacity: 0;
        transform: translateY(24px) rotate(10deg);
    }
}

.hn-share-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 17px;
    background: #ffd700;
    color: #000;
}

.hn-share-bar {
    padding: 13px 8px 6px;
    border-bottom: 1.5px solid var(--hn-ink);
    background: #fff;
    font: 9px var(--hn-mono);
    text-align: center;
    white-space: nowrap;
}

.hn-share-h {
    padding: 14px 11px 8px;
    font: 700 17px/1.15 Georgia, "Times New Roman", serif;
}

.hn-share-press {
    align-self: flex-start;
    margin: 0 11px;
    padding: 2px 7px;
    border: 1px solid #767676;
    border-radius: 3px;
    background: #f0f0f0;
    font: 11px system-ui, sans-serif;
}

.hn-share-sticker {
    right: 22px;
    top: 214px;
    --r: -4deg;
    --d: 0.85s;
}

@media (max-width: 1279px) {
    .hn-share-phone {
        display: none;
    }

    /* Over the pad's top edge, clear of its controls. */
    .hn-share-sticker {
        top: -38px;
        right: 28px;
    }
}

/* Room under the pad for the link, so it never reaches the frameworks row. */
.hn-hero[data-aud="share"] .hn-art-item[data-art~="share"] {
    margin-bottom: 92px;
}

/* While the pad is in use (the focus is in it, or it holds code), the phone steps aside, so nothing covers what is
   typed. */
.hn-art-item:has(.st-hero-editor:focus-within) .hn-share-phone,
.hn-art-item:has(.st-hero-pad-placeholder[hidden]) .hn-share-phone,
.hn-art-item:has(.st-hero-editor:focus-within) .hn-share-sticker,
.hn-art-item:has(.st-hero-pad-placeholder[hidden]) .hn-share-sticker {
    opacity: 0;
    transform: translateX(24px) rotate(8deg);
}

/* The pad as a card: its chips across the top, the code under them, Launch in the corner. */
.st-home-next .hn-art .st-hero-pad {
    width: 100%;
    margin: 0;
    border: 2px solid var(--hn-ink);
    border-radius: 20px;
    background: #fff;
    box-shadow: 6px 6px 0 var(--hn-ink);
    opacity: 1;
    transform: rotate(0.6deg);
    animation: hn-drop 0.8s cubic-bezier(0.3, 1.3, 0.4, 1) 0.25s both;
}

/* Replaces home.css's st-rise on the pad, so it ends where this page puts it. */
@keyframes hn-drop {
    from {
        opacity: 0;
        transform: translateY(-28px) rotate(-4deg);
    }
    to {
        opacity: 1;
        transform: rotate(0.6deg);
    }
}

.st-home-next .hn-art .st-hero-pad-top {
    margin: 0;
    padding: 12px;
    border-bottom: 2px solid var(--hn-ink);
    border-radius: 18px 18px 0 0;
    background: #fff;
}

.st-home-next .hn-art .st-hero-filename,
.st-home-next .hn-art .st-hero-lang-btn {
    border: 2px solid var(--hn-ink);
    border-radius: 10px;
    box-shadow: 2px 2px 0 var(--hn-ink);
    background: #fff;
}

.st-home-next .hn-art .st-hero-docker-btn {
    justify-content: flex-start;
    padding: 0 10px 0 7px;
    background: var(--hn-mint);
}

/* The chips' focus ring is the page's, where the image drawer gives the focus back too. */
.st-home-next .hn-art .st-hero-lang-btn:focus-visible {
    outline: 3px solid var(--hn-brand);
    outline-offset: 2px;
}

/* A chip's words sit inside its box at every width and in every language: a line each, cut with an ellipsis where
   the chip is narrow. A chip is named by its whole words (the language's are its own; the image's button is named
   "Docker image" and the image, views/home.ejs), and a long image shows whole on hover. */
.st-home-next .hn-art .st-hero-lang-btn {
    gap: 8px;
}

.st-home-next .hn-art .st-hero-lang-copy {
    flex: 1 1 0;
    min-width: 0;
}

.st-home-next .hn-art .st-hero-lang-copy strong,
.st-home-next .hn-art .st-hero-lang-copy small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The image's badge is as far from the chip's edges as from its top and bottom. */
.st-home-next .hn-art .st-hero-docker-logo {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    box-sizing: border-box;
    border: 1.5px solid var(--hn-ink);
    border-radius: 8px;
}

/* "Browse Docker Hub" goes under the image only where it fits whole: the words are a container, and narrower than
   the line needs in the page's language (its letters at 11 px of mono, 0.6 em each, and a pixel) the line goes. */
.st-home-next .hn-art .st-hero-docker-btn .st-hero-lang-copy {
    container: hn-image / inline-size;
}

@container hn-image (max-width: 113.99px) {
    .st-home-next .hn-art .st-hero-lang-copy .st-hero-docker-sub {
        display: none;
    }
}

@container hn-image (max-width: 126.99px) {
    .st-home-next:lang(es) .hn-art .st-hero-lang-copy .st-hero-docker-sub {
        display: none;
    }
}

@container hn-image (max-width: 139.99px) {
    .st-home-next:lang(pt) .hn-art .st-hero-lang-copy .st-hero-docker-sub {
        display: none;
    }
}

.st-home-next .hn-art .st-hero-editor {
    min-height: 268px;
    border: 0;
    border-radius: 0 0 18px 18px;
    background: #fff;
    box-shadow: none;
}

/* Type over the example: the big faint words behind it, the example itself (an HTML pad), and a line saying so.
   The example stays, dimmed, while the empty pad has the focus; typing replaces it. */
.st-home-next .hn-art .st-hero-pad-placeholder {
    padding: 0;
}

/* The box's label (.hn-pad-tab) says what to do, so the faint words today's home writes in the box aren't drawn. */
.st-home-next .hn-art .st-hero-pad-placeholder-text {
    display: none;
}

.st-home-next .hn-pad-example,
.st-home-next .hn-pad-note {
    display: none;
}

.st-home-next .hn-has-example .hn-pad-example {
    display: block;
    position: relative;
    margin: 0;
    padding: 16px 16px 16px 44px;
    font: 12.5px/1.75 var(--hn-mono);
    color: #29243a;
    white-space: pre;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.st-home-next .hn-has-example .hn-pad-note {
    display: block;
    position: absolute;
    left: 16px;
    bottom: 22px;
    right: 130px;
    margin: 0;
    font-size: 13.5px;
    color: var(--hn-muted);
    pointer-events: none;
}

.st-home-next .hn-art .st-hero-pad-placeholder.is-focused {
    pointer-events: none;
}

.st-home-next .hn-art .st-hero-pad-placeholder.is-focused .hn-pad-example {
    opacity: 0.35;
}

/* The code box's label, on its top edge (views/home.ejs): a yellow tab with a pencil, saying what to do. It sits on
   the line under the chips, clear of them and of the box's first line, and steps aside once something is typed. */
.hn-pad-tab-row {
    position: relative;
    z-index: 5;
    height: 0;
}

.hn-pad-tab {
    position: absolute;
    left: 12px;
    top: -10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
    padding: 2px 9px 2px 7px;
    border: 2px solid var(--hn-ink);
    border-radius: 999px;
    background: var(--hn-y);
    box-shadow: 2px 2px 0 var(--hn-ink);
    color: var(--hn-ink);
    font: 700 12px/1.2 var(--st-font-ui, "DM Sans"), system-ui, sans-serif;
    white-space: nowrap;
    pointer-events: none;
    transform: rotate(-1deg);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hn-pad-tab svg {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.st-home-next .st-hero-pad:has(.st-hero-pad-placeholder[hidden]) .hn-pad-tab {
    opacity: 0;
    transform: translateY(-6px) rotate(-1deg);
}

/* A caret where typing goes (the first line's start, where the real one sits on focus), while the box waits for its
   first key: it blinks four times once the pad is in, then holds; the focus hides it, the real caret taking over. */
.st-home-next .hn-pad-caret {
    display: none;
}

.st-home-next .hn-art .hn-pad-caret {
    position: absolute;
    left: 41px;
    top: 14px;
    display: block;
    width: 2px;
    height: 2em;
    border-radius: 1px;
    background: var(--hn-brand);
    font-size: 12.5px;
    pointer-events: none;
    animation: hn-pad-blink 1.1s steps(1, end) 1.2s 4;
}

.st-home-next .hn-art .st-hero-pad-placeholder.is-focused .hn-pad-caret {
    display: none;
}

@keyframes hn-pad-blink {
    50% {
        opacity: 0;
    }
}

.st-home-next .hn-art .st-hero-editor:focus-within {
    outline: 3px solid var(--hn-y);
    outline-offset: -3px;
}

.st-home-next .hn-art .st-hero-launch,
.st-home-next .hn-art .st-hero-clear {
    border: 2px solid var(--hn-ink);
    border-radius: 12px;
    box-shadow: 3px 3px 0 var(--hn-ink);
}

/* Launch lights up as soon as there is code of someone's own to run: a yellow ring round it, and one pulse. */
.st-home-next .hn-art .st-hero-editor:has(.st-hero-pad-placeholder[hidden]) .st-hero-launch {
    box-shadow: 0 0 0 3px var(--hn-y), 0 0 0 5px var(--hn-ink), 4px 4px 0 5px var(--hn-ink);
}

.st-home-next .hn-art .st-hero-launch::after {
    content: "";
    position: absolute;
    inset: -2px;
    border: 3px solid var(--hn-brand);
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
}

.st-home-next .hn-art .st-hero-editor:has(.st-hero-pad-placeholder[hidden]) .st-hero-launch::after {
    animation: hn-launch-pulse 0.9s ease-out 1;
}

@keyframes hn-launch-pulse {
    from {
        opacity: 0.9;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.3, 1.55);
    }
}

/* ── The image picker the image chip opens (views/partials/docker-picker.ejs, public/js/docker-hub-picker.js) ──
   On this page it is a modal dialog in the Playground look: a white card with an ink edge and a hard shadow at the
   right of the screen, a lilac head with its title and a 44 px close, the warning as a sun note, the kit's search box,
   and each image a card that is a button. On phones it is a sheet from the bottom. Everything here is under
   .st-home-next: the editor's own picker (views/loader.ejs, loader.css) and today's home are untouched. */
.st-home-next .si-docker-overlay {
    background: rgba(23, 19, 31, 0.5);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.st-home-next .si-docker-drawer {
    top: 16px;
    right: 16px;
    bottom: 16px;
    width: min(440px, calc(100vw - 32px));
    box-sizing: border-box;
    overflow: hidden;
    border: 2px solid var(--hn-ink);
    border-radius: 20px;
    background: #fff;
    box-shadow: 6px 6px 0 var(--hn-ink);
    color: var(--hn-ink);
    font-family: var(--st-font-ui, "DM Sans"), system-ui, sans-serif;
    transform: translateX(calc(100% + 40px));
}

.st-home-next .si-docker-drawer[hidden] {
    transform: translateX(calc(100% + 40px)) !important;
}

.st-home-next .si-docker-drawer *,
.st-home-next .si-docker-drawer *::before,
.st-home-next .si-docker-drawer *::after {
    box-sizing: border-box;
}

/* The dialog itself takes the focus on a touch screen (so the keyboard stays closed): no ring for that. */
.st-home-next .si-docker-drawer:focus {
    outline: none;
}

.st-home-next .si-docker-drawer :focus-visible {
    outline: 3px solid var(--hn-brand);
    outline-offset: 2px;
}

.st-home-next .si-docker-drawer .si-side-drawer-head {
    align-items: center;
    gap: 12px;
    padding: 16px 16px 16px 20px;
    border-bottom: 2px solid var(--hn-ink);
    background: var(--hn-lilac);
}

.st-home-next .si-docker-drawer .si-side-drawer-title {
    margin: 0;
    font: 900 24px/1.1 var(--hn-disp);
    letter-spacing: -0.02em;
    color: var(--hn-ink);
    overflow-wrap: anywhere;
}

.st-home-next .si-docker-drawer .si-side-drawer-sub {
    margin: 5px 0 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--hn-muted);
}

.st-home-next .si-docker-drawer .st-modal-close,
.st-home-next .si-docker-drawer .si-docker-back {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 2px solid var(--hn-ink);
    border-radius: 11px;
    background: #fff;
    box-shadow: 3px 3px 0 var(--hn-ink);
    color: var(--hn-ink);
    cursor: pointer;
}

.st-home-next .si-docker-drawer .st-modal-close:hover,
.st-home-next .si-docker-drawer .si-docker-back:hover {
    background: var(--hn-sun);
    color: var(--hn-ink);
    border-color: var(--hn-ink);
}

.st-home-next .si-docker-drawer .st-modal-close:active,
.st-home-next .si-docker-drawer .si-docker-back:active {
    box-shadow: 1px 1px 0 var(--hn-ink);
    transform: translate(2px, 2px);
}

.st-home-next .si-docker-drawer .st-modal-close svg,
.st-home-next .si-docker-drawer .si-docker-back svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.4;
}

.st-home-next .si-docker-drawer-notice {
    flex: 0 0 auto;
    margin: 16px 18px 0;
    padding: 10px 12px;
    border: 2px solid var(--hn-ink);
    border-radius: 12px;
    background: var(--hn-sun);
    color: var(--hn-ink);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
}

.st-home-next .si-docker-search-wrap {
    flex: 0 0 auto;
    padding: 14px 18px 10px;
}

.st-home-next .si-docker-search-icon {
    left: 32px;
    top: 38px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--hn-ink);
}

.st-home-next .si-docker-search {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 14px 10px 42px;
    border: 2px solid var(--hn-ink);
    border-radius: 14px;
    background: #fff;
    box-shadow: 3px 3px 0 var(--hn-ink);
    color: var(--hn-ink);
    font: 500 16px/1.4 var(--st-font-ui, "DM Sans"), system-ui, sans-serif;
}

.st-home-next .si-docker-search::placeholder {
    color: var(--lk-faint, #736d85);
}

.st-home-next .si-docker-search:focus {
    border-color: var(--hn-ink);
    box-shadow: 3px 3px 0 var(--hn-ink);
    outline: 3px solid var(--hn-brand);
    outline-offset: 2px;
}

.st-home-next .si-docker-status {
    flex: 0 0 auto;
    padding: 2px 20px 6px;
    font: 600 12px/1.4 var(--hn-mono);
    color: var(--hn-muted);
}

.st-home-next .si-docker-status:empty {
    display: none;
}

.st-home-next .si-docker-repo-banner {
    flex: 0 0 auto;
    margin: 4px 18px 8px;
    padding: 12px 14px;
    border: 2px solid var(--hn-ink);
    border-radius: 14px;
    background: var(--hn-sky);
}

.st-home-next .si-docker-repo-banner-copy strong {
    font: 700 13.5px var(--hn-mono);
    color: var(--hn-ink);
}

.st-home-next .si-docker-repo-banner-copy span {
    font-size: 13px;
    color: var(--hn-muted);
}

/* The list scrolls inside the dialog, never the page behind it. */
.st-home-next .si-docker-drawer .si-docker-list {
    padding: 6px 18px 18px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.st-home-next .si-docker-drawer .si-docker-section-label {
    margin: 14px 0 8px;
    padding: 0;
    font: 700 12px/1.3 var(--hn-mono);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hn-muted);
}

.st-home-next .si-docker-drawer .si-docker-section-label:first-child {
    margin-top: 4px;
}

/* Each image: the list item holds one button, the card. */
.st-home-next .si-docker-drawer .si-hub-card {
    display: block;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    cursor: auto;
}

.st-home-next .si-docker-drawer .si-hub-card:hover,
.st-home-next .si-docker-drawer .si-hub-card.is-selected {
    border: 0;
    background: none;
}

.st-home-next .si-hub-pick {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 2px solid var(--hn-ink);
    border-radius: 14px;
    background: #fff;
    color: var(--hn-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.st-home-next .si-hub-pick:hover {
    background: var(--hn-lilac);
    box-shadow: 3px 3px 0 var(--hn-ink);
    transform: translate(-1px, -1px);
}

.st-home-next .si-hub-pick:active {
    box-shadow: 1px 1px 0 var(--hn-ink);
    transform: translate(1px, 1px);
}

/* The image the pad has now: filled sun, its badge saying Current. */
.st-home-next .si-hub-pick[aria-current="true"] {
    background: var(--hn-sun);
    box-shadow: 3px 3px 0 var(--hn-ink);
}

.st-home-next .si-hub-pick .si-hub-logo {
    width: 40px;
    height: 40px;
    border: 2px solid var(--hn-ink);
    border-radius: 10px;
}

.st-home-next .si-hub-pick .si-hub-card-title-row {
    align-items: flex-start;
}

.st-home-next .si-hub-pick .si-hub-card-title {
    padding-top: 2px;
    font: 700 13.5px/1.35 var(--hn-mono);
    color: var(--hn-ink);
}

.st-home-next .si-hub-pick .si-hub-card-badge {
    padding: 2px 8px;
    border: 1.5px solid var(--hn-ink);
    border-radius: 999px;
    background: var(--hn-lilac);
    color: var(--hn-ink);
    font: 700 11.5px/1.3 var(--st-font-ui, "DM Sans"), system-ui, sans-serif;
    letter-spacing: 0;
    text-transform: none;
}

.st-home-next .si-hub-pick .si-hub-card-badge--official {
    background: var(--hn-mint);
}

.st-home-next .si-hub-pick[aria-current="true"] .si-hub-card-badge {
    background: var(--hn-y);
}

.st-home-next .si-hub-pick .si-hub-card-desc {
    margin: 4px 0 0;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--hn-muted);
}

.st-home-next .si-docker-drawer .si-hub-empty {
    margin: 4px 0;
    padding: 22px 14px;
    border: 2px dashed var(--lk-line-soft, #d9d3e8);
    border-radius: 14px;
    font-size: 14px;
    color: var(--hn-muted);
}

.st-home-next .si-docker-drawer-foot {
    flex: 0 0 auto;
    padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 2px solid var(--hn-ink);
}

.st-home-next .si-docker-drawer-foot:has(> .si-docker-load-more[hidden]) {
    display: none;
}

.st-home-next .si-docker-load-more {
    width: 100%;
    min-height: 48px;
    border: 2px solid var(--hn-ink);
    border-radius: 14px;
    background: #fff;
    box-shadow: 3px 3px 0 var(--hn-ink);
    color: var(--hn-ink);
    font: 700 15px var(--st-font-ui, "DM Sans"), system-ui, sans-serif;
}

.st-home-next .si-docker-load-more:hover {
    background: var(--hn-lilac);
}

/* Phones: a sheet from the bottom, most of the screen tall, the page's top still showing above it. */
@media (max-width: 640px) {
    .st-home-next .si-docker-drawer {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        height: 88vh;
        height: min(88dvh, 780px);
        border-bottom: 0;
        border-radius: 22px 22px 0 0;
        box-shadow: none;
        transform: translateY(calc(100% + 12px));
    }

    .st-home-next .si-docker-drawer[hidden] {
        transform: translateY(calc(100% + 12px)) !important;
    }

    .st-home-next .si-docker-drawer .si-side-drawer-head {
        padding: 14px 14px 14px 16px;
    }

    .st-home-next .si-docker-drawer .si-side-drawer-title {
        font-size: 22px;
    }

    .st-home-next .si-docker-drawer-notice {
        margin: 12px 14px 0;
    }

    .st-home-next .si-docker-search-wrap {
        padding: 12px 14px 8px;
    }

    .st-home-next .si-docker-search-icon {
        left: 28px;
        top: 36px;
    }

    .st-home-next .si-docker-status {
        padding: 2px 16px 6px;
    }

    .st-home-next .si-docker-drawer .si-docker-list {
        padding: 4px 14px 16px;
    }

    .st-home-next .si-docker-drawer-foot {
        padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    }
}

/* "I'm learning": three starters, each shown running (partials/home-next-learn.ejs). Each card is a button; the rest
   of it is a picture. The picture is a container its layout follows: narrower than 400 px the cards stack, each picture
   beside its words; from 400 px they fan out, the game in front. In the fan every size is a share of the picture's
   width (cqw; the mockup's are at 576 px), so it keeps its look from a laptop to a big monitor, and the words on the
   buttons never go under 13 px. */
.hn-learn {
    position: relative;
    container: hn-learn / inline-size;
}

.hn-learn-set {
    display: grid;
    gap: 16px;
    padding: 24px 0 8px;
}

/* .st-stack-chip (the website's, for dashboard.js) sets most of these too, so they are all set again here. */
.hn-learn .hn-start {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
    grid-template-areas: "shot foot";
    flex: none;
    gap: 0;
    align-items: stretch;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid var(--hn-ink);
    border-radius: 16px;
    background: #fff;
    box-shadow: 4px 4px 0 var(--hn-ink);
    color: var(--hn-ink);
    font: 500 14px/1.3 var(--st-font-body, "DM Sans"), system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
    rotate: var(--tilt, 0deg);
    transition: translate 0.12s ease, box-shadow 0.12s ease;
    animation: hn-deal 0.55s cubic-bezier(0.3, 1.3, 0.4, 1) backwards;
    animation-delay: var(--deal, 0.3s);
}

.hn-learn .hn-start--game {
    --tilt: -1deg;
    --deal: 0.25s;
}

.hn-learn .hn-start--quiz {
    --tilt: 0.8deg;
    --deal: 0.35s;
}

.hn-learn .hn-start--site {
    --tilt: -0.6deg;
    --deal: 0.45s;
}

@keyframes hn-deal {
    from {
        opacity: 0;
        translate: 0 22px;
    }
}

/* Dealt in on load; on a switch the whole picture comes in at once (is-swapping), the cards with it. */
.hn-art-item.is-swapping .hn-learn .hn-start {
    animation: none;
}

.hn-learn .hn-start:hover {
    translate: -1px -1px;
    box-shadow: 6px 6px 0 var(--hn-ink);
}

.hn-learn .hn-start:active {
    translate: 2px 2px;
    box-shadow: 2px 2px 0 var(--hn-ink);
}

.hn-learn .hn-start:focus-visible {
    outline: 3px solid var(--hn-brand);
    outline-offset: 3px;
    border-radius: 16px;
}

.hn-learn .hn-start.is-loading {
    opacity: 0.7;
    cursor: progress;
}

.hn-start-top {
    display: none;
}

.hn-start-shot {
    grid-area: shot;
    position: relative;
    display: block;
    overflow: hidden;
    border-right: 2px solid var(--hn-ink);
}

.hn-start-shot img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 16%;
}

.hn-start-foot {
    grid-area: foot;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    padding: 12px;
}

.hn-start-pill {
    max-width: 100%;
    box-sizing: border-box;
    padding: 2px 7px;
    border: 1.5px solid var(--hn-ink);
    border-radius: 999px;
    background: var(--hn-lilac);
    font: 600 11px/1.3 var(--hn-mono);
}

.hn-start--game .hn-start-pill { background: var(--hn-mint); }
.hn-start--site .hn-start-pill { background: var(--hn-sky); }

.hn-start-name {
    font: 800 20px/1.1 var(--hn-disp);
}

.hn-start-go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    box-sizing: border-box;
    margin-top: 2px;
    padding: 0 14px;
    border: 2px solid var(--hn-ink);
    border-radius: 10px;
    background: #fff;
    box-shadow: 2px 2px 0 var(--hn-ink);
    font: 700 14px/1.1 var(--st-font-body, "DM Sans"), system-ui, sans-serif;
    white-space: nowrap;
}

.hn-start--game .hn-start-go {
    background: var(--hn-brand);
    color: #fff;
}

.hn-start-go svg {
    flex: none;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* The quiz, run: what it printed, the answers typed in on yellow. Its words are quiz.py's own. Stacked on a 320 px
   phone its column is about 110 px wide, so the words get a little smaller there and the longest line ("Not quite.
   It's 56.") is never cut off (10 px where container units aren't known). */
.hn-quiz {
    padding: 10px;
    padding: min(10px, 3cqw);
    background: var(--hn-ink);
    color: #ddd6f3;
    font: 500 10px/1.6 var(--hn-mono);
    font-size: min(10px, 3.1cqw);
    white-space: nowrap;
}

.hn-quiz > span {
    display: block;
}

.hn-quiz b {
    padding: 0 0.3em;
    border-radius: 3px;
    background: var(--hn-y);
    color: var(--hn-ink);
    font-weight: 600;
}

.hn-quiz em {
    color: #86efac;
    font-style: normal;
    font-weight: 600;
}

.hn-quiz-caret {
    display: inline-block;
    width: 0.58em;
    height: 1.15em;
    margin-left: 0.25em;
    vertical-align: -0.2em;
    background: var(--hn-y);
    animation: hn-quiz-blink 1.1s steps(1, end) 4;
}

@keyframes hn-quiz-blink {
    50% {
        opacity: 0;
    }
}

/* A first website, opened. */
.hn-site {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: #fff7d6;
    color: #000;
    font-family: Georgia, "Times New Roman", serif;
}

.hn-site-h {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
}

.hn-site-p {
    font-size: 10.5px;
    line-height: 1.35;
}

.hn-site-art {
    display: flex;
    gap: 4px;
}

.hn-site-art i {
    width: 24px;
    height: 24px;
    box-sizing: border-box;
    border: 1.5px solid var(--hn-ink);
    border-radius: 5px;
    background: #93c5fd;
}

.hn-site-art i:nth-child(2) { background: #f9a8d4; }
.hn-site-art i:nth-child(3) { background: #86efac; }

.hn-site-cap {
    font-size: 10px;
    color: #374151;
}

.hn-site-btn {
    align-self: flex-start;
    padding: 2px 7px;
    border: 1px solid #767676;
    border-radius: 3px;
    background: #f0f0f0;
    font: 10.5px system-ui, sans-serif;
}

.hn-learn-sticker--a {
    right: 14px;
    top: -8px;
    --r: -4deg;
    --d: 0.7s;
}

.hn-learn-sticker--b {
    left: 8px;
    bottom: -14px;
    --r: 3deg;
    --d: 0.85s;
}

/* A pointer on Play it, just past its words, in the fan only. */
.hn-start-go .hn-learn-pointer {
    display: none;
}

/* The fan: the quiz on the left, the website on the right, the game over both. The mockup's sizes, as shares of the
   picture's 576 px; the game's picture and the cards' tops a little shorter, so the picture is as tall as sharing's
   pad and its link. The three share one grid cell, each moved to its place, so the picture is as tall as its cards
   are (the words on the buttons keep their size where the cards get small), and the sticker under them stays under
   them. */
@container hn-learn (min-width: 400px) {
    .hn-learn-set {
        grid-template-columns: 100%;
        gap: 0;
        padding: 0;
    }

    .hn-learn .hn-start {
        grid-area: 1 / 1;
        align-self: start;
        justify-self: start;
        display: flex;
        flex-direction: column;
        border-radius: 3.125cqw;
        box-shadow: clamp(4px, 0.87cqw, 6px) clamp(4px, 0.87cqw, 6px) 0 var(--hn-ink);
    }

    .hn-learn .hn-start--game {
        z-index: 3;
        width: 40.97cqw;
        margin: 3.82cqw 0 0 29.86cqw;
        border-radius: 3.47cqw;
        box-shadow: clamp(6px, 1.39cqw, 9px) clamp(6px, 1.39cqw, 9px) 0 var(--hn-ink);
        --tilt: 1.5deg;
    }

    .hn-learn .hn-start--quiz {
        z-index: 1;
        width: 34.03cqw;
        margin: 15.28cqw 0 0;
        --tilt: -5deg;
    }

    .hn-learn .hn-start--site {
        z-index: 2;
        width: 34.03cqw;
        margin: 17.36cqw 0 0 65.97cqw;
        --tilt: 5deg;
    }

    .hn-learn .hn-start--game:hover {
        box-shadow: clamp(7px, 1.56cqw, 10px) clamp(7px, 1.56cqw, 10px) 0 var(--hn-ink);
    }

    /* A card behind comes to the front while it's pointed at or has the focus, so its whole face shows. */
    .hn-learn .hn-start:hover,
    .hn-learn .hn-start:focus-visible {
        z-index: 4;
    }

    .hn-learn .hn-start:focus-visible {
        border-radius: 3.125cqw;
    }

    .hn-start-top {
        display: flex;
        align-items: center;
        gap: 1.2cqw;
        padding: 1.56cqw 2.08cqw;
        border-bottom: 2px solid var(--hn-ink);
        background: #f7f5fc;
        font: 600 max(9px, 2.08cqw)/1.2 var(--hn-mono);
        white-space: nowrap;
    }

    .hn-start--game .hn-start-top {
        justify-content: space-between;
    }

    /* The website's left edge sits under the game: its words keep to the right, clear of it. */
    .hn-start--site .hn-start-top {
        padding: 1.39cqw 1.74cqw 1.39cqw 5.2cqw;
    }

    .hn-start--site .hn-start-foot {
        align-items: flex-end;
        text-align: right;
    }

    .hn-start-run {
        display: inline-flex;
        align-items: center;
        gap: 1.04cqw;
        color: #15803d;
        font: 700 max(9px, 2.08cqw)/1.2 var(--st-font-body, "DM Sans"), system-ui, sans-serif;
    }

    .hn-start-run i,
    .hn-start-dot {
        flex: none;
        width: max(6px, 1.39cqw);
        height: max(6px, 1.39cqw);
        border-radius: 50%;
        background: #16a34a;
    }

    .hn-start-run i {
        animation: hn-ping 1.6s ease-out 3;
    }

    .hn-start-url {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        padding: 0.52cqw 1.74cqw;
        border: 1.5px solid var(--hn-ink);
        border-radius: 999px;
        background: #fff;
        font: 400 max(8.5px, 1.91cqw)/1.3 var(--hn-mono);
        text-overflow: ellipsis;
    }

    .hn-start-shot {
        flex: none;
        height: 35.76cqw;
        border-right: 0;
        border-bottom: 2px solid var(--hn-ink);
    }

    .hn-start--game .hn-start-shot {
        height: 45.49cqw;
    }

    .hn-start-foot {
        gap: 1.04cqw;
        padding: 2.08cqw 2.43cqw 2.43cqw;
    }

    .hn-start--game .hn-start-foot {
        padding-bottom: 2.78cqw;
    }

    .hn-start-pill {
        padding: 0.35cqw 1.56cqw;
        font-size: clamp(10px, 2cqw, 14px);
    }

    .hn-start-name {
        font-size: clamp(15px, 3.82cqw, 28px);
    }

    .hn-start--game .hn-start-name {
        font-size: clamp(16px, 4.17cqw, 30px);
    }

    .hn-start-go {
        min-height: clamp(32px, 6.25cqw, 44px);
        padding: 0 clamp(10px, 2.43cqw, 16px);
        border-radius: clamp(8px, 1.74cqw, 12px);
        font-size: clamp(13px, 2.43cqw, 17px);
    }

    .hn-start--game .hn-start-go {
        gap: 1.22cqw;
        min-height: clamp(36px, 6.94cqw, 48px);
        padding: 0 clamp(12px, 2.78cqw, 18px);
        border-radius: clamp(9px, 2.08cqw, 14px);
        box-shadow: 3px 3px 0 var(--hn-ink);
        font-size: clamp(13.5px, 2.6cqw, 18px);
    }

    .hn-quiz {
        padding: 2.43cqw;
        font-size: max(8px, 2.08cqw);
        line-height: 1.8;
    }

    .hn-site {
        gap: 1.56cqw;
        padding: 2.78cqw 2.43cqw 2.78cqw 5.2cqw;
    }

    .hn-site-h {
        font-size: 3.65cqw;
    }

    .hn-site-p {
        font-size: max(8px, 2.26cqw);
        line-height: 1.4;
    }

    .hn-site-art {
        gap: 1.04cqw;
    }

    .hn-site-art i {
        width: 7.99cqw;
        height: 7.99cqw;
        border-radius: 1.04cqw;
    }

    .hn-site-cap,
    .hn-site-btn {
        font-size: max(8px, 2.08cqw);
    }

    .hn-site-btn {
        padding: 0.52cqw 1.56cqw;
    }

    /* Where the cards get small the sticker keeps its size, so it moves down a little, clear of "Running". */
    .hn-learn-sticker--a {
        right: 1.74cqw;
        top: calc(5.9cqw + max(0px, 576px - 100cqw) * 0.2);
        --r: -5deg;
    }

    .hn-learn-sticker--b {
        left: 3.13cqw;
        bottom: -22px;
        --r: 4deg;
    }

    .hn-start--game .hn-start-go {
        position: relative;
    }

    .hn-start-go .hn-learn-pointer {
        display: block;
        position: absolute;
        left: calc(100% - 7px);
        top: 50%;
        width: max(20px, 5.21cqw);
        height: auto;
        rotate: -8deg;
        fill: #fff;
        stroke: var(--hn-ink);
        stroke-width: 2.4;
        stroke-linejoin: round;
    }
}

@keyframes hn-ping {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
    }

    80%,
    to {
        box-shadow: 0 0 0 7px rgba(22, 163, 74, 0);
    }
}

/* One column: the fan keeps the mockup's size, in the middle. */
@media (max-width: 979px) {
    .hn-learn {
        max-width: 576px;
        margin: 0 auto;
    }
}

/* The Discord channel */
.hn-dc {
    overflow: hidden;
    border: 2px solid var(--hn-ink);
    border-radius: 18px;
    background: #313338;
    box-shadow: 6px 6px 0 var(--hn-ink);
    color: #dbdee1;
    transform: rotate(1deg);
    font-size: 14px;
}

.hn-dc-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-bottom: 1px solid #1f2023;
    background: #2b2d31;
    color: #f2f3f5;
    font-weight: 700;
}

.hn-dc-top > span:first-child {
    color: #80848e;
    font-size: 18px;
    font-weight: 400;
}

.hn-dc-msg {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    padding: 12px 14px 4px;
}

.hn-dc-msg:last-child {
    padding-bottom: 14px;
}

.hn-dc-av {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font: 800 13px var(--hn-disp);
}

.hn-dc-av--bolt {
    background: var(--hn-brand);
}

.hn-dc-av--bolt svg {
    width: 18px;
    height: 18px;
}

.hn-dc-name {
    color: #f2f3f5;
    font-weight: 700;
}

.hn-dc-name small {
    margin-left: 6px;
    color: #949ba4;
    font-size: 11.5px;
    font-weight: 400;
}

.hn-dc-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 4px;
    border-radius: 4px;
    background: #5865f2;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    vertical-align: 1px;
}

.hn-dc pre {
    margin: 6px 0 0;
    padding: 8px 10px;
    border: 1px solid #1e1f22;
    border-radius: 6px;
    background: #2b2d31;
    color: #dbdee1;
    font: 12px/1.6 var(--hn-mono);
    white-space: pre-wrap;
}

.hn-dc-card {
    margin-top: 6px;
    padding: 10px 12px;
    border-left: 4px solid #22c55e;
    border-radius: 6px;
    background: #2b2d31;
}

.hn-dc-card b {
    color: #f2f3f5;
    font-size: 13.5px;
}

.hn-dc-out {
    margin-top: 6px;
    color: #b5bac1;
    font: 12px/1.6 var(--hn-mono);
}

.hn-dc-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.hn-dc-btns span {
    padding: 6px 10px;
    border-radius: 6px;
    background: #4e5058;
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
}

.hn-dc-btns span.go {
    background: #248046;
}

/* ── The sections below: the same words and parts, in bands with ink edges ── */

.st-home-next main section:not(.hn-hero) {
    border-bottom: 2px solid var(--hn-ink);
}

.st-home-next #start {
    padding: 0 0 44px;
    background: transparent;
}

.st-home-next #catalog {
    background: #fff;
}

.st-home-next #collab {
    background: var(--hn-lilac);
}

.st-home-next .st-update--bolt {
    background: #fff;
}

.st-home-next #gui-games {
    background: var(--hn-sun);
}

.st-home-next #features {
    background: #fff;
}

.st-home-next main > section:last-of-type {
    background: var(--hn-mint);
}

/* The old page's glows and bolts give way to the bands. */
.st-home-next .st-catpromo-glow,
.st-home-next .st-catpromo-bolt {
    display: none;
}

.st-home-next .st-h2,
.st-home-next .st-update-title,
.st-home-next .st-gui-games-title {
    font-family: var(--hn-disp);
    font-weight: 900;
    letter-spacing: -0.025em;
    color: var(--hn-ink);
    text-wrap: balance;
}

.st-home-next .st-eyebrow,
.st-home-next .st-update-kicker,
.st-home-next .st-gui-games-eyebrow {
    font-family: var(--hn-mono);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hn-brand);
}

.st-home-next main .st-btn {
    border: 2px solid var(--hn-ink);
    border-radius: 14px;
    box-shadow: 4px 4px 0 var(--hn-ink);
    font-weight: 700;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.st-home-next main .st-btn--ghost {
    background: #fff;
    color: var(--hn-ink);
}

.st-home-next main .st-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 var(--hn-ink);
}

.st-home-next main .st-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--hn-ink);
}

/* Cards: an ink edge and an offset shadow. */
.st-home-next .st-feature-card,
.st-home-next .st-diff-card,
.st-home-next .st-share-card {
    border: 2px solid var(--hn-ink);
    border-radius: 18px;
    box-shadow: 5px 5px 0 var(--hn-ink);
}

.st-home-next .st-feature-card:hover,
.st-home-next .st-share-card:hover {
    box-shadow: 7px 7px 0 var(--hn-ink);
}

.st-home-next .st-feature-card h3,
.st-home-next .st-diff-card h3,
.st-home-next .st-gui-game-name {
    font-family: var(--hn-disp);
    font-weight: 800;
    color: var(--hn-ink);
}

/* ── The frameworks under the hero: no band, the cards floating on the hero's dots, drifting slowly ── */

.st-home-next #start .st-stacks-label {
    font: 800 clamp(18px, 1.9vw, 22px)/1.3 var(--hn-disp);
    letter-spacing: -0.01em;
    color: var(--hn-ink);
}

.st-home-next #start .st-stacks-mark {
    display: inline-block;
    padding: 1px 9px;
    border: 2px solid var(--hn-ink);
    border-radius: 9px;
    background: var(--hn-y);
    color: var(--hn-ink);
    font-weight: 800;
    transform: rotate(-2deg);
}

.st-home-next #start .st-stacks-search-input {
    height: 44px;
    border: 2px solid var(--hn-ink);
    border-radius: 14px;
    background: #fff;
    box-shadow: 3px 3px 0 var(--hn-ink);
    font-size: 14px;
}

.st-home-next #start .st-stacks-search-input:focus {
    border-color: var(--hn-ink);
    box-shadow: 3px 3px 0 var(--hn-ink), 0 0 0 4px rgba(124, 58, 237, 0.25);
}


.st-home-next #start .st-stacks-toggle {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid var(--hn-ink);
    border-radius: 14px;
    background: #fff;
    box-shadow: 3px 3px 0 var(--hn-ink);
    color: var(--hn-ink);
    cursor: pointer;
}

.st-home-next #start .st-stacks-toggle[hidden] {
    display: none;
}

.st-home-next #start .st-stacks-toggle:focus-visible {
    outline: 3px solid var(--hn-brand);
    outline-offset: 2px;
}

.st-home-next #start .st-stacks-toggle svg {
    width: 18px;
    height: 18px;
}

.st-home-next #start .st-stacks-toggle-play,
.st-home-next #start .st-stacks-toggle.is-stopped .st-stacks-toggle-pause {
    display: none;
}

.st-home-next #start .st-stacks-toggle.is-stopped .st-stacks-toggle-play {
    display: block;
}

.st-home-next #start .st-stacks-search {
    margin-left: auto;
}

/* The cards: a logo tile in the framework's own colour, the name and what it's for; tilted a little either way so
   the row reads as cards set down on the page. */
.st-home-next #start .st-stacks-track {
    gap: 18px;
}

.st-home-next #start .st-stacks-track .st-fwcard {
    flex: 0 0 236px;
    width: 236px;
}

.st-home-next #start .st-fwcard {
    gap: 12px;
    min-height: 0;
    padding: 12px 14px 12px 12px;
    border: 2px solid var(--hn-ink);
    border-radius: 18px;
    background: #fff;
    box-shadow: 4px 4px 0 var(--hn-ink);
    transform: rotate(-1.2deg);
    transition: transform 0.18s cubic-bezier(0.3, 1.4, 0.4, 1), box-shadow 0.18s ease;
}

.st-home-next #start .st-fwcard:nth-child(even) {
    transform: translateY(6px) rotate(1.2deg);
}

.st-home-next #start .st-fwcard:nth-child(3n) {
    transform: translateY(-3px) rotate(0.4deg);
}

.st-home-next #start .st-fwcard::before {
    content: none;
}

.st-home-next #start .st-fwcard-glyph {
    position: relative;
    top: auto;
    left: auto;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 2px solid var(--hn-ink);
    border-radius: 14px;
    background: color-mix(in srgb, var(--fw) 16%, #fff);
}

.st-home-next #start .st-fwcard-glyph svg {
    width: 30px;
    height: 30px;
}

.st-home-next #start .st-fwcard--flask .st-fwcard-glyph {
    top: auto;
    left: auto;
    width: 52px;
    height: 52px;
}

.st-home-next #start .st-fwcard-name {
    font-family: var(--hn-disp);
    font-size: 17px;
    color: var(--hn-ink);
}

.st-home-next #start .st-fwcard-sub {
    font-size: 12.5px;
    color: var(--hn-muted);
}

.st-home-next #start .st-fwcard:hover,
.st-home-next #start .st-fwcard:focus-visible {
    z-index: 2;
    box-shadow: 6px 6px 0 var(--hn-ink);
    transform: translateY(-4px) rotate(0deg) scale(1.03);
}

.st-home-next #start .st-fwcard:hover .st-fwcard-glyph {
    transform: rotate(-6deg);
}

/* On hover or focus the card turns yellow and its line says what a press does: "Launch a sandbox". */
.st-home-next #start .st-fwcard-text {
    position: relative;
}

.st-home-next #start .st-fwcard-sub,
.st-home-next #start .st-fwcard-go {
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.st-home-next #start .st-fwcard-go {
    position: absolute;
    left: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font: 800 13px/1.2 var(--hn-disp);
    color: var(--hn-brand-deep);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}

.st-home-next #start .st-fwcard-go svg {
    width: 14px;
    height: 14px;
}

.st-home-next #start .st-fwcard:hover,
.st-home-next #start .st-fwcard:focus-visible {
    background: var(--hn-y);
}

.st-home-next #start .st-fwcard:hover .st-fwcard-sub,
.st-home-next #start .st-fwcard:focus-visible .st-fwcard-sub {
    opacity: 0;
    transform: translateY(-6px);
}

.st-home-next #start .st-fwcard:hover .st-fwcard-go,
.st-home-next #start .st-fwcard:focus-visible .st-fwcard-go {
    opacity: 1;
    transform: none;
}

.st-home-next #start .st-fwcard:focus-visible {
    outline: 3px solid var(--hn-brand);
    outline-offset: 3px;
}

/* While it drifts the row runs the page's whole width, fading at both edges, without the arrows; it holds still
   to be searched, and with less motion it stays today's row with its arrows (home-next.js adds is-drifting). */
.st-home-next #start .st-stacks-viewport {
    padding: 14px 4px 22px;
}

.st-home-next #start .is-drifting .st-stacks-stage {
    width: 100%;
    max-width: none;
    padding: 0;
}

.st-home-next #start .is-drifting .st-stacks-arrow {
    display: none;
}

.st-home-next #start .is-drifting .st-stacks-viewport {
    padding-left: 0;
    padding-right: 0;
    scroll-snap-type: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.st-home-next #start .is-drifting .st-stacks-track .st-fwcard {
    scroll-snap-align: none;
}

.st-home-next #start .is-drifting.is-filtered [data-copy] {
    display: none;
}

.st-home-next #start .is-drifting.is-filtered .st-stacks-viewport {
    -webkit-mask-image: none;
    mask-image: none;
}

.st-home-next #start .is-drifting.is-filtered .st-stacks-track {
    padding: 0 max(16px, calc((100% - var(--st-outline-w, 1072px)) / 2));
}

.st-home-next #start .st-stacks-arrow {
    border: 2px solid var(--hn-ink);
    background: var(--hn-brand);
    box-shadow: 3px 3px 0 var(--hn-ink);
}

.st-home-next #start .st-stacks-empty {
    padding: 0 max(16px, calc((100% - var(--st-outline-w, 1072px)) / 2));
    font-size: 14px;
    color: var(--hn-muted);
}

/* ── Big monitors: the hero grows with the frame (site-layout.css widens it to 1,440 px at 1,920 and 1,584 px at
   2,560), so its words, buttons and code box keep the proportions they have on a laptop. ── */
@media (min-width: 1600px) {
    .st-home-next .hn-hero {
        padding: 80px 0 48px;
        --st-hero-code-h: clamp(260px, calc(100vh - 640px), 380px);
    }

    .hn-grid {
        gap: clamp(56px, 4.5vw, 120px);
    }

    .hn-title {
        font-size: clamp(54px, 3.2vw, 80px);
    }

    .hn-kicker {
        font-size: 15px;
    }

    .hn-lead {
        max-width: 40rem;
        font-size: clamp(19px, 1vw, 22px);
    }

    .hn-aud button {
        min-height: 46px;
        padding: 10px 16px;
        font-size: 15.5px;
    }

    .hn-btn {
        min-height: 54px;
        padding: 0 24px;
        font-size: 16.5px;
    }

    .hn-proof {
        font-size: 15.5px;
    }

    .hn-sticker {
        font-size: 15.5px;
    }

    .st-home-next .hn-art .st-hero-editor {
        min-height: 320px;
    }

    .hn-share-phone {
        right: -66px;
        top: 78px;
        width: 150px;
        height: 278px;
        border-radius: 28px;
    }

    .hn-share-h {
        font-size: 20px;
    }

    .hn-share-link {
        width: min(420px, 78%);
    }

    .hn-share-ok,
    .hn-share-copy {
        font-size: 15px;
    }

    .hn-share-url {
        font-size: 14px;
    }

    .hn-share-sticker {
        top: 250px;
    }

    .st-home-next .hn-art .st-hero-lang,
    .st-home-next .hn-art .st-hero-pad-top.is-compact .st-hero-lang {
        flex-basis: 180px;
    }

    .st-home-next .hn-art .st-hero-docker {
        flex-basis: 240px;
    }

    .st-home-next .hn-has-example .hn-pad-example,
    .st-home-next .hn-art .hn-pad-caret {
        font-size: 14px;
    }

    .hn-dc {
        font-size: 15.5px;
    }

    .st-home-next #start .st-stacks-label {
        font-size: 24px;
    }

    .st-home-next #start .st-stacks-track .st-fwcard {
        flex-basis: 260px;
        width: 260px;
    }
}

/* Less motion: the title, the pad, the starters and the stickers are simply there, and nothing blinks. */
@media (prefers-reduced-motion: reduce) {
    .hn-art-item.is-swapping,
    .hn-art-item.is-swapping .hn-sticker,
    .hn-sticker,
    .hn-share-link,
    .hn-share-phone,
    .hn-learn .hn-start,
    .hn-start-run i,
    .hn-quiz-caret,
    .st-home-next .hn-art .st-hero-pad,
    .st-home-next .hn-art .hn-pad-caret,
    .st-home-next .hn-art .st-hero-editor:has(.st-hero-pad-placeholder[hidden]) .st-hero-launch::after {
        animation: none;
    }

    /* public/js/home-next.js doesn't type the title then; if the setting changes while it types, it's all there. */
    .hn-title.is-typing .hn-ch {
        visibility: visible;
    }

    .hn-title.is-typing .hn-mark,
    .hn-title.is-typing .hn-mark.is-marked {
        background-size: 100% 0.86em;
        transition: none;
    }

    .hn-caret,
    .hn-caret.is-on {
        display: none;
    }

    .hn-share-phone,
    .hn-pad-tab,
    .st-home-next .si-docker-drawer,
    .st-home-next .si-hub-pick {
        transition: none;
    }

    .hn-btn,
    .hn-learn .hn-start,
    .st-home-next main .st-btn,
    .st-home-next #start .st-fwcard,
    .st-home-next #start .st-fwcard-sub,
    .st-home-next #start .st-fwcard-go {
        transition: none;
    }
}

/* Narrow screens: the search and Pause share a line under the words. */
@media (max-width: 720px) {
    .st-home-next #start .st-stacks-search {
        flex: 1 1 200px;
        width: auto;
    }
}

/* Phones: one column, the picture under the words; the stickers stay inside the screen. */
@media (max-width: 640px) {
    .st-home-next .hn-hero {
        padding: 28px 0 48px;
    }

    .hn-aud {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        width: 100%;
        box-sizing: border-box;
    }

    .hn-aud button {
        min-height: 44px;
        padding: 6px 8px;
        font-size: 14px;
        line-height: 1.2;
    }

    .hn-lead {
        font-size: 17px;
    }

    .hn-kicker {
        font-size: 12px;
    }

    .hn-ctas .hn-btn {
        flex: 1 1 auto;
        min-height: 50px;
        padding: 8px 16px;
        white-space: normal;
        text-align: center;
    }

    .hn-sticker {
        font-size: 12.5px;
    }

    .hn-art .hn-sticker[style*="right:-"] {
        right: 4px !important;
    }

    .hn-art .hn-sticker[style*="left:-"] {
        left: 4px !important;
    }

    .st-home-next .hn-art .st-hero-pad {
        transform: none;
    }

    .hn-share-link {
        left: 12px;
        right: -6px;
        width: auto;
        padding: 12px;
        gap: 8px;
        border-radius: 14px;
        box-shadow: 5px 5px 0 var(--hn-ink);
        transform: none;
    }

    .hn-share-ok {
        font-size: 13px;
    }

    .hn-share-url {
        padding: 6px 10px;
        font-size: 12px;
    }

    .hn-share-url svg {
        display: none;
    }

    .hn-share-copy {
        min-height: 36px;
        padding: 0 12px;
        font-size: 13px;
    }

    .hn-share-sticker {
        right: 10px !important;
        top: -16px;
    }

    .hn-hero[data-aud="share"] .hn-art-item[data-art~="share"] {
        margin-bottom: 84px;
    }
}

/* The narrowest phones: Portuguese's longest audience fits its half. */
@media (max-width: 340px) {
    .hn-aud button {
        padding: 6px 4px;
        font-size: 13px;
    }
}

/* ══ "I teach": the lesson in one look (partials/home-next-art.ejs): start ══
   A teacher's live view of a lesson, drawn: who needs you, the class's numbers, the pupils on each of the lesson's six
   steps, the hints opened, and Mark as helped. A picture: nothing in it takes a click. The picture is a container its
   layout follows. From 400 px wide it is the board, every size a share of the picture's width (--px is one of the
   board's pixels at 576 px), so it keeps its look from a laptop to a big monitor, with no word under 10 px; narrower,
   on phones, it stacks, at sizes of its own. Beside the words it is never shorter than sharing's pad and its link, so a
   switch leaves the frameworks row where it was. Its words wrap only where they're meant to, so nothing is cut. */
.hn-teach {
    container: hn-teach / inline-size;
    display: grid;
    align-content: center;
}

/* Room above and below the card for the stickers, so neither covers a word or Mark as helped, whatever the language. */
.hn-teach-board {
    position: relative;
    padding: 32px 0 30px;
}

.hn-teach-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "top top"
        "need need"
        "nums nums"
        "where where"
        "hints hints"
        "foot foot";
    overflow: hidden;
    border: 2px solid var(--hn-ink);
    border-radius: 16px;
    background: #fff;
    box-shadow: 5px 5px 0 var(--hn-ink);
    color: var(--hn-ink);
    font: 500 13px/1.3 var(--st-font-body, "DM Sans"), system-ui, sans-serif;
    rotate: -1deg;
}

.hn-teach-card svg {
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hn-teach-top {
    grid-area: top;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-bottom: 2px solid var(--hn-ink);
}

.hn-teach-class {
    flex: 1;
    min-width: 0;
    font: 600 11.5px/1.35 var(--hn-mono);
    color: #3d3852;
}

/* On phones the lesson's name has a line of its own; on the board it follows the class, after a dot. */
.hn-teach-sep {
    display: none;
}

.hn-teach-lesson {
    display: block;
    white-space: nowrap;
}

.hn-teach-live {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px;
    border: 2px solid var(--hn-ink);
    border-radius: 999px;
    background: #fff;
    font: 700 11px/1.35 var(--hn-mono);
}

.hn-teach-live i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
}

/* Who needs you: the big number, then each one's chip, on the class's yellow. */
.hn-teach-need {
    grid-area: need;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "big words"
        "big chips";
    align-content: center;
    gap: 6px 12px;
    padding: 10px 12px;
    background: var(--hn-y);
}

.hn-teach-big {
    grid-area: big;
    align-self: center;
    font: 900 70px/0.8 var(--hn-disp);
    letter-spacing: -0.04em;
}

.hn-teach-need-words {
    grid-area: words;
    align-self: end;
    font: 800 21px/1 var(--hn-disp);
}

.hn-teach-chips {
    grid-area: chips;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.hn-teach-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 2px 8px 2px 3px;
    border: 1.5px solid var(--hn-ink);
    border-radius: 11px;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
}

.hn-teach-chip-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--hn-sun);
}

.hn-teach-chip-icon svg {
    width: 11px;
    height: 11px;
    stroke-width: 2.6;
}

.hn-teach-chip-icon--stuck {
    background: #f9a8c4;
    font: 900 11px/1 var(--hn-disp);
}

/* The class: how many, and how far into the lesson. */
.hn-teach-nums {
    grid-area: nums;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border-top: 2px solid var(--hn-ink);
}

.hn-teach-num {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 7px 12px;
}

.hn-teach-num + .hn-teach-num {
    border-left: 2px solid var(--hn-ink);
}

.hn-teach-num--time {
    gap: 6px;
    background: var(--hn-lilac);
}

.hn-teach-n {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 7px;
}

.hn-teach-n b {
    font: 900 32px/0.9 var(--hn-disp);
    letter-spacing: -0.03em;
}

.hn-teach-n span,
.hn-teach-sub,
.hn-teach-meter,
.hn-teach-where-head,
.hn-teach-step span,
.hn-teach-hints,
.hn-teach-first {
    color: var(--hn-muted);
}

.hn-teach-n span {
    font-size: 13.5px;
    font-weight: 700;
}

.hn-teach-sub {
    font-size: 11.5px;
}

.hn-teach-sub b {
    color: #15803d;
}

/* Where the line breaks, it breaks at the dot. */
.hn-teach-sub b,
.hn-teach-sub span {
    white-space: nowrap;
}

.hn-teach-meter {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
}

.hn-teach-bar {
    flex: 1;
    height: 10px;
    box-sizing: border-box;
    overflow: hidden;
    border: 1.5px solid var(--hn-ink);
    border-radius: 4px;
    background: #fff;
}

/* 18 of 60 minutes. */
.hn-teach-bar i {
    display: block;
    width: 30%;
    height: 100%;
    background: var(--hn-brand);
}

/* Where the class is: the lesson's six steps and Finished, each with how many pupils are on it. A hand on a step
   says someone there has a hand up. On phones the track takes two rows. */
.hn-teach-where {
    grid-area: where;
    padding: 7px 12px 9px;
    border-top: 2px solid var(--hn-ink);
}

.hn-teach-where-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 10px;
    font-size: 11px;
}

.hn-teach-kicker {
    font: 700 10px/1.3 var(--hn-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hn-teach-track {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 8px;
    margin-top: 6px;
}

.hn-teach-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 25%;
    min-width: 0;
    text-align: center;
}

/* The line between the steps: from each step's middle to the next one's, under the circles; none after a row's last. */
.hn-teach-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 11.5px;
    width: 100%;
    height: 3px;
    background: var(--hn-ink);
}

.hn-teach-step:nth-child(4)::after {
    display: none;
}

.hn-teach-step b {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    box-sizing: border-box;
    border: 2px solid var(--hn-ink);
    border-radius: 50%;
    background: #fff;
    font: 800 13.5px/1 var(--hn-disp);
}

/* A long name may reach a little past its share of the row, over a short neighbour's: never broken. */
.hn-teach-step span {
    font-size: 10.5px;
    white-space: nowrap;
}

.hn-teach-step--most b {
    background: var(--hn-y);
    box-shadow: 2px 2px 0 var(--hn-ink);
}

.hn-teach-step--most > span {
    color: var(--hn-ink);
    font-weight: 700;
}

.hn-teach-step--hand b {
    background: var(--hn-sun);
}

.hn-teach-step--done b {
    border-color: #15803d;
    background: var(--hn-mint);
}

.hn-teach-step b .hn-teach-step-hand {
    position: absolute;
    right: -9px;
    top: -7px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    box-sizing: border-box;
    border: 1.5px solid var(--hn-ink);
    border-radius: 50%;
    background: #fff;
}

.hn-teach-step-hand svg {
    width: 10px;
    height: 10px;
    stroke-width: 2.6;
}

/* The hints: how many opened, no solution shown, and who is racing through them. */
.hn-teach-hints {
    grid-area: hints;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    padding: 7px 12px;
    border-top: 2px solid var(--hn-ink);
    background: var(--hn-lilac);
    font-size: 11.5px;
}

.hn-teach-hints > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.hn-teach-hints svg {
    width: 14px;
    height: 14px;
    color: var(--hn-brand-deep);
    stroke-width: 2.4;
}

.hn-teach-hints b {
    color: var(--hn-ink);
}

.hn-teach-hints .hn-teach-racing {
    padding: 2px 9px;
    border: 1.5px solid var(--hn-ink);
    border-radius: 999px;
    background: var(--hn-sky);
    color: var(--hn-ink);
    font-size: 11.5px;
    font-weight: 700;
}

.hn-teach-racing svg {
    width: 12px;
    height: 12px;
    color: #1d4ed8;
    stroke-width: 2.8;
}

/* Who to go to first, and the one button: drawn, never pressed. */
.hn-teach-foot {
    grid-area: foot;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 7px 12px;
    border-top: 2px solid var(--hn-ink);
}

/* Where the button won't fit beside the words, it goes under them, at the right, clear of the sticker. */
.hn-teach-first {
    flex: 1 1 220px;
    min-width: 0;
    font-size: 12px;
    text-wrap: pretty;
}

.hn-teach-first b {
    color: var(--hn-ink);
}

.hn-teach-helped {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    padding: 7px 12px;
    border: 2px solid var(--hn-ink);
    border-radius: 12px;
    background: var(--hn-brand);
    box-shadow: 3px 3px 0 var(--hn-ink);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.hn-teach-helped svg {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

.hn-teach-sticker--a {
    right: 12px;
    top: 0;
    --r: 4deg;
    --d: 0.7s;
}

.hn-teach-sticker--b {
    left: 6px;
    bottom: 0;
    --r: -3deg;
    --d: 0.85s;
}

/* The Live dot pings a few times when the picture shows, never with less motion. */
@media (prefers-reduced-motion: no-preference) {
    .hn-teach-live i {
        animation: hn-ping 1.6s ease-out 3;
    }
}

/* The board: the numbers beside who needs you, and the seven steps on one line. */
@container hn-teach (min-width: 400px) {
    .hn-teach-board {
        --px: calc(100cqw / 576);
        /* The stickers keep their size while the board shrinks: on a narrow board, a floor keeps "The lesson in one
           look" off the Live chip, and "Hints, not answers" off the foot's second line in Spanish and Portuguese. */
        padding: max(34px, calc(42 * var(--px))) 0 max(38px, calc(35 * var(--px)));
    }

    .hn-teach-card {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        grid-template-areas:
            "top top"
            "need nums"
            "where where"
            "hints hints"
            "foot foot";
        width: calc(100% + 8 * var(--px));
        margin-left: calc(-4 * var(--px));
        border-radius: calc(18 * var(--px));
        box-shadow: clamp(5px, calc(6 * var(--px)), 7px) clamp(5px, calc(6 * var(--px)), 7px) 0 var(--hn-ink);
    }

    .hn-teach-top {
        gap: calc(10 * var(--px));
        padding: calc(9 * var(--px)) calc(16 * var(--px));
    }

    .hn-teach-class {
        font-size: max(10.5px, calc(12.5 * var(--px)));
    }

    .hn-teach-sep,
    .hn-teach-lesson {
        display: inline;
    }

    .hn-teach-live {
        gap: calc(7 * var(--px));
        padding: calc(3 * var(--px)) calc(10 * var(--px));
        font-size: max(10.5px, calc(12 * var(--px)));
    }

    .hn-teach-need {
        gap: calc(9 * var(--px)) calc(16 * var(--px));
        padding: calc(10 * var(--px)) calc(18 * var(--px)) calc(11 * var(--px));
        border-right: 2px solid var(--hn-ink);
    }

    .hn-teach-big {
        font-size: calc(108 * var(--px));
    }

    .hn-teach-need-words {
        font-size: calc(25 * var(--px));
    }

    .hn-teach-chips {
        align-self: start;
        gap: calc(4 * var(--px));
    }

    .hn-teach-chip {
        gap: calc(5 * var(--px));
        padding: calc(2 * var(--px)) calc(8 * var(--px)) calc(2 * var(--px)) calc(3 * var(--px));
        border-radius: max(10px, calc(11 * var(--px)));
        font-size: max(10.5px, calc(12 * var(--px)));
    }

    .hn-teach-chip-icon {
        width: calc(17 * var(--px));
        height: calc(17 * var(--px));
    }

    .hn-teach-chip-icon svg {
        width: calc(11 * var(--px));
        height: calc(11 * var(--px));
    }

    .hn-teach-chip-icon--stuck {
        font-size: calc(11 * var(--px));
    }

    .hn-teach-nums {
        grid-template-columns: minmax(0, 1fr);
        border-top: 0;
    }

    .hn-teach-num {
        padding: calc(7 * var(--px)) calc(18 * var(--px));
    }

    .hn-teach-num + .hn-teach-num {
        border-top: 2px solid var(--hn-ink);
        border-left: 0;
    }

    .hn-teach-n {
        gap: 0 calc(8 * var(--px));
    }

    .hn-teach-n b {
        font-size: calc(44 * var(--px));
    }

    .hn-teach-n span {
        font-size: max(12px, calc(15 * var(--px)));
    }

    .hn-teach-sub {
        font-size: max(10.5px, calc(12 * var(--px)));
    }

    .hn-teach-meter {
        gap: calc(8 * var(--px));
        font-size: max(10.5px, calc(11.5 * var(--px)));
    }

    .hn-teach-bar {
        height: calc(10 * var(--px));
    }

    .hn-teach-where {
        padding: calc(7 * var(--px)) calc(16 * var(--px)) calc(8 * var(--px));
    }

    .hn-teach-where-head {
        font-size: max(10.5px, calc(12 * var(--px)));
    }

    .hn-teach-kicker {
        font-size: max(10px, calc(11 * var(--px)));
    }

    .hn-teach-track {
        flex-wrap: nowrap;
        margin-top: calc(4 * var(--px));
    }

    .hn-teach-step {
        flex: 1 1 0;
        width: auto;
        gap: calc(4 * var(--px));
    }

    .hn-teach-step:not(:last-child)::after {
        top: calc(14 * var(--px));
        height: calc(3 * var(--px));
    }

    .hn-teach-step:nth-child(4)::after {
        display: block;
    }

    .hn-teach-step b {
        width: calc(31 * var(--px));
        height: calc(31 * var(--px));
        font-size: calc(15 * var(--px));
    }

    .hn-teach-step span {
        font-size: max(10.5px, calc(11.5 * var(--px)));
    }

    .hn-teach-step b .hn-teach-step-hand {
        right: calc(-9 * var(--px));
        top: calc(-7 * var(--px));
        width: calc(17 * var(--px));
        height: calc(17 * var(--px));
    }

    .hn-teach-step-hand svg {
        width: calc(10 * var(--px));
        height: calc(10 * var(--px));
    }

    .hn-teach-hints {
        gap: calc(6 * var(--px)) calc(14 * var(--px));
        padding: calc(8 * var(--px)) calc(16 * var(--px));
        font-size: max(10.5px, calc(13 * var(--px)));
    }

    .hn-teach-hints > span {
        gap: calc(6 * var(--px));
    }

    .hn-teach-hints svg {
        width: calc(15 * var(--px));
        height: calc(15 * var(--px));
    }

    .hn-teach-hints .hn-teach-racing {
        margin-left: auto;
        gap: calc(5 * var(--px));
        padding: calc(2 * var(--px)) calc(9 * var(--px));
        font-size: max(10.5px, calc(12 * var(--px)));
    }

    .hn-teach-racing svg {
        width: calc(12 * var(--px));
        height: calc(12 * var(--px));
    }

    .hn-teach-foot {
        gap: calc(8 * var(--px)) calc(12 * var(--px));
        padding: calc(7 * var(--px)) calc(12 * var(--px)) calc(7 * var(--px)) calc(16 * var(--px));
    }

    .hn-teach-first {
        font-size: max(11px, calc(13.5 * var(--px)));
    }

    .hn-teach-helped {
        gap: calc(7 * var(--px));
        padding: calc(8 * var(--px)) calc(14 * var(--px));
        border-radius: calc(12 * var(--px));
        font-size: max(11.5px, calc(14 * var(--px)));
    }

    .hn-teach-helped svg {
        width: calc(14 * var(--px));
        height: calc(14 * var(--px));
    }

    .hn-teach-sticker--a {
        right: calc(70 * var(--px));
    }

    .hn-teach-sticker--b {
        left: calc(-16 * var(--px));
    }
}

/* Spanish's and Portuguese's chips are longer: where the picture is narrow they go under "need you", whole. */
@container hn-teach (max-width: 519px) {
    .hn-teach:lang(es) .hn-teach-need,
    .hn-teach:lang(pt) .hn-teach-need {
        grid-template-areas:
            "big words"
            "chips chips";
    }
}

/* Beside the words: as tall as sharing's pad and its link (in views/home.ejs and partials/home-next-share.ejs). */
@media (min-width: 980px) {
    .hn-teach {
        min-height: 470px;
    }
}

@media (min-width: 1600px) {
    .hn-teach {
        min-height: 490px;
    }
}

/* One column: the board keeps its size, in the middle. */
@media (max-width: 979px) {
    .hn-teach {
        max-width: 576px;
        margin: 0 auto;
    }
}

/* ══ "I teach": end ══ */

/* ══ The Playground home: end ══ */
