/* The workbench: the shell, the app bar, the three panes, the controls inside them and the
   status bar, one section per part of the page. Only the shell pages (the workbench and
   /not-found) load this.

   The Blazor version kept these rules in one scoped stylesheet per component, where a
   selector could only reach that component's own markup. They are plain class rules now;
   the handful of places where two components had a rule for the same class with different
   values are kept apart by a modifier class, and say so where they are. */

:root {
    --qf-statusbar-h: 1.5rem;
}

/* ==== Shell ================================================================= */

.qf-shell {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--qf-bg);
    color: var(--qf-text);
    font-family: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
}

/* ==== App bar =============================================================== */

.appbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: none;
    height: 2.75rem;
    padding: 0 0.625rem;
    background: var(--qf-chrome);
    border-bottom: 1px solid var(--qf-border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    flex: none;
    padding-right: 0.25rem;
}

.brand-mark {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: var(--qf-muted);
    stroke-width: 1.6;
}

.brand-mark-flex {
    fill: var(--qf-accent);
    stroke: none;
}

.brand-name {
    color: var(--qf-text);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.brand-name-accent {
    color: var(--qf-accent);
}

.appbar-spacer {
    flex: 1;
}

@media (max-width: 1228.78px) {
    .appbar {
        gap: 0.5rem;
    }
}

/* ==== Theme switch ========================================================== */

.theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex: none;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--qf-border);
    border-radius: 999px;
    background: transparent;
    color: var(--qf-muted);
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

.theme-btn:hover:not(:disabled) {
    background: var(--qf-chrome-hover);
    color: var(--qf-text);
}

.theme-btn:disabled {
    cursor: default;
    opacity: 0.6;
}

/* The label is the first thing to go when the chrome tightens - the glyph on its own still
   says which way the switch will move. */
@media (max-width: 1228.78px) {
    .theme-btn-label {
        display: none;
    }
}

/* ==== Panes ================================================================= */

/* One column of the workbench: a header bar naming it, a body that scrolls on its own, and
   an optional footer strip. */
.pane {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--qf-pane);
}

/* Each pane carries its own hue, used only for the hairline under the header - enough to
   tell the panes apart without colouring the controls themselves. */
.pane-content {
    --pane-hue: var(--qf-side-content);
}

.pane-style {
    --pane-hue: var(--qf-side-style);
}

.pane-code {
    --pane-hue: var(--qf-side-code);
}

.pane-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: none;
    padding: 0.3125rem 0.5rem 0.3125rem 0.625rem;
    background: var(--qf-pane-alt);
    border-bottom: 1px solid var(--qf-border-soft);
    box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--pane-hue) 35%, transparent);
}

