/* Huisstijl CBS De Bouwsteen (kleuren en fonts van debouwsteen.csgdewaard.nl) */
:root {
    --blue: #4ba3c3;
    --blue-light: #63b2ce;
    --blue-dark: #3889a8;
    --blue-deep: #1d7ea5;
    --blue-bg: #eff9fc;
    --red: #e94c49;
    --red-dark: #c53f3c;
    --red-bg: #fef2f2;
    --ink: #050545;
    --ink-soft: #55557a;
    --line: #d6e9f1;
    --green: #2d8f68;
    --green-bg: #edfbf4;
    --yellow: #ffcf00;
    --yellow-dark: #d99900;
    --yellow-bg: #fff8e1;
    --orange: #f47b42;
    --purple: #9c5ca0;
    --pink: #ce4c7c;
    --navy: #084c6f;

    --radius: 16px;
    --radius-sm: 10px;
    --font-heading: "Quicksand", sans-serif;
    --font-body: "Poppins", sans-serif;
    --stripe: linear-gradient(90deg,
        var(--green) 0 16%, var(--navy) 16% 34%, var(--yellow) 34% 47%,
        var(--purple) 47% 62%, var(--pink) 62% 76%, var(--orange) 76% 90%, var(--red) 90% 100%);
    --shadow: 0 18px 40px -24px rgba(5, 5, 69, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font: 400 15px/1.6 var(--font-body);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

button, input, textarea { font: inherit; color: inherit; }

[hidden] { display: none !important; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Logo ---------- */

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__icon { width: 44px; height: auto; flex: none; }
.brand__name { width: 112px; height: auto; }

/* ---------- Hero met golvende onderrand ---------- */

.hero {
    position: relative;
    background: var(--blue);
    color: #fff;
    padding: 20px 16px 72px;
    isolation: isolate;
    /* De golf steekt links en rechts uit; alleen horizontaal afknippen zodat de linten zichtbaar blijven */
    overflow-x: clip;
}

.hero::after {
    content: "";
    position: absolute;
    left: -15%;
    right: -15%;
    bottom: -56px;
    height: 112px;
    background: var(--blue);
    border-radius: 0 0 50% 50%;
    z-index: -1;
}

.topnav {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px 10px 20px;
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.topnav__left { display: flex; align-items: center; gap: 18px; min-width: 0; }

.topnav__tool {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .95rem;
    padding-left: 18px;
    border-left: 2px solid var(--line);
    white-space: nowrap;
}

.topnav__account { display: flex; align-items: center; gap: 12px; font-size: .85rem; }
.topnav__user { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.topnav__account form { margin: 0; }

.hero__intro {
    position: relative;
    max-width: 640px;
    margin: 44px auto 0;
    text-align: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px;
    border: 1.5px solid rgba(255, 255, 255, .55);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.hero__badge::before {
    content: "";
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 0 3px rgba(255, 207, 0, .3);
}

.hero h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 14px 0 10px; }
.hero__lead { margin: 0; opacity: .92; }

/* Gekleurde linten als decoratie, zoals op de schoolsite */
.ribbons {
    position: absolute;
    right: max(16px, calc(50% - 600px));
    bottom: -88px;
    width: 190px;
    z-index: 1;
    pointer-events: none;
}

.ribbons path {
    fill: none;
    stroke-width: 26;
    stroke-linecap: round;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: draw 1.1s cubic-bezier(.6, .1, .2, 1) forwards;
}

.ribbons path:nth-child(2) { animation-delay: .25s; }
.ribbons path:nth-child(3) { animation-delay: .5s; }
.ribbons path:nth-child(4) { animation-delay: .75s; }

@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Werkruimte ---------- */

.workspace {
    position: relative;
    z-index: 2;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px 80px;
}

.card {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 0 0 8px var(--blue-bg), var(--shadow);
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: var(--stripe);
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--blue-dark);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ---------- Knoppen ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}

.btn:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn--accent { background: var(--red); }
.btn--accent:hover { background: var(--red-dark); }

.btn--ghost {
    background: #fff;
    color: var(--blue-deep);
    border-color: var(--blue-light);
}

.btn--ghost:hover { background: var(--blue-bg); }

.btn--large { padding: 14px 28px; font-size: 1rem; }

.btn--small { padding: 6px 16px; font-size: .82rem; }

.btn-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--blue-deep);
    font-size: .85rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.btn-link:hover { color: var(--ink); }
.btn-link:disabled { opacity: .4; cursor: not-allowed; }
.btn-link--danger { color: var(--red-dark); }
.btn-link.is-confirming { color: #fff; background: var(--red); border-radius: 999px; padding: 3px 12px; text-decoration: none; }

.arrow { transition: transform .15s; }
.btn:hover .arrow--right { transform: translateX(3px); }
.btn:hover .arrow--left { transform: translateX(-3px); }

/* ---------- Formulierelementen ---------- */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.field label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .95rem;
}

.field .optional { color: var(--ink-soft); font-weight: 500; font-size: .8rem; }

.input, .textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.input:hover, .textarea:hover { border-color: var(--blue-light); }

.input:focus, .textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px var(--blue-bg);
}

.input.is-invalid { border-color: var(--red); background: var(--red-bg); }

.textarea { min-height: 150px; resize: vertical; line-height: 1.55; }

.field-error { color: var(--red-dark); font-size: .82rem; font-weight: 500; }

/* ---------- Startscherm ---------- */

.start {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 40px 36px;
}

.start h2 { font-size: 1.5rem; margin-bottom: 6px; }
.start__lead { margin: 0 0 28px; color: var(--ink-soft); }

.counter { display: flex; align-items: center; gap: 10px; }

.counter__btn {
    width: 46px; height: 46px;
    flex: none;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: #fff;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--blue-deep);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.counter__btn:hover { border-color: var(--blue); background: var(--blue-bg); }
.counter__btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.counter .input {
    width: 96px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    padding: 4px 8px;
    -moz-appearance: textfield;
}

.counter .input::-webkit-inner-spin-button,
.counter .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.start__defaults {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 2px dashed var(--line);
}

.start__defaults-title {
    grid-column: 1 / -1;
    margin: 0;
    font-size: .88rem;
    color: var(--ink-soft);
}

.start__actions { margin-top: 30px; display: flex; justify-content: flex-end; }

/* ---------- Wizard ---------- */

.wizard {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

/* Overzicht */

.overview {
    position: sticky;
    top: 20px;
    padding: 24px 16px 18px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
}

.overview__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 8px 12px;
}

.overview__head h2 { font-size: 1.15rem; }
.overview__count { font-size: .8rem; color: var(--ink-soft); }

.progress {
    height: 8px;
    margin: 0 8px 14px;
    border-radius: 999px;
    background: var(--blue-bg);
    overflow: hidden;
}

.progress__bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--stripe);
    background-size: 300px 100%;
    transition: width .4s cubic-bezier(.4, 0, .2, 1);
}

.overview__list {
    list-style: none;
    margin: 0;
    padding: 2px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scrollbar-width: thin;
}

.ov-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}

