/* Course-only additions on top of /styles/main.css.
   Nothing here redefines a class main.css owns: that file belongs to the site
   and is maintained separately. Everything below is either a new class or a
   modifier scoped to this page. */

/* main.css gives .nav-cta and friends an explicit display, which outranks the
   browser's default rule for the hidden attribute: without this, the sign-out
   button and the error lines show up even when the JS has hidden them. */
[hidden] { display: none !important; }

/* The hero is shorter here than on the homepage: this page is a door, not a
   manifesto, and the first action should be visible without scrolling. */
.hero-course { min-height: auto; padding: 7rem 0 4rem; }
.hero-course .hero-title { max-width: 16ch; margin-inline: auto; }
.hero-course .hero-subtitle { max-width: 56ch; margin-inline: auto; }

.nav-course { color: var(--color-text-light); font-size: 0.95rem; }

.container.narrow { max-width: 620px; }
.container.narrow-wide { max-width: 960px; }

.two-up {
    display: grid; gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: start;
}

/* Numbered path on the landing page: the same four steps the list below
   enforces, written out before anyone signs up. */
.path { counter-reset: path; list-style: none; margin: 1.5rem 0; padding: 0; }
.path li {
    counter-increment: path; position: relative;
    padding: 0 0 1rem 3rem; color: var(--color-text);
}
.path li::before {
    content: counter(path);
    position: absolute; left: 0; top: -2px;
    width: 2rem; height: 2rem; border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem;
    background: var(--color-primary); color: #fff;
}

/* main.css styles .glass-panel for the dark sections of the homepage, where
   its near-black fill sits on a navy band. On this page the panels sit on a
   light background, so they get a light fill here. Scoped to .panel-light so
   the site's own panels are untouched. */
.panel-light {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: var(--color-text);
    padding: clamp(1.75rem, 4vw, 2.75rem);
}
.panel-light h3 {
    font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700;
    color: var(--color-primary); margin-bottom: 0.9rem;
}
.panel-light p + p { margin-top: 0.9rem; }

/* Forms */
.form-panel { padding: clamp(1.75rem, 4vw, 2.75rem); }
.form-panel .section-title { margin-bottom: 0.5rem; }
form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.75rem; }
form label { display: flex; flex-direction: column; gap: 0.4rem; font-weight: 600; font-size: 0.9rem; }
form input[type="text"], form input[type="email"] {
    font: inherit; padding: 0.8rem 1rem;
    border: 1px solid rgba(0, 71, 171, 0.18);
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.85);
}
form input:focus-visible, .btn:focus-visible, button:focus-visible, a:focus-visible {
    outline: 3px solid var(--color-secondary); outline-offset: 2px;
}
form label.check { flex-direction: row; align-items: flex-start; gap: 0.6rem; font-weight: 400; }
form label.check input { margin-top: 0.3rem; }
.error { color: var(--color-accent); font-size: 0.9rem; font-weight: 500; }

/* The step list */
.course-head {
    display: flex; flex-wrap: wrap; gap: 1.5rem;
    align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem;
}
.code-chip { display: flex; flex-direction: column; text-align: right; padding: 1rem 1.5rem; }
.code-chip .stat-value { letter-spacing: 0.1em; }

.progress {
    height: 8px; border-radius: 999px; overflow: hidden; margin-bottom: 2.5rem;
    background: rgba(0, 71, 171, 0.12);
}
.progress-fill {
    height: 100%; width: 0; border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: width var(--transition-slow);
}

/* The list folds: a row is its title, and what you can do with it opens
   underneath (Ernesto, 2026-11-07). Seven rows with their text and their
   buttons all out at once was the wall the list was meant to replace. One row
   is open at a time, and the one you are on is already open, so the button you
   came for is never hidden. What this costs: a unit you have already finished
   takes one click to reach again. */