.pane-title {
    margin: 0;
    color: var(--qf-text);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pane-meta {
    min-width: 0;
    overflow: hidden;
    color: var(--qf-muted);
    font-size: 0.6875rem;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pane-head-spacer {
    flex: 1;
    min-width: 0.25rem;
}

.pane-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: none;
}

/* The pane scrolls, not the page: the shell owns the viewport and the three panes have very
   different amounts in them. */
.pane-body {
    flex: 1;
    min-height: 0;
    min-width: 0;
    padding: 0.75rem 0.875rem 1.25rem;
    overflow: auto;
    overscroll-behavior: contain;
}

/* Drop the body's padding and let the content fill the pane - what the preview wants, since
   it centres a picture in whatever room is left rather than laying out controls. */
.pane-body.is-plain {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.pane-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: none;
    flex-wrap: wrap;
    padding: 0.5rem 0.625rem;
    background: var(--qf-pane-alt);
    border-top: 1px solid var(--qf-border-soft);
    color: var(--qf-muted);
    font-size: 0.75rem;
}

/* Stacked on a narrow screen: the page scrolls instead, so a pane that scrolls inside
   itself would be a scroll trap with two lines showing. */
@media (max-width: 921.58px) {
    .pane {
        overflow: visible;
    }

    .pane-body {
        overflow: visible;
    }

    .pane-head {
        position: sticky;
        top: 0;
        z-index: 2;
    }
}

/* ==== Workbench ============================================================= */

/* Pane sizes are bare `fr` values so a drag just moves budget between neighbours;
   js/panes.js rewrites these custom properties during a drag. They must stay free of any
   `minmax()` floor - with a floor in the track, grid subtracts the floors before
   distributing the remainder, so sizes stop being proportional to the custom properties
   and the arithmetic in panes.js no longer holds. The minimum pane size is clamped in JS.

   The starting proportions are `var()` fallbacks rather than declarations on this element,
   because a remembered layout is applied to <html> before first paint (see the inline
   script in the page head) and a declaration here would shadow what it inherits. */
.qf {
    position: relative;
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns:
        var(--qf-size-content, 5fr) auto
        var(--qf-size-style, 5fr) auto
        var(--qf-size-code, 6fr);
    background: var(--qf-bg);
}

/* One handle style for both axes: a gutter in the shell colour, hairlined on both sides,
   with a short grip in the middle. Which axis a handle serves is decided by its box - see
   panes.js - so a media query only ever restyles it. */
.qf-split {
    position: relative;
    display: grid;
    place-items: center;
    width: 9px;
    border-inline: 1px solid var(--qf-border);
    background: var(--qf-bg);
    cursor: col-resize;
    touch-action: none;
}

.qf-split::after {
    content: "";
    display: block;
    width: 3px;
    height: 2rem;
    border-radius: 999px;
    background: var(--qf-faint);
    opacity: 0.5;
}

.qf-split:hover,
.qf-split:focus-visible {
    background: var(--qf-accent-wash);
    border-color: var(--qf-accent-dim);
    outline: none;
}

.qf-split:hover::after,
.qf-split:focus-visible::after,
.qf-split.is-dragging::after {
    background: var(--qf-accent);
    opacity: 1;
}

.qf-split.is-dragging {
    background: var(--qf-accent-wash);
    border-color: var(--qf-accent);
}

/* Bigger grab target on touch devices; the gutter keeps its weight because the extra width
   is padding in the shell colour. */
@media (pointer: coarse) {
    .qf-split {
        width: 17px;
    }
}

/* ---- section headings inside the panes ---------------------------------------------- */

.section {
    margin: 1.125rem 0 0.4375rem;
    color: var(--qf-faint);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section:first-child {
    margin-top: 0;
}

/* ---- the type picker ------------------------------------------------------------------ */

/* The content pane in two parts that scroll on their own: the picker, capped so it can never
   push the form off the bottom of a short screen, and the chosen kind's form below it. The
   padding moves from the body onto the parts so each one's scrollbar sits at the edge. */
.pane-body.is-split {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.kind-picker {
    flex: 0 1 auto;
    max-height: 45%;
    padding: 0.75rem 0.875rem;
    overflow: auto;
    overscroll-behavior: contain;
    border-bottom: 1px solid var(--qf-border-soft);
}

.kind-detail {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.75rem 0.875rem 1.25rem;
    overflow: auto;
    overscroll-behavior: contain;
}

/* Clear of the sticky pane header when a choice scrolls the form into view. */
#qf-kind-label {
    scroll-margin-top: 3rem;
}

.kinds {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 0.25rem;
}

.kind {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    min-width: 0;
    padding: 0.3125rem 0.4375rem;
    border: 1px solid var(--qf-border);
    border-radius: 6px;
    background: var(--qf-pane-alt);
    color: var(--qf-muted);
    font: inherit;
    font-size: 0.75rem;
    text-align: left;
    cursor: pointer;
}

.kind span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kind:hover {
    border-color: var(--qf-accent-dim);
    color: var(--qf-text);
}

.kind.is-on {
    background: var(--qf-accent);
    border-color: var(--qf-accent);
    color: var(--qf-accent-ink);
    font-weight: 600;
}

/* The line-art mark for one kind of code. */
.kind-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex: none;
}

/* ---- fields ------------------------------------------------------------------------ */

.fields {
    display: grid;
    gap: 0.625rem;
    margin-bottom: 0.625rem;
}

.fields.is-pair {
    grid-template-columns: 1fr 1fr;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

/* The style pane's own fields - a slider, a list, a row of shape buttons - stand on their
   own rather than in a grid that spaces them, so they bring their own margin. (In the
   Blazor version this was the style page's scoped `.field`, which a content field or a
   colour picker never matched.) */
.field.is-spaced {
    margin-bottom: 0.625rem;
}

.field-label {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    color: var(--qf-muted);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.field-optional {
    color: var(--qf-faint);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.field-note {
    margin: 0 0 0.625rem;
    color: var(--qf-faint);
    font-size: 0.6875rem;
    line-height: 1.4;
}

/* Under a field it is part of the field, and the field's gap is the spacing. */
.field .field-note {
    margin: 0;
}

.field-note.is-wrong {
    color: var(--qf-danger);
}

.control {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.3125rem 0.5rem;
    border: 1px solid var(--qf-border);
    border-radius: 5px;
    background: var(--qf-input);
    color: var(--qf-text);
    font: inherit;
    font-size: 0.8125rem;
}

.control::placeholder {
    color: var(--qf-faint);
}

.control:focus-visible {
    outline: none;
    border-color: var(--qf-accent);
    box-shadow: 0 0 0 2px var(--qf-accent-wash);
}

.control:disabled {
    opacity: 0.45;
}

.control-area {
    resize: vertical;
    min-height: 3.75rem;
    line-height: 1.5;
}

/* A native date, time or select control paints itself with the OS palette unless it is
   told which one is in play - and a dark app with a white calendar popover in it looks
   broken rather than native. */
select.control,
input[type="date"].control,
input[type="time"].control {
    color-scheme: inherit;
}

.is-wrong .control {
    border-color: var(--qf-danger);
}

.is-wrong .control:focus-visible {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--qf-danger) 22%, transparent);
}

.secret {
    display: flex;
    gap: 0.25rem;
}

.secret-peek {
    flex: none;
    padding: 0 0.5rem;
    border: 1px solid var(--qf-border);
    border-radius: 5px;
    background: var(--qf-chrome-2);
    color: var(--qf-muted);
    font: inherit;
    font-size: 0.6875rem;
    cursor: pointer;
}

.secret-peek:hover {
    background: var(--qf-chrome-hover);
    color: var(--qf-text);
}

.switch {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    margin-bottom: 0.4375rem;
    color: var(--qf-text);
    font-size: 0.8125rem;
    cursor: pointer;
    user-select: none;
}

.switch input {
    width: 0.9375rem;
    height: 0.9375rem;
    margin: 0;
    accent-color: var(--qf-accent);
}

/* A toggle on the content pane is its own label, so it loses the caption above and sits on
   the baseline of the fields around it - and it is spaced by the grid it is in. */
.field.is-toggle {
    padding-top: 0.25rem;
}

.field.is-toggle .switch {
    display: inline-flex;
    margin-bottom: 0;
}

/* ---- colour pickers -------------------------------------------------------------------- */

.pick {
    display: flex;
    gap: 0.375rem;
    min-width: 0;
}

/* A native colour input is a button-sized well by default and cannot be restyled beyond its
   box - so it is shrunk to a chip and the padding taken out, which is the one part the
   pseudo-elements below can reach. */
.pick-chip {
    flex: none;
    width: 1.875rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--qf-border);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
}

.pick-chip::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.pick-chip::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.pick-chip::-moz-color-swatch {
    border: none;
    border-radius: 3px;
}

.pick-chip:disabled {
    cursor: default;
    opacity: 0.45;
}

.pick-hex {
    flex: 1;
    font-family: 'JetBrains Mono', 'Cascadia Mono', 'Consolas', ui-monospace, monospace;
    font-size: 0.75rem;
    text-transform: lowercase;
}

/* ---- presets ------------------------------------------------------------------------- */

.presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
    gap: 0.3125rem;
}