.ov-item:hover { background: var(--blue-bg); }
.ov-item:focus-visible { outline: 3px solid var(--yellow); outline-offset: -1px; }

.ov-item.is-current { background: var(--blue); color: #fff; }
.ov-item.is-current .ov-meta { color: rgba(255, 255, 255, .85); }

.ov-num {
    width: 30px; height: 30px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px dashed #b9d7e4;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .85rem;
    color: var(--ink-soft);
    background: #fff;
}

.ov-item.is-busy .ov-num,
.summary-row.is-busy .ov-num { border: 2px solid var(--yellow); background: var(--yellow-bg); color: var(--ink); }
.ov-item.is-done .ov-num,
.summary-row.is-done .ov-num { border: 2px solid var(--green); background: var(--green); color: #fff; }
.ov-item.is-current .ov-num { border-color: #fff; }

.ov-text { display: flex; flex-direction: column; min-width: 0; }

.ov-name {
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ov-name.is-placeholder { font-style: italic; font-weight: 400; opacity: .75; }

.ov-meta { font-size: .74rem; color: var(--ink-soft); }

.ov-item--finish .ov-num { border: 2px solid var(--red); color: var(--red); }
.ov-item--finish:hover { background: var(--red-bg); }
.ov-item--finish.is-current { background: var(--red); }
.ov-item--finish.is-current .ov-num { background: #fff; color: var(--red); border-color: #fff; }

.overview__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 14px 8px 0;
    margin-top: 10px;
    border-top: 2px dashed var(--line);
}

/* Stap */

.step { padding: 36px 40px 30px; }

.step__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}

.step__title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); outline: none; overflow-wrap: anywhere; }
.step__title.is-placeholder { color: #a9b6c9; }

.step__status {
    flex: none;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    background: var(--blue-bg);
    color: var(--blue-deep);
}

.step__status.is-done { background: var(--green-bg); color: var(--green); }
.step__status.is-busy { background: var(--yellow-bg); color: #8a6400; }

.block + .block { margin-top: 30px; padding-top: 26px; border-top: 2px dashed var(--line); }

.block__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.block__title::before {
    content: "";
    width: 10px; height: 10px;
    border-radius: 3px;
    background: var(--block-color, var(--blue));
    transform: rotate(45deg);
}

.block--details { --block-color: var(--blue); }
.block--levels { --block-color: var(--red); }
.block--remarks { --block-color: var(--yellow); }

.details-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 16px;
}

/* Niveaus, zoals de vakjes op het rapport */

.phase-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: -4px 0 16px;
    font-size: .78rem;
    color: var(--ink-soft);
}

.phase-legend span { display: inline-flex; align-items: center; gap: 6px; }

.phase-legend i {
    display: inline-flex;
    gap: 2px;
}

.phase-legend i b {
    width: 7px; height: 7px;
    border: 1.5px solid var(--blue);
    border-radius: 1px;
}

.phase-legend i b.on { background: var(--blue); }

.levels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 22px;
}

