/*
 * Admin area: the remaining pages and the design editor.
 * Templates: app/templates/admin/inquiries.php, inquiry.php, logs.php, settings.php, design-global.php,
 *            partials/design-editor.php, partials/preview-pane.php, partials/color-input.php, login.php
 * Owner: the "pages" page work. Edit only this file for these screens; generic components, tokens and
 * the shell live in admin.css (see .taste-skill/glass/components.md).
 *
 * The editor + live preview layout (.editor-layout, .preview-pane, .design-editor) is also used by the
 * event and category forms. The login card itself (.login-page, .login-box) lives in admin.css because
 * the install wizard, which links only admin.css, shares it.
 *
 * The rules below are the pre-glass rules of these screens, moved here and adapted to the glass tokens.
 */

/* ==========================================================================
   Nastavení (settings.php): macOS System Settings on desktop, iOS Settings on the phone
   ========================================================================== */
.set-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--gap); }
.set-main { display: grid; min-width: 0; gap: var(--gap); }
.set-main > form { display: grid; min-width: 0; gap: var(--gap); margin: 0; }
.set-main .panel + .panel { margin-top: 0; }
.set-nav { display: none; padding: 8px; }
.set-nav .list { display: grid; gap: 2px; }
.set-nav__row { min-height: 44px; padding: 7px 10px; gap: 12px; }
.set-nav__row .tile-icon { width: 28px; height: 28px; border-radius: 8px; }
.set-nav__row .tile-icon .icon { width: 17px; height: 17px; }
.set-nav__row .list-row__title { font-weight: 500; }
.set-errors { display: flex; align-items: center; gap: 10px; margin: 0; }
.set-errors .icon { width: 20px; height: 20px; }
.set-section { padding: 0; scroll-margin-top: calc(var(--edge) + var(--topbar-h) + 20px); }
.set-head { display: flex; align-items: flex-start; gap: 14px; padding: var(--card-pad) var(--card-pad) 16px; }
.set-head > div { min-width: 0; padding-top: 1px; }
.set-head h2 { font-size: var(--fs-headline); }
.set-head .hint { max-width: 46rem; margin-top: 3px; }
/* Rows: label left, control right (label above on the phone). The field partial's markup is laid out by grid. */
.set-rows { margin: 0 10px 10px; padding: 0 14px; border-radius: 18px; background: var(--fill-1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.set-rows > .field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 14px 0; }
.set-rows > .field + .field { border-top: 1px solid var(--separator); }
.set-rows > .field > label, .set-rows .field__label { margin: 0; color: var(--text); font-size: var(--fs-body); font-weight: 500; line-height: 1.35; }
.set-rows > .field > .hint, .set-rows > .field > .field-error { margin: 0; }
.set-rows .hint .icon { display: inline-block; width: 14px; height: 14px; margin: -2px 5px 0 0; vertical-align: middle; color: var(--green); }
.set-rows textarea { min-height: 104px; }
.set-secure { width: 100%; max-width: 26rem; }
.set-clear { min-height: 40px; padding: 2px 0 0; color: var(--text-2); }
.set-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0 10px 10px; padding: 14px; border-radius: 18px; background: var(--fill-1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.set-action > div { flex: 1 1 16rem; min-width: 0; }
.set-action__title { font-weight: 500; }
.set-action .hint { margin-top: 2px; }
.set-hidden-form { display: none; }
.set-devices { display: flex; align-items: center; gap: 14px; }
.set-devices__count { display: grid; flex: none; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 14px; background: var(--fill-3); font-size: var(--fs-title3); font-weight: 700; text-align: center; }
.remember-devices__count { color: var(--text-2); font-size: var(--fs-sub); }
.set-nav__row[aria-current="true"] { background: var(--fill-4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10); }
.set-nav__row[aria-current="true"] .list-row__title { font-weight: 600; }
.confirm-dialog p.set-dialog__title { margin: 0 0 6px; font-size: var(--fs-headline); font-weight: 700; }
.confirm-dialog p.set-dialog__text { margin: 0 0 22px; color: var(--text-2); font-size: var(--fs-sub); font-weight: 400; }
/* Save: the hint, then the one primary button on the right (as the event and category save bars). */
.set-save, .de-save { justify-content: flex-end; }
.set-save__hint, .de-save__hint { flex: 1 1 12rem; min-width: 0; padding-left: 10px; }
@media (min-width: 768px) {
    .set-rows > .field { grid-template-columns: minmax(140px, 190px) minmax(0, 1fr); column-gap: 24px; row-gap: 0; align-items: center; }
    .set-rows > .field > .hint, .set-rows > .field > .field-error, .set-rows > .field > .set-clear { margin-top: 6px; }
    .set-rows > .field > input:not([type="checkbox"]), .set-rows > .field > textarea, .set-rows > .field > .set-secure { max-width: 34rem; }
    .set-rows > .field > input.set-port { max-width: 8rem; }
    .set-rows > .field > label, .set-rows .field__label { grid-column: 1; grid-row: 1 / span 4; align-self: start; padding-top: 11px; }
    .set-rows > .field > :not(label):not(.field__label) { grid-column: 2; }
}
@media (min-width: 1024px) {
    .set-layout { grid-template-columns: 248px minmax(0, 1fr); }
    .set-nav { position: sticky; top: calc(var(--edge) + var(--topbar-h) + 16px); display: block; }
}
@media (max-width: 767.98px) {
    .set-head { padding: 18px 18px 14px; }
    .set-head .tile-icon-lg { width: 36px; height: 36px; border-radius: 10px; }
    .set-head .tile-icon-lg .icon { width: 20px; height: 20px; }
    .set-rows, .set-action { margin: 0 8px 8px; }
    .set-action .btn { width: 100%; }
    /* The same full glass bar as on desktop (and .ev-savebar): hint left, Save right, above the tab bar. */
    .set-save, .de-save { flex-wrap: nowrap; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 28px; bottom: calc(10px + var(--tabbar-h) + 8px + env(safe-area-inset-bottom)); }
    .set-save > .btn, .de-save > .btn { --btn-h: 42px; flex: none; padding: 0 22px; }
    .set-save__hint, .de-save__hint { flex: 1 1 auto; padding-left: 6px; font-size: var(--fs-caption); line-height: 1.3; }
}

/* ==========================================================================
   Poptávky (inquiries.php, inquiry.php, partials/inquiry-list.php): Messages
   Tablet and desktop: the list column stays (sticky, scrolls inside), the conversation fills the rest and the
   profile column joins at >= 1280px (below the conversation before that). Phone: list page = list, detail = detail.
   ========================================================================== */
.inq-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--gap); }
.inq-list { display: flex; flex-direction: column; padding: 8px; }
.inq-list__tools { display: grid; gap: 10px; padding: 6px 6px 12px; }
.inq-list__tools .search-field input { min-height: 38px; padding: 7px 14px 7px 36px; background-color: var(--fill-dim); } /* padding-left: admin.css's later generic input[type=search] rule overrides .search-field's */
.inq-list__tools .segmented { min-height: 34px; }
.inq-layout > .panel { margin-top: 0; }
.segmented .inq-count {
    flex: none;
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--r-control);
    background: var(--blue);
    color: #fff;
    font-size: var(--fs-caption2);
    font-weight: 700;
    line-height: 1;
}
.inq-items { display: grid; align-content: start; gap: 2px; }
.inq-row { align-items: flex-start; gap: 12px; padding: 11px 12px 12px; }
.inq-row .list-row__lead { padding-top: 1px; }
.inq-row__top { display: flex; align-items: baseline; gap: 8px; }
.inq-row__top .list-row__title { flex: 1; min-width: 0; font-weight: 500; }
.inq-item.is-unread .list-row__title { font-weight: 700; }
.inq-row__time { flex: none; color: var(--text-3); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.inq-item.is-unread .inq-row__time { color: var(--blue-hover); font-weight: 600; }
.inq-row__type { display: block; overflow: hidden; margin-top: 1px; color: var(--text); font-size: var(--fs-sub); font-weight: 500; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.inq-row__preview {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 2px;
    color: var(--text-2);
    font-size: var(--fs-sub);
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow-wrap: anywhere;
}
/* The unread dot sits under the time, as the badge does in Messages; read rows give the text the full width. */
.inq-row { position: relative; }
.inq-row__mark { position: absolute; top: 37px; right: 14px; display: flex; }
.inq-row__mark:empty { display: none; }
.inq-item.is-unread .inq-row__type, .inq-item.is-unread .inq-row__preview { padding-right: 18px; }
.inq-row:focus-visible { outline-offset: -2px; } /* the rows scroll inside .inq-items, which would clip an outer ring */
.inq-row[aria-current="page"] .inq-row__preview { color: rgba(255, 255, 255, 0.78); }
.inq-scope { padding: 2px 12px 8px; color: var(--text-3); text-align: center; }
.inq-none { padding: 18px 12px; color: var(--text-2); font-size: var(--fs-sub); text-align: center; }
.inq-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 12px 6px 4px; border-top: 1px solid var(--separator); }
.inq-pager__gap { width: 32px; }

/* Conversation */
.inq-pane { display: flex; flex-direction: column; padding: 0; }
.inq-pane--idle { min-height: 26rem; }
.inq-pane--idle { justify-content: center; }
.inq-convo__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px 14px 18px; border-bottom: 1px solid var(--separator); }
.inq-convo__who { flex: 1; min-width: 0; }
.inq-convo__who h2 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.inq-convo__who .caption { overflow: hidden; margin-top: 1px; white-space: nowrap; text-overflow: ellipsis; }
.inq-convo__actions { display: flex; flex: none; align-items: center; gap: 8px; }
.inq-convo__actions .btn-icon { width: 36px; height: 36px; }
.inq-convo__actions .btn-icon .icon { width: 18px; height: 18px; }
.inq-convo__actions .btn-icon.is-done { background: var(--tint-green); color: var(--green); }
.inq-back { display: none; }
.inq-convo__body { display: flex; flex: 1; flex-direction: column; gap: 14px; padding: 18px 22px 24px; }
.inq-day { display: flex; justify-content: center; }
.inq-day span { padding: 3px 11px; border-radius: var(--r-control); background: var(--fill-2); color: var(--text-2); font-size: var(--fs-caption2); font-weight: 600; letter-spacing: 0.01em; }
.inq-msg { display: flex; align-items: flex-end; gap: 10px; max-width: min(42rem, 92%); }
.inq-msg > .avatar { margin-bottom: 2px; }
.inq-bubble {
    position: relative;
    min-width: 0;
    padding: 12px 16px 8px;
    border-radius: 20px 20px 20px 6px;
    background: var(--fill-3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.inq-bubble .message { max-width: none; font-size: var(--fs-body); line-height: 1.55; }
.inq-bubble__time { display: block; margin-top: 4px; color: var(--text-3); font-size: var(--fs-caption2); font-variant-numeric: tabular-nums; text-align: right; }
.inq-compose { padding: 12px 16px 16px; }
.inq-compose { display: grid; justify-items: center; gap: 8px; border-top: 1px solid var(--separator); }
.inq-reply { max-width: 26rem; }
.inq-reply__to { max-width: 100%; color: var(--text-3); text-align: center; overflow-wrap: anywhere; }

/* Profile */
.inq-profile { padding: 26px 18px 18px; }
.inq-profile__card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-bottom: 20px; text-align: center; }
.inq-profile__card .avatar { margin-bottom: 10px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.inq-profile__name { max-width: 100%; font-size: var(--fs-title3); font-weight: 700; overflow-wrap: anywhere; }
.inq-profile__mail { max-width: 100%; font-size: var(--fs-sub); overflow-wrap: anywhere; }
.inq-profile__label { margin: 0 6px 8px; }
.inq-facts { display: grid; gap: 2px; margin: 0; padding: 6px; border-radius: 18px; background: var(--fill-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.inq-facts > div { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; column-gap: 12px; padding: 8px 8px; }
.inq-facts dt { display: contents; } /* the tile and the label inside the dt join the row's grid */
.inq-facts .tile-icon { grid-row: 1 / span 2; grid-column: 1; width: 28px; height: 28px; border-radius: 8px; }
.inq-facts__label { grid-column: 2; }
.inq-facts dd { grid-column: 2; }
.inq-facts .tile-icon .icon { width: 16px; height: 16px; }
.inq-facts__label { color: var(--text-3); font-size: var(--fs-caption); line-height: 1.3; }
.inq-facts dd { margin: 1px 0 0; font-size: var(--fs-sub); font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }

/* Below the three-column layout the conversation header already shows who wrote: keep only the details. */
@media (max-width: 1279.98px) {
    .inq-profile { padding-top: 18px; }
    .inq-profile__card { display: none; }
}
@media (min-width: 768px) {
    .inq-layout { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
    /* The search and the filter stay put; only the rows scroll, fading out under the panel's edge. */
    .inq-list {
        position: sticky;
        top: calc(var(--edge) + var(--topbar-h) + 16px);
        grid-row: 1 / span 2;
        max-height: calc(100dvh - 210px);
        overflow: hidden;
    }
    .inq-items {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scroll-padding-block: 8px;
        padding-bottom: 12px;
        -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
        mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
    }
    .inq-items.is-end { -webkit-mask-image: none; mask-image: none; }
    /* List page: the list and the empty pane form one window of the same height. */
    .inq-layout:not(.is-detail) .inq-list, .inq-pane--idle { height: calc(100dvh - 210px); min-height: 26rem; max-height: none; }
    .inq-list__tools { flex: none; }
    .inq-layout.is-detail .inq-profile { grid-column: 2; }
}
@media (min-width: 1280px) {
    .inq-layout { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
    .inq-layout.is-detail { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(260px, 300px); }
    .inq-layout.is-detail .inq-profile { position: sticky; top: calc(var(--edge) + var(--topbar-h) + 16px); grid-column: 3; grid-row: 1; }
    /* One app window: the three columns share the viewport height, as in Messages. */
    .inq-list, .inq-pane, .inq-layout.is-detail .inq-profile { height: calc(100dvh - 210px); min-height: 34rem; max-height: none; }
    .inq-layout.is-detail .inq-profile { overflow-y: auto; scrollbar-width: thin; }
}
@media (max-width: 767.98px) {
    .inq-layout.is-detail .inq-list, .inq-pane--idle { display: none; }
    .inq-head--detail { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .inq-back { display: inline-flex; flex-basis: 100%; align-items: center; gap: 2px; margin: -4px 0 2px -6px; color: var(--link); font-size: var(--fs-body); font-weight: 500; }
    .inq-back .icon { width: 22px; height: 22px; }
    .inq-convo__body { padding: 16px 14px 20px; }
    .inq-msg { max-width: 100%; }
    .inq-compose { padding: 12px 14px 14px; }
    .inq-convo__actions .btn-icon { width: 44px; height: 44px; }
}

/* ==========================================================================
   Chyby (logs.php): a monospace console list grouped by day
   ========================================================================== */
.log-switch .icon { width: 15px; height: 15px; }
.log-console { padding: 0; overflow: hidden; }
.log-console__bar { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--separator); }
.log-console__bar .tile-icon { width: 28px; height: 28px; border-radius: 8px; }
.log-console__bar .tile-icon .icon { width: 16px; height: 16px; }
.log-console__bar h2 { flex: 1; min-width: 0; }
.log-console__count { color: var(--text-3); }
.log-empty-icon { color: var(--green); }
.log-scroll { max-height: calc(100dvh - 280px); min-height: 12rem; padding: 4px 10px 12px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.log-day { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 10px 6px; color: var(--text-2); font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.02em; }
.log-day::after { content: ""; flex: 1; height: 1px; background: var(--separator); }
.log-list { margin: 0; padding: 0; list-style: none; }
.log-entry {
    display: grid;
    grid-template-columns: 4.6rem 4.4rem minmax(0, 1fr);
    align-items: baseline;
    column-gap: 12px;
    padding: 7px 10px;
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 18px;
}
.log-entry:hover { background: var(--fill-1); }
.log-entry + .log-entry { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.log-entry:hover, .log-entry:hover + .log-entry { box-shadow: none; }
.log-entry__time { color: var(--text-3); text-align: left; }
.log-entry__level { justify-self: start; min-height: 20px; padding: 0 8px; font-family: var(--font); font-size: var(--fs-caption2); font-weight: 600; }
.log-entry__msg, .log-entry__ctx { grid-column: 3; min-width: 0; margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-entry__msg { color: rgba(255, 255, 255, 0.9); }
.log-entry--error .log-entry__msg { color: #ffd2ce; }
.log-entry__ctx { margin-top: 2px; color: var(--text-3); }
.log-entry__where, .log-entry__more { grid-column: 3; min-width: 0; margin: 2px 0 0; }
.log-entry__where { color: var(--text-2); overflow-wrap: anywhere; }
.log-entry__more summary { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 8px 0 4px; margin-left: -4px; border-radius: var(--r-control); color: var(--link); font-family: var(--font); font-size: var(--fs-caption); font-weight: 600; list-style: none; cursor: pointer; }
.log-entry__more summary::-webkit-details-marker { display: none; }
.log-entry__more summary:hover { background: var(--fill-1); }
.log-entry__more summary .icon { width: 14px; height: 14px; transition: transform var(--t-hover) var(--ease-out); }
.log-entry__more[open] summary .icon { transform: rotate(90deg); }
.log-entry__more pre { margin: 6px 0 2px; padding: 10px 12px; max-height: 18rem; overflow: auto; border-radius: 10px; background: var(--fill-dim); color: var(--text-2); font: inherit; font-size: 11.5px; white-space: pre; scrollbar-width: thin; }
.log-scroll:focus-visible { outline: 2px solid var(--blue-hover); outline-offset: -2px; border-radius: 0 0 var(--r-panel) var(--r-panel); }
@media (max-width: 767.98px) {
    .log-switch { width: 100%; }
    .page-head .page-actions:has(.log-switch) { width: 100%; }
    .log-scroll { max-height: none; padding: 2px 6px 10px; }
    .log-entry { grid-template-columns: auto minmax(0, 1fr); row-gap: 4px; padding: 9px 8px; }
    .log-entry__time { grid-row: 1; grid-column: 2; }
    .log-entry__level { grid-row: 1; grid-column: 1; }
    .log-entry__msg, .log-entry__ctx, .log-entry__where, .log-entry__more { grid-column: 1 / -1; }
}


/* ==========================================================================
   Vzhled (design-global.php, partials/design-editor.php, preview-pane.php, color-input.php)
   The editor is also embedded in the category and event forms (the events area lays out .ev-editor around it).
   No float on the legend: the fieldset has no border or padding, so the legend simply sits on top.
   ========================================================================== */

/* Sample faces for the font-pair cards (self-hosted; a face downloads only when a card shows it). Inter comes
   from admin.css. Prefixed family names so they never collide with the shell's fonts. */
@font-face { font-family: "de Chivo"; font-weight: 400; font-display: swap; src: url(/assets/fonts/chivo-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "de Chivo"; font-weight: 400; font-display: swap; src: url(/assets/fonts/chivo-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "de Chivo"; font-weight: 900; font-display: swap; src: url(/assets/fonts/chivo-latin-900.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "de Chivo"; font-weight: 900; font-display: swap; src: url(/assets/fonts/chivo-latin-ext-900.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "de Playfair Display"; font-weight: 700; font-display: swap; src: url(/assets/fonts/playfair-display-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "de Playfair Display"; font-weight: 700; font-display: swap; src: url(/assets/fonts/playfair-display-latin-ext-700.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "de Source Sans 3"; font-weight: 400; font-display: swap; src: url(/assets/fonts/source-sans-3-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "de Source Sans 3"; font-weight: 400; font-display: swap; src: url(/assets/fonts/source-sans-3-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "de Bebas Neue"; font-weight: 400; font-display: swap; src: url(/assets/fonts/bebas-neue-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "de Bebas Neue"; font-weight: 400; font-display: swap; src: url(/assets/fonts/bebas-neue-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "de Fraunces"; font-weight: 700; font-display: swap; src: url(/assets/fonts/fraunces-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "de Fraunces"; font-weight: 700; font-display: swap; src: url(/assets/fonts/fraunces-latin-ext-700.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "de Space Grotesk"; font-weight: 700; font-display: swap; src: url(/assets/fonts/space-grotesk-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "de Space Grotesk"; font-weight: 700; font-display: swap; src: url(/assets/fonts/space-grotesk-latin-ext-700.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "de IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "de IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/assets/fonts/ibm-plex-sans-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "de Cormorant Garamond"; font-weight: 700; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "de Cormorant Garamond"; font-weight: 700; font-display: swap; src: url(/assets/fonts/cormorant-garamond-latin-ext-700.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "de Lato"; font-weight: 400; font-display: swap; src: url(/assets/fonts/lato-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "de Lato"; font-weight: 400; font-display: swap; src: url(/assets/fonts/lato-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--gap); }
.editor-layout__form { min-width: 0; }
.de-errors { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--gap); }
.de-errors .icon { width: 20px; height: 20px; }
@media (min-width: 1024px) {
    .editor-layout { grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem); }
    .editor-layout > .preview-pane {
        position: sticky;
        top: calc(var(--edge) + var(--topbar-h) + 16px);
        display: flex;
        flex-direction: column;
        height: calc(100dvh - var(--edge) - var(--topbar-h) - 40px);
        min-height: 30rem;
    }
    .editor-layout > .preview-pane .preview-pane__frame { flex: 1; height: auto; min-height: 0; }
}
@media (min-width: 1280px) {
    .editor-layout { grid-template-columns: minmax(0, 1fr) minmax(24rem, 32rem); }
}

/* ---------- Preview pane: a glass window around the page ---------- */
.preview-pane { min-width: 0; padding: 8px; border-radius: var(--r-panel); }
.preview-pane__form { margin: 0; }
.preview-pane__bar { display: flex; align-items: center; gap: 10px; padding: 2px 2px 8px 12px; }
.preview-pane__title { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; font-size: var(--fs-headline); font-weight: 600; }
.preview-pane__live { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.22); }
.preview-pane__theme { flex: none; width: 92px; min-height: 32px; }
.preview-pane__theme > button { justify-content: center; padding: 0; }
.preview-pane__theme .icon { width: 16px; height: 16px; }
.preview-pane__refresh { flex: none; }
.preview-pane__frame {
    display: block;
    width: 100%;
    height: min(34rem, 72svh);
    border: 0;
    border-radius: 20px;
    background: #07080c;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 14px 34px -14px rgba(0, 0, 0, 0.7);
}

/* ---------- The editor: grouped glass panels ---------- */
.design-editor { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.design-editor .panel + .panel { margin-top: var(--gap); }
.de-legend { float: none; margin: 0 0 8px 18px; padding: 0; color: var(--text-2); font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.de-intro { margin: 0 18px 12px; }
.de-panel { padding: 0; overflow: hidden; }
.de-panel__head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 2px; }
.de-panel__head h3 { font-size: var(--fs-headline); font-weight: 600; }
.de-tile-aa { font-size: 14px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }

.de-row { min-width: 0; padding: 16px 22px 18px; }
.de-row + .de-row { border-top: 1px solid var(--separator); }
.design-row__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 31px; }
.design-row__label { flex: 1 1 auto; min-width: 0; font-size: var(--fs-body); font-weight: 600; }
.de-row__hint { margin-top: 2px; }
.design-row__control { min-width: 0; margin-top: 12px; }
/* Inherited: the row collapses to label, inherited value and switch (also without JS, through :has). */
.design-row.is-inherited .design-row__control, .design-row.is-inherited .de-row__hint,
.design-row:has(> .design-row__head [data-inherit]:checked) .design-row__control,
.design-row:has(> .design-row__head [data-inherit]:checked) .de-row__hint { display: none; }
.design-row.is-revealing .design-row__control, .design-row.is-revealing .de-row__hint { animation: de-reveal var(--t-move) var(--spring) both; }
@keyframes de-reveal { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.de-inherit { flex: none; gap: 10px; min-height: 31px; color: var(--text-2); font-size: var(--fs-sub); }
.de-inherit > input[type="checkbox"] { transform: scale(0.84); transform-origin: right center; }
.inherited { display: none; flex: 0 1 auto; align-items: center; gap: 8px; min-width: 0; margin: 0 0 0 auto; color: var(--text-2); font-size: var(--fs-body); }
.design-row.is-inherited .inherited, .design-row:has(> .design-row__head [data-inherit]:checked) .inherited { display: inline-flex; }
.inherited__value { min-width: 0; overflow: hidden; font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; }
.de-row:has(> .design-row__head [data-inherit]:checked) { padding-bottom: 16px; }
/* Narrow rows (phone, the half-width background rows): the inherited value moves under the label as a subtitle,
   so the switch always stays on the right. */
.de-row { container-type: inline-size; }
@container (max-width: 32rem) {
    .design-row__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; }
    .design-row__label { grid-column: 1; grid-row: 1; }
    .design-row__head .inherited { grid-column: 1; grid-row: 2; justify-self: start; margin: 0; font-size: var(--fs-sub); }
    .design-row__head .de-inherit { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
.swatch { display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.design-row .field-error { margin-top: 8px; }
.contrast-warnings { padding: 0 22px; }
.contrast-warnings:empty { display: none; }
.contrast-warnings .notice { margin: 0 0 14px; }

/* Colour well + hex field */
.color-input { display: inline-flex; flex: none; align-items: center; gap: 8px; }
.color-input input[type="color"] {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
    -webkit-appearance: none;
    appearance: none;
}
.color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.color-input input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
.color-input input[type="color"]:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.color-input input[type="text"] { width: 7.25rem; font-family: var(--font-mono); font-size: var(--fs-sub); letter-spacing: 0.02em; text-transform: lowercase; }

.de-accent { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.de-presets { display: flex; flex-wrap: wrap; gap: 10px; }
.de-preset {
    position: relative;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--c);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 3px 8px -3px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform var(--t-press) var(--ease-out);
}
.de-preset::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; } /* 44px hit area */
.de-preset:hover { transform: scale(1.12); }
.de-preset:active { transform: scale(0.94); }
.de-preset[aria-pressed="true"] { outline: 2px solid #fff; outline-offset: 2px; }
.de-preset:focus-visible { outline: 2px solid var(--blue-hover); outline-offset: 3px; }
.de-preset--1 { --c: #e6007e; }
.de-preset--2 { --c: #ff375f; }
.de-preset--3 { --c: #ff453a; }
.de-preset--4 { --c: #ff9f0a; }
.de-preset--5 { --c: #ffd60a; }
.de-preset--6 { --c: #30d158; }
.de-preset--7 { --c: #64d2ff; }
.de-preset--8 { --c: #0a84ff; }
.de-preset--9 { --c: #5e5ce6; }
.de-preset--10 { --c: #bf5af2; }

/* Backgrounds: light and dark side by side, each with a live sample tile */
.de-bgs { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--separator); }
.de-bg { display: grid; gap: 12px; }
.de-bg__sample {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    height: 112px;
    padding: 14px 16px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--de-bg, #101114);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 24px -14px rgba(0, 0, 0, 0.8);
    color: #fff;
}
.de-bg__sample.is-light { color: #111216; }
.de-bg__sample > .icon { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; opacity: 0.6; }
.de-bg__aa { color: var(--de-accent, var(--blue)); font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.de-bg__line { width: 72%; height: 6px; border-radius: 3px; background: currentColor; opacity: 0.22; }
.de-bg__line--short { width: 46%; }
.de-bg__controls { display: grid; gap: 10px; min-width: 0; }
.de-bg__mode { min-height: 34px; }
.design-editor .segmented input:disabled { opacity: 0; } /* admin.css dims disabled inputs; inside a segmented control that reveals the radio */
.bg-editor__solid, .bg-editor__gradient { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-width: 0; }
.de-bg__stops { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.de-bg .color-input input[type="text"] { width: 6.4rem; }
.de-bg__arrow { display: inline-flex; color: var(--text-3); }
.de-bg__arrow .icon { width: 16px; height: 16px; }
.de-bg__angle { gap: 8px; color: var(--text-2); font-size: var(--fs-sub); }
.de-bg__angle input[type="number"] { width: 5rem; }
@media (min-width: 768px) {
    .de-bgs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .de-bgs > .de-row + .de-row { border-top: 0; border-left: 1px solid var(--separator); }
}

/* Choice cards (layout, hero height, font pair): radios that work without JS */
.de-cards { display: grid; gap: 10px; }
.de-cards--hero { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.de-cards--layout { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Seven font pairs: a horizontal shelf that snaps card by card, so no row ever ends with a hole. */
.de-cards--fonts {
    grid-auto-columns: minmax(10.5rem, calc((100% - 30px) / 4));
    grid-auto-flow: column;
    margin: -4px -22px -6px;
    padding: 4px 22px 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 22px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}
.de-cards--fonts > .de-choice { scroll-snap-align: start; }
.de-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 8px 8px 10px;
    border-radius: 16px;
    background: var(--fill-2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
    cursor: pointer;
    transition: background-color var(--t-hover) var(--ease-out), box-shadow var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out);
}
.de-choice:hover { background: var(--fill-3); }
.de-choice:active { transform: scale(0.98); }
.de-choice .de-choice__input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; border: 0; opacity: 0; pointer-events: none; }
.de-choice:has(.de-choice__input:checked) { background: rgba(10, 132, 255, 0.16); box-shadow: inset 0 0 0 2px var(--blue); }
.de-choice:has(.de-choice__input:focus-visible) { box-shadow: inset 0 0 0 2px var(--blue), var(--focus-ring); }
.de-choice__label { color: var(--text-2); font-size: var(--fs-sub); font-weight: 500; line-height: 1.25; text-align: center; }
.de-choice:has(.de-choice__input:checked) .de-choice__label { color: #fff; font-weight: 600; }
.de-choice__check {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: scale(0.4);
    transition: opacity var(--t-hover) var(--ease-out), transform 320ms var(--spring-bounce);
}
.de-choice__check .icon { width: 13px; height: 13px; stroke-width: 3; }
.de-choice:has(.de-choice__input:checked) .de-choice__check { opacity: 1; transform: scale(1); }
.de-cards--hero .de-choice__art { aspect-ratio: 16 / 10; }
.de-choice__art { display: block; aspect-ratio: 4 / 3; padding: 8px; overflow: hidden; border-radius: 10px; background: var(--fill-dim); }

/* Layout thumbnails */
.de-tiles { display: grid; gap: 3px; height: 100%; }
.de-tiles > span { min-height: 0; border-radius: 3px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)); transition: background-color var(--t-hover) var(--ease-out); }
.de-choice:has(:checked) .de-tiles > span { background: linear-gradient(135deg, rgba(100, 180, 255, 0.95), rgba(10, 132, 255, 0.5)); }
.de-choice--grid .de-tiles { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }
.de-choice--masonry .de-tiles { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(6, 1fr); }
.de-choice--masonry .de-tiles > :nth-child(1) { grid-area: 1 / 1 / 4 / 2; }
.de-choice--masonry .de-tiles > :nth-child(2) { grid-area: 4 / 1 / 7 / 2; }
.de-choice--masonry .de-tiles > :nth-child(3) { grid-area: 1 / 2 / 3 / 3; }
.de-choice--masonry .de-tiles > :nth-child(4) { grid-area: 3 / 2 / 7 / 3; }
.de-choice--masonry .de-tiles > :nth-child(5) { grid-area: 1 / 3 / 5 / 4; }
.de-choice--masonry .de-tiles > :nth-child(6) { grid-area: 5 / 3 / 7 / 4; }
.de-choice--justified .de-tiles { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(2, 1fr); }
.de-choice--justified .de-tiles > :nth-child(1) { grid-column: 1 / 5; }
.de-choice--justified .de-tiles > :nth-child(2) { grid-column: 5 / 7; }
.de-choice--justified .de-tiles > :nth-child(3) { grid-column: 1 / 3; }
.de-choice--justified .de-tiles > :nth-child(4) { grid-column: 3 / 5; }
.de-choice--justified .de-tiles > :nth-child(5) { grid-column: 5 / 7; }
.de-choice--stack .de-tiles { grid-template-rows: repeat(2, 1fr); padding: 0 16%; }

/* Hero height thumbnails: a mini page whose photo darkens with the overlay slider (--de-overlay, set by JS) */
.de-mini { display: flex; flex-direction: column; gap: 4px; height: 100%; }
.de-mini__hero {
    position: relative;
    flex: none;
    height: 40%;
    overflow: hidden;
    border-radius: 4px;
    background: radial-gradient(circle at 28% 30%, rgba(255, 214, 10, 0.95) 0 6%, transparent 28%), radial-gradient(circle at 78% 20%, rgba(100, 210, 255, 0.85) 0 5%, transparent 26%), linear-gradient(160deg, #5e5ce6, #bf5af2 48%, #ff375f);
    transition: height var(--t-move) var(--spring);
}
.de-mini__hero::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, var(--de-overlay, 0.4)); }
.de-mini__title { position: absolute; bottom: 16%; left: 9%; z-index: 1; width: 46%; height: 5px; border-radius: 3px; background: #fff; box-shadow: 0 -8px 0 -1px rgba(255, 255, 255, 0.7); }
.de-mini__row { flex: none; width: 80%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); }
.de-mini__row + .de-mini__row { width: 56%; }
.de-choice--medium .de-mini__hero { height: 64%; }
.de-choice--full .de-mini__hero { height: 100%; }
.de-choice--full .de-mini__row { display: none; }

/* Overlay slider (Apple-style track that fills to the value) */
.de-range { display: flex; align-items: center; gap: 12px; max-width: 34rem; }
.de-range__end { display: inline-flex; flex: none; color: var(--text-3); }
.de-range__end .icon { width: 17px; height: 17px; }
.de-range__out { min-width: 2.5ch; margin-left: 2px; font-size: var(--fs-body); font-weight: 600; text-align: right; }
.de-range__unit { margin-left: -8px; color: var(--text-2); }
.de-range input[type="range"] {
    flex: 1;
    min-width: 0;
    height: 28px;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.de-range input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--blue) calc(var(--de-overlay, 0.4) * 125%), rgba(255, 255, 255, 0.18) 0); }
.de-range input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); }
.de-range input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--blue); }
.de-range input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -10px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35), 0 0 0 0.5px rgba(0, 0, 0, 0.1); -webkit-appearance: none; appearance: none; }
.de-range input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
.de-range input[type="range"]:focus-visible { outline: none; }
.de-range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35), var(--focus-ring); }
.de-range input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35), var(--focus-ring); }

/* Font-pair cards: the sample is set in the pair's own faces */
.de-font { align-items: flex-start; gap: 2px; padding: 14px 14px 12px; }
.de-font__aa { display: flex; align-items: flex-end; height: 48px; margin-bottom: 8px; color: #fff; font-family: var(--de-hf); font-size: 38px; font-weight: var(--de-hw, 700); line-height: 1; letter-spacing: var(--de-hl, -0.02em); }
.de-choice:has(:checked) .de-font__aa { color: var(--de-accent, #fff); }
.de-font__name { display: flex; align-items: flex-end; min-height: 26px; max-width: 100%; color: #fff; font-family: var(--de-hf); font-size: 18px; font-weight: var(--de-hw, 700); line-height: 1.15; letter-spacing: var(--de-hl, -0.02em); text-transform: var(--de-ht, none); }
.de-font__body { max-width: 100%; font-weight: 400; overflow: hidden; color: var(--text-2); font-family: var(--de-bf); font-size: 13px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.de-font__families { max-width: 100%; font-weight: 500; margin-top: 8px; overflow: hidden; color: var(--text-3); font-size: var(--fs-caption2); line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.de-font--poster { --de-hf: "de Chivo", system-ui, sans-serif; --de-hw: 900; --de-ht: uppercase; --de-hl: -0.045em; --de-bf: "de Chivo", system-ui, sans-serif; }
.de-font--modern { --de-hf: "Inter", system-ui, sans-serif; --de-bf: "Inter", system-ui, sans-serif; }
.de-font--elegant { --de-hf: "de Playfair Display", Georgia, serif; --de-bf: "de Source Sans 3", system-ui, sans-serif; }
.de-font--bold { --de-hf: "de Bebas Neue", system-ui, sans-serif; --de-hw: 400; --de-hl: 0.01em; --de-bf: "Inter", system-ui, sans-serif; }
.de-font--bold .de-font__aa { font-size: 44px; }
.de-font--bold .de-font__name { font-size: 22px; }
.de-font--editorial { --de-hf: "de Fraunces", Georgia, serif; --de-bf: "Inter", system-ui, sans-serif; }
.de-font--tech { --de-hf: "de Space Grotesk", system-ui, sans-serif; --de-bf: "de IBM Plex Sans", system-ui, sans-serif; }
.de-font--classic { --de-hf: "de Cormorant Garamond", Georgia, serif; --de-bf: "de Lato", system-ui, sans-serif; }
.de-font--classic .de-font__aa { font-size: 44px; }
.de-font--classic .de-font__name { font-size: 21px; }

@media (max-width: 767.98px) {
    .de-panel__head { padding: 16px 16px 0; }
    .de-row { padding: 14px 16px 16px; }
    .contrast-warnings { padding: 0 16px; }
    .de-cards--layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .de-cards--fonts { grid-auto-columns: 9.75rem; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
    .de-font { padding: 12px; }
    .de-presets { display: grid; grid-template-columns: repeat(5, 28px); gap: 12px 16px; }
    .de-legend { margin-left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .de-mini__hero, .de-choice__check, .log-entry__more summary .icon { transition: none; }
    .design-row.is-revealing .design-row__control, .design-row.is-revealing .de-row__hint { animation: none; }
}

/* ==========================================================================
   Admin 404 (not-found.php): one calm panel inside the shell
   ========================================================================== */
.nf-panel { max-width: 640px; padding-block: 28px; }
.nf-actions { justify-content: center; margin-top: 12px; }
@media (max-width: 767.98px) {
    .nf-actions { flex-direction: column; align-self: stretch; }
    .nf-actions .btn { width: 100%; }
}