.preset {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    min-width: 0;
    padding: 0.25rem 0.4375rem 0.25rem 0.25rem;
    border: 1px solid var(--qf-border);
    border-radius: 6px;
    background: var(--qf-pane-alt);
    color: var(--qf-muted);
    font: inherit;
    font-size: 0.6875rem;
    text-align: left;
    cursor: pointer;
}

.preset:hover {
    border-color: var(--qf-accent-dim);
    color: var(--qf-text);
}

.preset span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The chip is the preset's own two colours with its own module shape drawn in them, so the
   button is a small sample of the thing rather than a name for it. */
.preset-chip {
    display: grid;
    place-items: center;
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid var(--qf-border-soft);
    border-radius: 4px;
}

.preset-chip svg {
    width: 1rem;
    height: 1rem;
}

/* ---- shape and level pickers ---------------------------------------------------------- */

.shapes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3125rem;
}

.shape {
    display: grid;
    place-items: center;
    width: 2.125rem;
    height: 2.125rem;
    padding: 0.3125rem;
    border: 1px solid var(--qf-border);
    border-radius: 6px;
    background: var(--qf-input);
    color: var(--qf-muted);
    cursor: pointer;
}

.shape svg {
    width: 100%;
    height: 100%;
}

.shape:hover {
    border-color: var(--qf-accent-dim);
    color: var(--qf-text);
}