.steps { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; padding: 0; margin: 0; }
.step {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    overflow: hidden;
}
.step-head {
    display: flex; align-items: center; gap: 1.25rem; width: 100%;
    padding: 1.1rem 1.5rem; margin: 0;
    background: none; border: 0; border-radius: inherit;
    font: inherit; color: inherit; text-align: left;
}
button.step-head { cursor: pointer; }
button.step-head:hover { background: rgba(0, 71, 171, 0.04); }
button.step-head:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.step-num {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem;
    background: rgba(0, 71, 171, 0.10); color: var(--color-text-light);
}
.step-text { flex: 1 1 auto; min-width: 0; display: block; }
.step-title {
    display: block;
    font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700;
}
.step-note { display: block; color: var(--color-text-light); font-size: 0.9rem; }

/* The chevron turns a quarter when the row opens. */
.step-chevron {
    flex: 0 0 auto; width: 10px; height: 10px; margin-left: 0.5rem;
    border-right: 2px solid var(--color-text-light);
    border-bottom: 2px solid var(--color-text-light);
    transform: rotate(45deg); transform-origin: 60% 60%;
    transition: transform var(--transition-fast);
}
.step.is-open .step-chevron { transform: rotate(-135deg); }

/* The panel folds on its own row height: a grid row from 0fr to 1fr animates,
   where height: auto does not. The inner block has to clip for that to work. */
.step-panel {
    display: grid; grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows var(--transition-fast), visibility var(--transition-fast);
}
.step.is-open .step-panel { grid-template-rows: 1fr; visibility: visible; }
.step-panel-inner { overflow: hidden; }
.step.is-open .step-panel-inner { padding: 0 1.5rem 1.25rem 5.75rem; }
.step-blurb { color: var(--color-text-light); font-size: 0.95rem; margin: 0 0 0.9rem; }
.step .btn { flex: 0 0 auto; padding: 0.6rem 1.4rem; }
/* Play and Train, side by side on a wide row and stacked on a narrow one, so
   a unit never shows one button above the fold and the other below it. */
.step-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.step.is-current {
    border-color: rgba(0, 71, 171, 0.35);
    box-shadow: var(--glass-shadow);
}
.step.is-current .step-num { background: var(--color-primary); color: #fff; }
.step.is-done .step-num { background: rgba(0, 212, 255, 0.22); color: var(--color-primary); }
.step.is-locked { opacity: 0.5; }

/* Unit 0 is not a step of the path. A dashed edge and a hollow number say so
   without a label: it sits in the list, it is not counted in it. */
.step.is-optional { border-style: dashed; background: transparent; }
.step.is-optional .step-num {
    background: transparent; color: var(--color-text-light);
    border: 1px dashed rgba(0, 71, 171, 0.35);
}
.step.is-optional .step-title { font-weight: 600; color: var(--color-text-light); }

/* A step open */
.back { margin-bottom: 1.5rem; }
#step-body { margin-top: 1.5rem; }
/* 16/9 is only the starting size: the capsule reports its real height (its own
   16:9 plus the H5P control bar) and teachers.js sets it. The background is
   white, not black, so a frame that failed to load reads as an empty box
   instead of looking like a video that will not play. */
.player {
    /* The width is capped at runtime so the 16:9 picture fits the window
       without the page scrolling; centred, because a capped box pinned to the
       left of a wide column reads as a mistake. */
    width: 100%; aspect-ratio: 16 / 9; border: 0; display: block;
    margin-left: auto; margin-right: auto;
    border-radius: var(--border-radius-md); background: #fff;
    box-shadow: var(--glass-shadow);
}

/* The shared navbar puts the course name straight after the logo, with nothing
   between them: "EDU-RISEDigital Technologies in Education". */
.nav-course { margin-left: 0.75rem; }

.quiz-q {
    border: 1px solid var(--glass-border); background: var(--glass-bg);
    border-radius: var(--border-radius-md); padding: 1.5rem; margin-bottom: 1.1rem;
}
.quiz-q legend { font-weight: 600; padding: 0 0 0.75rem; }
/* The open questions. A fieldset is not a flex container, so an unstyled field
   keeps its default width, about 20 characters, whatever the panel around it
   measures. These are the answers written in the person's own words, so the
   box says so: the full width of the panel and five lines deep, growable. */
.quiz-q textarea {
    font: inherit; width: 100%; box-sizing: border-box;
    padding: 0.8rem 1rem; resize: vertical; min-height: 7.5rem;
    border: 1px solid rgba(0, 71, 171, 0.18);
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.85);
}
.quiz-q textarea:focus-visible {
    outline: 3px solid var(--color-secondary); outline-offset: 2px;
}
/* flex-direction must be explicit: "form label" above stacks label children in a
   column, which put each option's text on the line below its radio button. */