.level {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    border: 2px solid transparent;
    transition: background .15s, border-color .15s;
}

.level:hover, .level:focus-within { background: var(--blue-bg); }

.level__icon {
    grid-row: 1 / 3;
    width: 52px; height: 52px;
    border-radius: 10px;
    object-fit: cover;
}

.level__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.level__label { font-family: var(--font-heading); font-weight: 700; font-size: 1rem; }

.level__phase {
    font-size: .75rem;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
}

.level__phase.is-set { color: var(--blue-deep); }

.level__boxes { display: flex; gap: 5px; margin-top: 6px; }

.level-box {
    width: 32px; height: 32px;
    padding: 0;
    border: 2.5px solid var(--blue);
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: background .12s, transform .12s, border-color .12s;
}

.level-box:hover { transform: translateY(-2px); border-color: var(--blue-deep); }
.level-box:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.level-box[aria-pressed="true"] { background: var(--blue); }
.level-box.pop { animation: pop .28s cubic-bezier(.3, 1.6, .5, 1); }

@keyframes pop {
    0% { transform: scale(.75); }
    100% { transform: scale(1); }
}

.level__clear {
    margin-left: 4px;
    width: 32px; height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-soft);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s, background .15s;
}

.level:hover .level__clear, .level:focus-within .level__clear { opacity: 1; }
.level__clear:hover { background: #fff; color: var(--red); }
.level__clear:focus-visible { opacity: 1; outline: 3px solid var(--yellow); }
.level__clear[hidden] { display: none; }

.remarks-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    font-size: .78rem;
    color: var(--ink-soft);
}

.remarks-meta .is-long { color: #8a6400; font-weight: 600; }

/* Navigatie onder de stap */

.step__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 2px solid var(--blue-bg);
}

.step__nav-middle { display: flex; flex-direction: column; align-items: center; gap: 4px; }

.kbd-hint { font-size: .72rem; color: var(--ink-soft); }

kbd {
    padding: 1px 6px;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 5px;
    font: 600 .7rem var(--font-body);
    background: #fff;
}

/* Overgang tussen stappen */

.enter-next { animation: enter-next .32s cubic-bezier(.2, .7, .2, 1); }
.enter-prev { animation: enter-prev .32s cubic-bezier(.2, .7, .2, 1); }
.enter-fade { animation: enter-fade .32s ease-out; }

@keyframes enter-next { from { opacity: 0; transform: translateX(28px); } }
@keyframes enter-prev { from { opacity: 0; transform: translateX(-28px); } }
@keyframes enter-fade { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Afronden ---------- */

.summary { padding: 36px 40px 34px; }
.summary h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 6px; }
.summary__lead { margin: 0 0 22px; color: var(--ink-soft); }

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.stat {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--blue-bg);
}

.stat strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    line-height: 1.1;
}