.shape.is-on {
    border-color: var(--qf-accent);
    background: var(--qf-accent-wash);
    color: var(--qf-accent);
}

.levels {
    display: flex;
    gap: 0.3125rem;
}

.level {
    flex: 1;
    padding: 0.25rem 0;
    border: 1px solid var(--qf-border);
    border-radius: 6px;
    background: var(--qf-input);
    color: var(--qf-muted);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.level:hover {
    border-color: var(--qf-accent-dim);
    color: var(--qf-text);
}

.level.is-on {
    background: var(--qf-accent);
    border-color: var(--qf-accent);
    color: var(--qf-accent-ink);
}

/* ---- the middle ------------------------------------------------------------------------ */

.middle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.625rem;
}

.glyph {
    width: 1.875rem;
    height: 1.875rem;
    padding: 0;
    border: 1px solid var(--qf-border);
    border-radius: 6px;
    background: var(--qf-input);
    font-size: 0.9375rem;
    line-height: 1;
    cursor: pointer;
}

.glyph:hover {
    border-color: var(--qf-accent-dim);
}

.glyph.is-on {
    border-color: var(--qf-accent);
    background: var(--qf-accent-wash);
}

.upload {
    display: flex;
    gap: 0.3125rem;
}

/* The file input is the label: a native one cannot be restyled, and wrapping it lets the
   label be the button while the input keeps doing the work. */
.upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.slider {
    width: 100%;
    margin: 0.375rem 0 0;
    accent-color: var(--qf-accent);
}

/* ---- the preview ----------------------------------------------------------------------- */

/* A size container, so the code can be sized to whichever of the stage's width and height
   is smaller. Sized from its width alone it ran taller than a short stage and spilled down
   over the verdict and the issues under it. */
.stage {
    display: grid;
    place-items: center;
    flex: 1;
    min-height: 9rem;
    padding: 1.25rem;
    overflow: hidden;
    container-type: size;
    background: var(--qf-pane-alt);
}

/* A transparent code has to be shown against something, and a checkerboard is the one
   background that reads as "there is nothing here" rather than as a colour choice. */
.stage.is-checked {
    background-color: var(--qf-pane-alt);
    background-image:
        linear-gradient(45deg, var(--qf-chrome-2) 25%, transparent 25%, transparent 75%, var(--qf-chrome-2) 75%),
        linear-gradient(45deg, var(--qf-chrome-2) 25%, transparent 25%, transparent 75%, var(--qf-chrome-2) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
}

.code {
    /* As big as fits both ways - a tall thin pane or a short wide one. */
    width: min(28rem, 100cqw, 100cqh);
    aspect-ratio: 1;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.14);
}

.code svg {
    display: block;
    width: 100%;
    height: 100%;
}

.stage-empty {
    display: grid;
    justify-items: center;
    gap: 0.625rem;
    max-width: 15rem;
    color: var(--qf-faint);
    text-align: center;
}

.stage-empty svg {
    width: 1.75rem;
    height: 1.75rem;
}

.stage-empty p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
}

/* ---- the verdict and what is wrong ------------------------------------------------------- */

.verdict {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: none;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--qf-border-soft);
    font-size: 0.8125rem;
}

.verdict-dot {
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: currentColor;
}

.verdict.is-good {
    color: var(--qf-ok);
}

.verdict.is-fair {
    color: var(--qf-warn);
}

.verdict.is-bad {
    color: var(--qf-danger);
}

.verdict.is-idle {
    color: var(--qf-faint);
}

.issues {
    flex: none;
    max-height: 12rem;
    margin: 0;
    padding: 0 0.75rem 0.5rem;
    overflow: auto;
    list-style: none;
}