.quiz-opt { display: flex; flex-direction: row; gap: 0.6rem; align-items: flex-start; font-weight: 400; margin-bottom: 0.4rem; }
.quiz-opt input { margin: 0.25rem 0 0; flex-shrink: 0; }
.scale { display: flex; flex-wrap: wrap; gap: 1rem; }
/* baseline, not center: the end steps carry a two-line anchor ("totalmente en
   desacuerdo"), and centering pushed their radio and number below the others. */
.scale label { flex-direction: row; align-items: baseline; gap: 0.4rem; font-weight: 400; }

.busy { text-align: center; color: var(--color-text-light); padding: 2rem 0; }

/* The reveal classes animate from opacity 0. A view that is hidden when the
   observer runs would never intersect, so the JS marks everything active as
   soon as a view is shown; this keeps the page readable even if that fails. */
@media (prefers-reduced-motion: reduce) {
    .reveal-up, .reveal-left, .reveal-right { opacity: 1; transform: none; }
    * { transition: none !important; }
}

/* Language picker in the bar, the same affordance /app/ offers. */
.lang-pick { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; }
.lang-pick .globe { font-size: 1rem; opacity: 0.65; }
.lang-pick select {
    font: inherit; font-size: 0.85rem; font-weight: 600;
    color: var(--color-text); background: var(--color-bg-alt);
    border: 1px solid var(--glass-border); border-radius: var(--border-radius-sm);
    padding: 0.3rem 0.5rem; cursor: pointer;
}
.navbar .nav-cta { margin-left: 0.75rem; }

/* Opening video: 16:9, above the title, as on the other course's page. */
.teaser { margin: 0 auto 2.5rem; max-width: 760px; }
.teaser-frame {
    position: relative; width: 100%; aspect-ratio: 16 / 9;
    border-radius: var(--border-radius-md); overflow: hidden;
    background: #000; box-shadow: var(--glass-shadow);
}
.teaser-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.teaser figcaption {
    margin-top: 0.75rem; text-align: center;
    color: var(--color-text-light); font-size: 0.9rem;
}

/* On the course list the same video is a welcome, not a hero: narrower, with
   the course in one line under it, and the list right below. */
.teaser-compact { max-width: 620px; margin-bottom: 2rem; }
.teaser-lead {
    margin: 0.35rem auto 0; max-width: 46rem; text-align: center;
    color: var(--color-text-light); font-size: 0.95rem; line-height: 1.6;
}

/* The two forms now sit on the landing page, side by side. */
#start .form-panel h3 {
    font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700;
    color: var(--color-primary); margin-bottom: 0.4rem;
}

/* The certificate, shown at the size the panel allows and no larger: it is a
   wide landscape picture, and blown up it pushes the two buttons off a laptop
   screen, which is where the learner needs them. */
.badge-image {
    display: block; width: 100%; max-width: 640px; height: auto;
    margin: 0 auto 1.5rem; border-radius: var(--border-radius-md);
    border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
    background: #fff;
}
/* What to do with it: the part a teacher actually needs, and the part no
   certificate ever explains. Left-aligned inside a centred panel, because a
   list of instructions centred is a list nobody reads. */
.badge-howto { text-align: left; margin-top: 2rem; }
.badge-howto h3 {
    font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700;
    color: var(--color-primary); margin-bottom: 0.6rem;
}
.badge-howto ul { margin: 0; padding-left: 1.2rem; }
.badge-howto li { font-size: 0.92rem; line-height: 1.65; margin-bottom: 0.45rem; }