.stat span { font-size: .8rem; color: var(--ink-soft); }
.stat--green { background: var(--green-bg); }
.stat--green strong { color: var(--green); }
.stat--yellow { background: var(--yellow-bg); }
.stat--yellow strong { color: #8a6400; }

.notice {
    display: flex;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: .88rem;
}

.notice--error { background: var(--red-bg); color: var(--red-dark); }
.notice--warning { background: var(--yellow-bg); color: #6b4e00; }
.notice--success { background: var(--green-bg); color: var(--green); }
.notice strong { font-weight: 600; }

.summary-list {
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
    border: 2px solid var(--blue-bg);
    border-radius: 14px;
    overflow: hidden;
}

.summary-row {
    width: 100%;
    display: grid;
    grid-template-columns: 34px minmax(0, 1.6fr) minmax(0, .7fr) auto 70px;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border: 0;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}

.summary-list li + li .summary-row { border-top: 2px solid var(--blue-bg); }
.summary-row:hover { background: var(--blue-bg); }
.summary-row:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }

.summary-row .ov-num { width: 28px; height: 28px; font-size: .8rem; }
.summary-row__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-row__name.is-missing { color: var(--red-dark); font-style: italic; font-weight: 500; }
.summary-row__group { font-size: .85rem; color: var(--ink-soft); }
.summary-row__remarks { font-size: .78rem; color: var(--ink-soft); text-align: right; }

.mini-levels { display: flex; gap: 8px; }

.mini-level { display: flex; gap: 1.5px; }

.mini-level b {
    width: 6px; height: 12px;
    border-radius: 1.5px;
    background: var(--blue-bg);
    border: 1px solid #c4e1ec;
}

.mini-level b.on { background: var(--blue); border-color: var(--blue); }
.mini-level.is-empty b { border-color: var(--yellow); background: var(--yellow-bg); }

.generate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border-radius: 14px;
    background: var(--blue-bg);
    text-align: center;
}

.generate__progress { width: min(360px, 100%); margin: 0; }

.summary__restart { margin: 18px 0 0; text-align: center; }

.ov-add-mobile { display: none; }
.ov-item--add .ov-num { border: 2px solid var(--blue-light); color: var(--blue-deep); }
.ov-item--add:disabled { opacity: .4; cursor: not-allowed; }
.generate__status { margin: 0; font-size: .88rem; color: var(--ink-soft); min-height: 1.4em; }

/* ---------- Inloggen ---------- */

.login {
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 36px 34px;
    text-align: center;
}

.login h2 { font-size: 1.4rem; margin-bottom: 8px; }
.login p { margin: 0 0 24px; color: var(--ink-soft); }
.login .notice { text-align: left; }

.google-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border: 2px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}

.google-button:hover { border-color: var(--blue); transform: translateY(-1px); box-shadow: var(--shadow); }
.google-button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Laad-animatie ---------- */

.reveal { animation: enter-fade .6s cubic-bezier(.2, .7, .2, 1) both; }
.reveal--1 { animation-delay: .05s; }
.reveal--2 { animation-delay: .15s; }
.reveal--3 { animation-delay: .3s; }

/* ---------- Mobiel ---------- */

@media (max-width: 900px) {
    .wizard { grid-template-columns: minmax(0, 1fr); gap: 28px; }

    /* Overzicht wordt een horizontale balk bovenaan die meescrolt */
    .overview {
        position: sticky;
        top: 8px;
        z-index: 5;
        max-height: none;
        padding: 16px 10px 10px;
    }

    .overview__head { padding: 0 6px 8px; }

    /* Compact houden: knoppen staan als chip in de lijst en bij Afronden */
    .progress, .overview__foot { display: none; }
    .ov-add-mobile { display: block; }

    .overview__list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px;
        padding-bottom: 6px;
        scroll-snap-type: x proximity;
    }

    .overview__list li { flex: none; scroll-snap-align: start; }
    .ov-item { width: auto; max-width: 180px; padding: 6px 12px 6px 6px; }
    .ov-meta { display: none; }
}

@media (max-width: 640px) {
    .hero { padding-bottom: 56px; }
    .topnav { border-radius: 22px; padding: 10px 12px; }
    .topnav__tool, .topnav__user, .ribbons { display: none; }
    .brand__name { width: 96px; }
    .start, .step, .summary { padding: 28px 18px 22px; }
    .start__defaults, .details-grid { grid-template-columns: minmax(0, 1fr); }
    .levels { grid-template-columns: minmax(0, 1fr); }
    .level { padding: 8px 4px; }
    .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .stat:last-child { grid-column: 1 / -1; }
    .summary-row { grid-template-columns: 28px minmax(0, 1fr) auto; }
    .summary-row__group, .summary-row__remarks { display: none; }
    .mini-levels { gap: 4px; }
    .step__nav { flex-wrap: wrap; }
    .step__nav-middle { order: 3; width: 100%; }
    .kbd-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