.issue {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.375rem 0 0.375rem 0.625rem;
    border-left: 2px solid var(--qf-border);
    color: var(--qf-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

.issue + .issue {
    margin-top: 0.25rem;
}

.issue.is-error {
    border-left-color: var(--qf-danger);
    color: var(--qf-text);
}

.issue.is-warning {
    border-left-color: var(--qf-warn);
}

.issue span {
    flex: 1;
    min-width: 10rem;
}

/* ---- the encoded text -------------------------------------------------------------------- */

.reveal {
    flex: none;
    padding: 0 0.75rem 0.5rem;
    font-size: 0.75rem;
}

.reveal summary {
    color: var(--qf-muted);
    cursor: pointer;
    user-select: none;
}

.reveal summary:hover {
    color: var(--qf-text);
}

.reveal-body {
    max-height: 8rem;
    margin: 0.375rem 0 0;
    padding: 0.5rem 0.625rem;
    overflow: auto;
    border: 1px solid var(--qf-border-soft);
    border-radius: 5px;
    background: var(--qf-input);
    color: var(--qf-muted);
    font-family: 'JetBrains Mono', 'Cascadia Mono', 'Consolas', ui-monospace, monospace;
    font-size: 0.6875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ---- shared small controls --------------------------------------------------------------- */

/* Small ghost buttons in the pane header bars and the code pane's footer. */
.pane-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.4375rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--qf-muted);
    font: inherit;
    font-size: 0.75rem;
    white-space: nowrap;
    cursor: pointer;
}

.pane-btn:hover:not(:disabled) {
    background: var(--qf-chrome-hover);
    border-color: var(--qf-border);
    color: var(--qf-text);
}

/* The one button on the pane that is the point of it. */
.pane-btn.is-solid {
    background: var(--qf-accent);
    border-color: var(--qf-accent);
    color: var(--qf-accent-ink);
    font-weight: 600;
}

.pane-btn.is-solid:hover:not(:disabled) {
    background: var(--qf-accent-bright);
    border-color: var(--qf-accent-bright);
    color: var(--qf-accent-ink);
}

.pane-btn:disabled {
    cursor: default;
    opacity: 0.45;
}

.control-inline {
    width: auto;
    padding: 0.1875rem 0.375rem;
    border: 1px solid var(--qf-border);
    border-radius: 4px;
    background: var(--qf-input);
    color: var(--qf-muted);
    font: inherit;
    font-size: 0.75rem;
}

/* A one-click correction beside the issue it fixes. */
.pill {
    flex: none;
    padding: 0.125rem 0.5rem;
    border: 1px solid var(--qf-accent-dim);
    border-radius: 999px;
    background: transparent;
    color: var(--qf-accent);
    font: inherit;
    font-size: 0.6875rem;
    white-space: nowrap;
    cursor: pointer;
}

.pill:hover {
    background: var(--qf-accent-wash);
}

/* ==== Status bar ============================================================ */

.statusbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: none;
    box-sizing: border-box;
    /* Fixed, so the privacy sheet can sit exactly on top of it. */
    height: var(--qf-statusbar-h);
    padding: 0 0.75rem;
    background: var(--qf-chrome);
    border-top: 1px solid var(--qf-border);
    color: var(--qf-muted);
    font-size: 0.6875rem;
}

.statusbar-item {
    flex: none;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.statusbar-spacer {
    flex: 1;
}

.statusbar-note {
    color: var(--qf-faint);
    white-space: nowrap;
}

/* Something the user asked for did not happen. */
.statusbar-warn {
    min-width: 0;
    overflow: hidden;
    color: var(--qf-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Feedback, Privacy and the privacy sheet are css/privacy-sheet.css and css/feedback.css,
   copies of shared/feedback-and-privacy/. */

/* ==== Narrower ============================================================== */

@media (max-width: 1228.78px) {
    .fields.is-pair {
        grid-template-columns: 1fr;
    }

    .statusbar-note {
        display: none;
    }
}

/* Below tablet width three columns cannot sit side by side. The workbench becomes one
   scrolling column in reading order - what it says, how it looks, what that comes out as -
   and the handles go, since there is nothing left to divide. */
@media (max-width: 921.58px) {
    .qf {
        display: block;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .qf-split {
        display: none;
    }

    /* The page scrolls, so the stage has no height of its own to give the code - it is
       given one about as tall as the screen is wide. */
    .stage {
        height: min(100vw, 30rem);
        min-height: 16rem;
    }

    /* One scroll, the page's, for the content pane too. */
    .pane-body.is-split {
        display: block;
        overflow: visible;
    }

    .kind-picker,
    .kind-detail {
        max-height: none;
        overflow: visible;
    }

    .statusbar {
        gap: 0.625rem;
        overflow-x: auto;
    }
}

/* ==== Not found ============================================================= */

.missing {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 2rem;
    text-align: center;
}

.missing h1 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.missing p {
    margin: 0 0 1rem;
    color: var(--qf-muted);
}

.missing a {
    color: var(--qf-accent);
}