.badge-json-hint {
    margin-top: 1.25rem; font-size: 0.85rem; line-height: 1.6;
    color: var(--color-text-light);
}
.badge-json-hint a { font-weight: 600; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Questionnaire: section headings, scale anchors, consent.
   All three come from the 1 Nov bug report: bare 1..5 with no anchors, and
   no consent block, were blocking ethics approval. */
.quiz-section { margin: 2.25rem 0 1rem; }
.quiz-section h3 {
    font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem;
    color: var(--color-primary);
}
.quiz-section p { color: var(--color-text-light); font-size: 0.9rem; margin-top: 0.25rem; }

.consent-panel { border-color: var(--color-primary); }
.consent-text { font-size: 0.95rem; line-height: 1.65; margin-bottom: 1rem; }
.consent-check { font-weight: 600; }

.scale { align-items: baseline; gap: 0.5rem; flex-wrap: nowrap; }
/* ".scale label" above is more specific than ".scale-step" and set the steps
   back to a row, so the anchor of 1 ("pas du tout") sat between 1 and 2 and
   read as a label of the gap (beta feedback, 2026-11-13). Equal columns, the
   anchor under its number. */
.scale .scale-step { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; flex: 1 1 0; min-width: 0; max-width: 7rem; }
.scale-step input { margin: 0; }
.scale-anchor {
    font-style: normal; font-size: 0.78rem; line-height: 1.25;
    color: var(--color-text-light); text-align: center;
}

.quiz-q select {
    font: inherit; padding: 0.7rem 0.9rem; max-width: 26rem;
    border: 1px solid rgba(0, 71, 171, 0.18);
    border-radius: var(--border-radius-md); background: #fff;
}

/* The navbar is sticky, so an anchored question must not land underneath it.
   The report saw question 3 hidden behind the header. */
html { scroll-padding-top: 6.5rem; }
.quiz-q { scroll-margin-top: 6.5rem; }

/* Not an error: the address was already enrolled and the code went by email. */
.notice { color: var(--color-primary); font-size: 0.95rem; font-weight: 500; }

/* The site's navbar is fixed and transparent, and the class that gives it a
   background is added by scripts/main.js on scroll. The course page does not
   load that script, so here the bar stayed see-through for ever: scrolling a
   unit slid its title under the logo and the two texts printed on top of each
   other. Inside the course the bar always has its background; there is no hero
   image here for it to float over. */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

/* Inside a unit the page is a frame around one thing: the video, or the deck.
   The chrome above it was taking 360 of 900 pixels - a six rem gap under the
   navbar, a display-size title over two lines, then the tabs - which left the
   deck too short to show its own question box. It is the same title and the
   same tabs, smaller, and the media gets the height back. */
#view-step { padding-top: 5.5rem; padding-bottom: 0; }
#view-step .back { margin-bottom: 0.4rem; }
#step-title { font-size: clamp(1.25rem, 2.2vw, 1.75rem); margin: 0.3rem 0 0.7rem; }
#view-step .unit-tabs { margin-bottom: 0.7rem; }

/* ---- Unit: two ways in, watch or work --------------------------------- */
.unit-tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; }
.unit-tab {
    border: 1px solid var(--glass-border); background: #fff; cursor: pointer;
    border-radius: 999px; padding: 0.45rem 1rem; font: inherit; font-size: 0.92rem;
    color: var(--color-primary);
}
.unit-tab.is-on { background: var(--color-primary); color: #fff; font-weight: 600; }

/* The assistant pane is Ernesto's own "Ask the lecture" deck, framed. It is a
   full page of its own: slides, search, glossary and chat in one, with its own
   side panel. The frame only has to give it a usable height, which the deck
   fills; 16/9 would leave the chat column a few centimetres tall. */
.ask-deck {
    /* The deck is a slide next to a panel, so it needs more than the reading
       column: in there the panel eats a third of the width and the slide
       shrinks to a postage stamp. It breaks out of the column rather than the
       column being widened, which would move every other page.
       It is not edge to edge either. The slide is as wide as the height allows
       and no wider, so on a large screen a full-width deck only buys white
       space between the slide and the panel while the panel is jammed against
       the bezel. The width is set at runtime from the height, which puts the
       conversation beside the slide and the spare room on the outside. */
    position: relative; left: 50%; transform: translateX(-50%);
    width: 100vw; max-width: 100vw;
    height: min(82vh, 54rem); border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    background: #fff; display: block;
}

.ask-gate { margin: 0.5rem 0 0; font-size: 0.85rem; }
/* A phone cannot show the deck's slide and its side panel at once; the deck
   handles that itself, it only needs the height. */
@media (max-width: 700px) { .ask-deck { height: 32rem; } }

/* On a phone the row has no width to spare: a title beside a number beside two
   buttons broke to one word per line. The number stays on the title's line and
   the buttons go underneath, full width, which is also where a thumb is. */
@media (max-width: 700px) {
    .step-head { gap: 0.9rem; padding: 1rem 1.1rem; }
    .step-num { width: 36px; height: 36px; font-size: 0.95rem; }
    .step.is-open .step-panel-inner { padding: 0 1.1rem 1.1rem; }
    .step-actions { justify-content: stretch; }
    .step-actions .btn { flex: 1 1 0; }
}

/* The course view opens on its own name, length and starting point. */
.course-banner { max-width: 46rem; margin: 0 auto 1.75rem; text-align: center; }
.course-banner-kicker {
    margin: 0 0 0.4rem; font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-light);
}
.course-banner-title { margin: 0 0 0.6rem; font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; }
.course-banner-intro { margin: 0; color: var(--color-text-light); line-height: 1.6; }

/* What opens the next unit, on the unit you are on (see renderCourse). */
.step-how {
    margin: 0.25rem 0 0.75rem; padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--color-primary); background: rgba(0, 71, 171, 0.06);
    border-radius: 4px; color: var(--color-text); font-size: 0.95rem;
}

/* Watched, self-assessment still to take: the one thing left to do. */
.step-how.step-how-pending {
    border-left-color: #c2410c;
    background: #fff7ed;
    font-weight: 600;
}

/* Above the deck once the self-assessment ends. */
.step-how.step-how-done {
    border-left-color: #15803d;
    background: #f0fdf4;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

/* How a unit opens the next one, under the course intro. */
.course-how {
    margin: 1rem auto 0;
    max-width: 40rem;
    padding: 0.85rem 1.1rem;
    border-left: 4px solid #1d4ed8;
    background: #eff6ff;
    border-radius: 6px;
    text-align: left;
}
.course-how-title { margin: 0 0 0.4rem; font-weight: 700; }
.course-how ol { margin: 0 0 0.4rem; padding-left: 1.3rem; }
.course-how li { margin: 0.15rem 0; }
.course-how-then { margin: 0; font-weight: 600; }

/* First and last name side by side (enrolment, badge confirmation). */
.name-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 520px) { .name-pair { grid-template-columns: 1fr; } }
.field-hint { font-size: 0.85rem; color: var(--color-text-light); margin: -0.25rem 0 0.5rem; }
.badge-confirm { margin: 1rem 0; }
.badge-name { font-family: var(--font-heading); font-size: 1.8rem; color: #4f46e5; margin: 0.5rem 0 1rem; }
.link-button { background: none; border: 0; padding: 0; color: var(--color-primary); text-decoration: underline; cursor: pointer; font: inherit; }

/* Consent box: 24x24 at least (WCAG 2.5.8; it measured 13x13, audit 2026-11-15). */
.check input[type="checkbox"] { width: 24px; height: 24px; min-width: 24px; flex-shrink: 0; accent-color: var(--color-primary); }

/* Progress strip above an open step (2026-11-22). */
.trail { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin: 1rem 0 0.25rem; }
.trail-pct { font-weight: 700; color: var(--color-primary); margin-right: 0.5rem; font-variant-numeric: tabular-nums; }
.trail button { font: inherit; font-size: 0.85rem; min-width: 2.1rem; height: 2.1rem; padding: 0 0.55rem; border-radius: 999px;
    border: 1px solid rgba(0, 71, 171, 0.25); background: #fff; color: var(--color-primary); cursor: pointer; }
.trail button.is-done { background: rgba(0, 71, 171, 0.10); }
.trail button.is-here { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.trail button:disabled { opacity: 0.4; cursor: default; }
.step-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.step-tabs button.step-next { margin-left: auto; background: var(--color-primary); color: #fff; border-color: var(--color-primary); max-width: 100%; }
.step-tabs button.step-next:disabled { background: #eef1f5; color: #7a8494; border-color: #d5dbe4; cursor: not-allowed; }
.step-tabs button { font: inherit; padding: 0.5rem 1.1rem; border-radius: 999px; border: 1px solid rgba(0, 71, 171, 0.25); background: #fff; color: var(--color-primary); cursor: pointer; font-weight: 600; }
.step-tabs button[aria-pressed="true"] { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
#lost-form { margin-top: 0.75rem; }

/* The step header on one line (Ernesto, 2026-11-22). */
.step-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.9rem; margin: 0.6rem 0 0.8rem; }
.step-bar .back { margin: 0; padding: 0.45rem 0.9rem; font-size: 0.85rem; white-space: nowrap; }
.step-bar .trail { margin: 0; flex-wrap: nowrap; }
.step-bar .trail-pct { margin-right: 0.2rem; }
.step-bar #step-title { flex: 1 1 14rem; min-width: 0; margin: 0; font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.25; text-align: left; }
.step-bar .step-tabs { margin: 0 0 0 auto; flex-wrap: nowrap; }
.step-bar .step-tabs button { white-space: nowrap; padding: 0.45rem 1rem; }

/* An open step uses the screen: the player as wide as the height allows, and
   a thin footer instead of the site's tall one (Ernesto, 2026-11-22). */
#view-step .container.narrow-wide { max-width: clamp(960px, calc((100vh - 15rem) * 1.66), 1600px); }
body:has(#view-step:not([hidden])) .footer { padding: 0.5rem 0; }
body:has(#view-step:not([hidden])) .footer .footer-bottom { border-top: 0; padding-top: 0; margin-top: 0; }
body:has(#view-step:not([hidden])) .footer p { margin: 0; font-size: 0.85rem; }
#view-step #step-body > p, #view-step #step-body .step-note { margin-bottom: 0.4rem; }

/* Everything on the same line: the title takes what is left between the
   progress and the buttons, on two short lines if it must (Ernesto, 2026-11-22). */
.step-bar { flex-wrap: nowrap; gap: 0.6rem; }
.step-bar .back { flex: none; padding: 0.4rem 0.7rem; font-size: 0.8rem; }
.step-bar .trail { flex: none; gap: 0.25rem; }
.step-bar .trail button { min-width: 1.9rem; height: 1.9rem; padding: 0 0.4rem; font-size: 0.8rem; }
.step-bar #step-title { flex: 1 1 0; min-width: 8rem; font-size: clamp(0.95rem, 1.2vw, 1.15rem); line-height: 1.2; }
.step-bar .step-tabs { flex: none; margin-left: 0; }
.step-bar .step-tabs button { padding: 0.4rem 0.8rem; font-size: 0.9rem; }
.step-bar .step-tabs button.step-next { margin-left: 0; }
@media (max-width: 800px) {
  .step-bar { flex-wrap: wrap; }
  .step-bar .trail { flex-wrap: wrap; }
  .step-bar #step-title { flex-basis: 100%; }
}

/* CC BY 4.0 line (2026-11-28) */
.footer .foot-license { font-size: 0.8rem; opacity: 0.85; margin-top: 0.35rem; }

/* Making of, badge screen (2026-11-28) */
.making-of p { font-size: 0.92rem; line-height: 1.65; margin: 0 0 0.7rem; }
.making-of { border-top: 1px solid rgba(0,0,0,.08); padding-top: 1.5rem; }
.making-of a, .footer .foot-license a { text-decoration: underline; text-underline-offset: 2px; }
.making-inline { border-top: 0; padding-top: 0; margin: 0.6rem 0; }
