/*
 * The press kit editor (templates/views/tools/kit_editor.html, both kinds of
 * kit since Oct 2026), and the link page designer that runs on the same
 * parts (templates/views/portal/link_editor.html).
 *
 * The panes and the phone's sheets are the design frame's shell
 * (static/css/design_frame.css); this is the editor inside them: folding
 * groups in the rail, the kit in a frame on the stage, the checklist and the
 * sending in the right-hand column. Class prefix `ek-`.
 *
 * Redrawn on 10 Nov 2026 on the tokens in epk_ui.css, which every page that
 * links this file links first. What changed with it, and why:
 * - every control shows where the keyboard is (a ring, not only a border
 *   that turns red), and nothing is written dimmer than --eu-faint;
 * - on a phone every control is a fingertip tall (--eu-tap), and Share stays
 *   at the end of the tab bar while the other tabs scroll under it;
 * - one filled button on the screen, Save; the rest are outlines;
 * - what moves, moves in --eu-fast or --eu-med, and not at all for whoever
 *   asked for less motion.
 */

/* Enter's default button (the editor templates): there, never seen. */
.ek-sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Dark controls from the browser too: a select's list, a scrollbar, a file
   button before it is styled. */
.ek-page { max-width: 1560px; margin: 0 auto; padding: 0 1.25rem 3rem; color: var(--eu-text); color-scheme: dark; }
/* The crumbs above the editor line up with it, not with the narrower tool pages. */
.tl-crumbs:has(+ .ek-page) { max-width: 1560px; padding: 0 1.25rem; }
.ek-head { margin: .6rem 0 1rem; }
/* Editing a kit, the header is a line, not a page top: the editor below
   it fills the screen. The blank builder keeps its introduction. */
.ek-page--compact .ek-head { margin: .3rem 0 .7rem; }
.ek-page--compact .ek-head h1 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin: 0 0 .15rem; }
.ek-page--compact .ek-lede { font-size: .86rem; line-height: 1.45; max-width: none; }
.ek-head h1 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 .4rem; }
.ek-lede { color: var(--eu-muted); max-width: 760px; line-height: 1.6; margin: 0; }
.ek-lede a { color: var(--eu-accent-text); }

.ek-welcome, .ek-errors, .ek-draft {
    margin: 0 0 1rem; padding: .85rem 1rem; border-radius: var(--eu-r); font-size: .92rem; line-height: 1.55;
    border: 1px solid; border-left-width: 3px;
}
.ek-welcome { background: var(--eu-ok-wash); border-color: rgba(29, 185, 84, .45); color: #d5efdf; }
.ek-welcome strong { color: #fff; }
.ek-errors { background: rgba(255, 60, 60, .08); border-color: rgba(255, 90, 90, .5); color: #ffd0d0; }
.ek-errors p { margin: 0; }
.ek-draft { background: var(--eu-warn-wash); border-color: rgba(242, 193, 78, .45); color: #efe4c3; }
.ek-draft p { margin: 0 0 .5rem; }

/* Where the keyboard is, on anything that is not a text box (those take a
   ring of their own below). */
.ek-page :is(button, a, summary, [tabindex]):focus-visible,
.ek-blockbar :is(button, select):focus-visible {
    outline: 2px solid var(--eu-focus); outline-offset: 2px;
}

/* --- the panes ------------------------------------------------------------ */

/* An app, not a page: the editor is the height of the screen under the
   site's header, and the rail, the stage and the right-hand column each
   scroll on their own, so the kit never leaves the screen while a long
   group is filled in. */
@media (min-width: 1200px) {
    .ek-editor .df-shell-body { grid-template-columns: 360px minmax(0, 1fr) 320px; gap: 16px; }
}
@media (min-width: 900px) {
    .ek-editor .df-shell-body {
        height: calc(100vh - var(--df-header) - 20px); height: calc(100svh - var(--df-header) - 20px);
        min-height: 520px; align-items: stretch; margin-bottom: 0;
    }
    .ek-editor .df-rail, .ek-editor .df-inspector {
        min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px;
        scrollbar-width: thin; scrollbar-color: var(--eu-line-2) transparent;
    }
    .ek-editor .df-stage { position: static; display: flex; flex-direction: column; min-height: 0; }
    .ek-stage-box { aspect-ratio: auto; flex: 1 1 auto; height: auto; min-height: 0; max-height: none; }
}
@media (min-width: 900px) and (max-width: 1199px) {
    .ek-editor .df-shell-body { grid-template-rows: minmax(0, 3fr) minmax(0, 2fr); }
}
/* The desk the kit lies on: seen round the phone-width preview, and before
   the first render arrives. */
.ek-stage-box {
    background-color: #0c0c0c;
    background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px);
    background-size: 18px 18px;
    border: 1px solid var(--eu-line); border-radius: var(--eu-r-l);
}
.ek-frame { display: block; width: 100%; height: 100%; border: 0; background: #0a0a0a; }
/* The frame the next render goes into (epk_editor/preview.js): laid out,
   so the reader's place can be found in it, but not seen. */
.ek-frame.is-back { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
/* Phone width: the kit in a phone's outline, on the desk. */
.ek-stage-box.is-phone .ek-frame {
    width: 390px; max-width: calc(100% - 24px); height: calc(100% - 24px); margin: 12px auto;
    border: 1px solid #3a3a3a; border-radius: 26px; box-shadow: var(--eu-shadow-l);
}
.ek-stage-empty {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .6rem; color: var(--eu-faint); text-align: center; padding: 1rem; pointer-events: none;
}
.ek-stage-empty i { font-size: 2rem; color: var(--eu-line-2); }
.ek-stage-empty p { margin: 0; }
.ek-stage-note { margin: 0; color: var(--eu-faint); font-size: .8rem; }

/* The bar over the kit: undo and the width on the left, what is unsaved and
   Save on the right. */
.ek-stage-bar {
    gap: .4rem .6rem; min-height: 52px; margin-bottom: 8px; padding: .35rem .4rem;
    background: var(--eu-surface); border: 1px solid var(--eu-line); border-radius: var(--eu-r);
}
.ek-widths { display: inline-flex; gap: 2px; padding: 3px; background: var(--eu-well); border: 1px solid var(--eu-line); border-radius: 9px; }
.ek-widths button {
    display: inline-flex; gap: .4rem; align-items: center; min-height: 32px; padding: 0 .7rem; background: none;
    border: 0; border-radius: 6px; color: var(--eu-muted); cursor: pointer; font: inherit; font-size: .82rem; font-weight: 600;
    transition: background var(--eu-fast), color var(--eu-fast);
}
.ek-widths button:hover { color: #fff; }
.ek-widths button.is-on { background: var(--eu-surface-3); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset; }
.ek-dirty {
    margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .65rem;
    background: var(--eu-warn-wash); border-radius: 999px; color: var(--eu-warn); font-size: .8rem; font-weight: 600;
}
.ek-dirty i { font-size: .45rem; }
.ek-dirty[hidden] { display: none; }
.ek-save {
    margin-left: auto; display: inline-flex; gap: .5rem; align-items: center; justify-content: center; min-height: 40px;
    padding: 0 1.1rem; background: var(--eu-accent-fill); color: #fff; border: 0; border-radius: 8px;
    font: inherit; font-weight: 800; font-size: .92rem; cursor: pointer;
    transition: background var(--eu-fast), transform var(--eu-fast), opacity var(--eu-fast);
}
.ek-dirty:not([hidden]) + .ek-save { margin-left: 0; }
.ek-save:hover { background: var(--eu-accent-fill-hover); }
.ek-save:active { transform: translateY(1px); }
.ek-save.is-busy { opacity: .65; cursor: progress; }
.ek-history { display: inline-flex; gap: 2px; }
.ek-icon-btn {
    width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 1px solid transparent; border-radius: 8px; color: var(--eu-text); cursor: pointer; font-size: .85rem;
    transition: background var(--eu-fast), color var(--eu-fast);
}
.ek-icon-btn:hover:not(:disabled) { color: #fff; background: var(--eu-surface-3); }
.ek-icon-btn:disabled { opacity: .35; cursor: default; }
.ek-preview-toggle {
    display: none; gap: .45rem; align-items: center; min-height: var(--eu-tap); padding: 0 .9rem;
    background: var(--eu-surface-3); border: 1px solid var(--eu-line-2); color: #fff; border-radius: 8px;
    font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}

/* --- the groups ------------------------------------------------------------ */

.ek-panel {
    background: var(--eu-surface); border: 1px solid var(--eu-line); border-radius: var(--eu-r); margin-bottom: 8px;
    transition: border-color var(--eu-med);
}
.ek-panel-title { margin: 0; font-size: 1rem; }
.ek-panel-head {
    width: 100%; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; grid-template-rows: auto auto;
    column-gap: .75rem; align-items: center; text-align: left; background: none; border: 0; color: #fff;
    padding: .7rem .85rem; cursor: pointer; font: inherit; border-radius: var(--eu-r);
}
/* The group's icon, on a tile: lit when the group is the open one. */
.ek-panel-head > i:first-child {
    grid-row: span 2; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 8px;
    background: var(--eu-accent-wash); color: var(--eu-accent-text); font-size: .95rem;
    transition: background var(--eu-med), color var(--eu-med);
}
.ek-panel-name { font-weight: 700; font-size: .98rem; letter-spacing: 0; line-height: 1.25; }
.ek-panel-blurb { grid-column: 2; color: var(--eu-faint); font-size: .78rem; font-weight: 400; line-height: 1.35; }
.ek-chevron { grid-column: 3; grid-row: 1 / span 2; color: var(--eu-faint); font-size: .8rem; transition: transform var(--eu-med) var(--eu-ease); }
.ek-panel-head:focus-visible { outline-offset: -2px; }
.ek-panel-body { padding: .35rem 1rem 1rem; }
@media (min-width: 900px) {
    .ek-panel.is-collapsed .ek-panel-body { display: none; }
    .ek-panel.is-collapsed .ek-chevron { transform: rotate(-90deg); }
    .ek-panel.is-collapsed .ek-panel-head > i:first-child { background: var(--eu-surface-3); color: var(--eu-muted); }
    .ek-panel.is-collapsed .ek-panel-head:hover > i:first-child { color: #fff; }
    .ek-panel.is-collapsed:hover { border-color: var(--eu-line-2); }
    /* The open group: its head stays at the top of the rail while a long
       group scrolls under it, so folding it is never a scroll away. */
    .ek-rail .ek-panel:not(.is-collapsed) { border-color: var(--eu-line-2); }
    .ek-rail .ek-panel:not(.is-collapsed) .ek-panel-title {
        position: sticky; top: 0; z-index: 3; background: var(--eu-surface);
        border-bottom: 1px solid var(--eu-line); border-radius: var(--eu-r) var(--eu-r) 0 0;
    }
    .ek-rail .ek-panel:not(.is-collapsed) .ek-panel-body { padding-top: .9rem; }
    /* A control the keyboard (or a script) scrolls to stops below that head,
       not under it: a field reached by Tab is never hidden by it. On the
       controls, not the rail, so dragging a section still scrolls as it did. */
    .ek-rail .ek-panel-body :is(input, select, textarea, button, a, summary) { scroll-margin-top: 76px; }
}
/* On a phone each group is a sheet: its head is a title, not a fold. */
@media (max-width: 899px) {
    .ek-page { padding: 0 1rem 2rem; }
    .ek-panel { background: none; border: 0; margin: 0; }
    .ek-panel-head { cursor: default; padding: .2rem 2.5rem .9rem 0; }
    .ek-panel-head .ek-chevron { display: none; }   /* beats Font Awesome's .fas */
    .ek-panel-body { padding: 0; }
    .ek-dirty span, .ek-widths span { display: none; }
    /* No sheets without the shell: the design frame hides every panel on a
       phone until its tab opens it, so with no script (or a shell that did
       not build, epk_editor.js) every group shows, one after another. The
       editor's templates set .df-js before anything paints. */
    html:not(.df-js) .ek-editor .df-panel { display: block; margin: 0 0 1.25rem; }

    /* Pages (shell.js phoneMode): the stage keeps only its bar -- Save,
       undo, the unsaved marker, Preview -- stuck under the site's header,
       and the group fills the screen below. Preview opens the kit over the
       whole screen; Esc or "Back to editing" closes it. */
    .ek-editor.df-pages .df-shell-body { display: flex; flex-direction: column; }
    /* Stretched: the shell lines its panes up at the start, which in a column
       shrank the bar to its buttons (the link page's short Save showed it). */
    .ek-editor.df-pages .df-stage { order: -1; align-self: stretch; padding-bottom: 8px; }
    .ek-editor.df-pages .ek-stage-bar { margin-bottom: 0; background: none; border: 0; padding: 0; }
    .ek-editor.df-pages .df-stage-box, .ek-editor.df-pages .df-stage-foot { display: none; }
    .ek-editor.df-pages .ek-preview-toggle:not([hidden]) { display: inline-flex; }
    .ek-editor.df-pages .ek-widths { display: none !important; }
    .ek-editor.df-pages.is-previewing .df-stage {
        position: fixed; inset: 0; z-index: 1100; margin: 0; padding: 10px 12px;
        display: flex; flex-direction: column; background: #0a0a0a; border: 0;
    }
    .ek-editor.df-pages.is-previewing .ek-stage-bar { margin-bottom: 8px; }
    .ek-editor.df-pages.is-previewing .df-stage-box { display: block; flex: 1 1 auto; height: auto; min-height: 0; }
    html.ek-previewing { overflow: hidden; }
    html.ek-previewing .df-tabbar { display: none !important; }

    /* A fingertip's worth on every control in the bar, and the bar on one
       line: the unsaved marker is its dot, and on the narrowest phones
       Preview is its eye (the button keeps its name for a screen reader). */
    .ek-stage-bar { gap: .35rem; }
    .ek-icon-btn { width: 40px; height: var(--eu-tap); }
    .ek-save { min-height: var(--eu-tap); padding: 0 .8rem; white-space: nowrap; }
    .ek-dirty { padding: 0; background: none; }
    .ek-dirty i { font-size: .6rem; }
    .ek-preview-toggle { padding: 0 .75rem; }

    /* The tab bar: the open group is marked by more than its colour, and
       Share -- the reason the kit exists -- stays at the end of the bar
       while the other tabs scroll under it. A tab is at least a share of
       the screen's width (and never narrower than its label, which stays
       12px), so the last one showing is cut by Share: that is what says
       there are more. */
    .ek-editor:not(.ek-editor--link).df-shell.df-pages .df-tab { flex: 0 0 auto; min-width: 17.5vw; padding: 0 8px; }
    .ek-editor .df-tab { position: relative; transition: color var(--eu-fast); }
    .ek-editor .df-tab.is-on:not(.df-tab--primary)::before {
        content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 2px; border-radius: 0 0 2px 2px;
        background: var(--eu-accent);
    }
    .ek-editor.df-pages .df-tab--primary {
        position: sticky; right: 0; z-index: 1; background: var(--eu-accent-fill);
        box-shadow: -12px 0 14px rgba(0, 0, 0, .7);
    }
    .ek-editor.df-pages .df-tab--primary.is-on { background: var(--eu-accent-fill-hover); }
}

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

.ek-editor .form-control {
    width: 100%; min-height: 42px; box-sizing: border-box; background: var(--eu-well); border: 1px solid var(--eu-line-2);
    color: #f2f2f2; padding: .55rem .75rem; border-radius: 8px; font: inherit; font-size: .92rem;
    transition: border-color var(--eu-fast), box-shadow var(--eu-fast);
}
.ek-editor .form-control::placeholder { color: #6f6f6f; }
.ek-editor textarea.form-control { resize: vertical; line-height: 1.5; }
.ek-editor .form-control:hover { border-color: #555; }
.ek-editor .form-control:focus { outline: none; border-color: var(--eu-accent); box-shadow: 0 0 0 3px var(--eu-accent-ring); }
.ek-editor select.form-control { appearance: auto; cursor: pointer; }
.ek-editor input[type="file"].form-control { padding: .35rem; border-style: dashed; color: var(--eu-muted); font-size: .84rem; cursor: pointer; }
.ek-editor input[type="file"]::file-selector-button {
    margin-right: .7rem; padding: .45rem .75rem; background: var(--eu-surface-3); border: 1px solid var(--eu-line-2);
    border-radius: var(--eu-r-s); color: #fff; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.ek-editor input[type="checkbox"], .ek-editor input[type="radio"] { accent-color: var(--eu-accent); }
.ek-editor :is(input[type="checkbox"], input[type="radio"]):focus-visible { outline: 2px solid var(--eu-focus); outline-offset: 2px; }
.ek-field { margin-bottom: .95rem; min-width: 0; }
.ek-field > label, .ek-label { display: block; color: #e4e4e4; font-size: .84rem; font-weight: 600; margin-bottom: .35rem; }
.ek-help { display: block; color: var(--eu-faint); font-size: .78rem; line-height: 1.5; margin-top: .35rem; }
.ek-help a { color: var(--eu-accent-text); }
.ek-label + .ek-help { margin: -.15rem 0 .5rem; }
/* A note, then the next thing's label: a line apart, not run together. */
.ek-help + .ek-label, .ek-help + .ek-field, .ek-help + fieldset { margin-top: .9rem; }
.ek-error { display: block; color: var(--eu-danger); font-size: .82rem; font-weight: 600; margin-top: .35rem; }
.ek-error::before { content: "\f06a"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: .35rem; }
.ek-field.has-error .form-control { border-color: var(--eu-danger); }
.ek-count { display: block; text-align: right; color: var(--eu-faint); font-size: .74rem; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.ek-row, .ek-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .7rem; }
.ek-note { background: var(--eu-info-wash); border: 1px solid rgba(96, 165, 250, .3); color: #cfe0f3; border-radius: 8px; padding: .65rem .8rem; font-size: .86rem; line-height: 1.5; }
.ek-check { display: flex; gap: .55rem; align-items: flex-start; color: var(--eu-text); font-size: .86rem; line-height: 1.45; margin: .3rem 0 .5rem; cursor: pointer; }
.ek-check input { margin-top: .2rem; flex: 0 0 auto; }
.ek-more { margin: .6rem 0 .4rem; border-top: 1px solid var(--eu-line); }
.ek-more > summary { cursor: pointer; color: #e4e4e4; font-weight: 600; font-size: .86rem; padding: .7rem 0; }
.ek-more > summary:hover { color: #fff; }
.ek-more[open] > summary { margin-bottom: .4rem; }
.is-flash { animation: ek-flash 1.2s ease-out; }
@keyframes ek-flash { 0% { box-shadow: 0 0 0 3px rgba(29, 185, 84, .8); } 100% { box-shadow: 0 0 0 0 rgba(29, 185, 84, 0); } }
.ek-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ek-paste { background: var(--eu-surface-2); border: 1px dashed var(--eu-line-2); border-radius: 8px; padding: .75rem; margin-bottom: 1rem; }
.ek-paste > label { display: block; color: #fff; font-weight: 600; font-size: .86rem; margin-bottom: .4rem; }
.ek-paste[hidden] { display: none; }

.ek-photo { border-top: 1px solid var(--eu-line); padding-top: .95rem; margin-top: .3rem; }

/* --- rows ------------------------------------------------------------ */

.ek-rows { margin: .4rem 0 1rem; }
.ek-rowset { position: relative; padding-right: 2.4rem; margin-bottom: .5rem; display: grid; gap: .4rem; }
.ek-rowset .ek-row { gap: .4rem; }
.ek-rowset--inline { grid-template-columns: minmax(0, 1fr); }
.ek-rowset--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ek-rowset--gig { grid-template-columns: 7.5rem minmax(0, 1.4fr) minmax(0, 1fr); }
.ek-rowset--input { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1fr); }
.ek-gig-head { display: grid; grid-template-columns: 7.5rem minmax(0, 1.4fr) minmax(0, 1fr); gap: .4rem; padding-right: 2.4rem; color: var(--eu-faint); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3rem; }
.ek-remove {
    position: absolute; right: 0; top: .3rem; width: 2rem; height: 2rem; border-radius: 50%;
    border: 1px solid var(--eu-line-2); background: var(--eu-surface-2); color: var(--eu-muted); cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; transition: border-color var(--eu-fast), color var(--eu-fast);
}
.ek-remove:hover { color: var(--eu-danger); border-color: var(--eu-danger); }
.ek-remove[hidden] { display: none; }
.ek-add {
    display: inline-flex; gap: .45rem; align-items: center; min-height: 36px; padding: 0 .85rem; background: none;
    border: 1px dashed #4a4a4a; color: var(--eu-text); border-radius: 8px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer;
    transition: border-color var(--eu-fast), color var(--eu-fast), background var(--eu-fast);
}
.ek-add:hover { border-color: var(--eu-accent); color: #fff; background: var(--eu-accent-wash); }
.ek-add[hidden] { display: none; }
@media (max-width: 520px) {
    .ek-rowset--gig, .ek-gig-head { grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, .8fr); }
    .ek-row, .ek-grid, .ek-rowset--pair, .ek-rowset--input { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 389px) {
    .ek-save i { display: none; }
}
@media (max-width: 370px) {
    .ek-editor:not(.is-previewing) .ek-preview-toggle { width: var(--eu-tap); padding: 0; justify-content: center; }
    .ek-editor:not(.is-previewing) .ek-preview-toggle span {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
    }
}
@media (max-width: 899px) {
    .ek-rowset { padding-right: 3.1rem; }
    .ek-gig-head { padding-right: 3.1rem; }
    .ek-remove { top: 0; width: var(--eu-tap); height: var(--eu-tap); }
    .ek-add { min-height: var(--eu-tap); }
}

/* --- look: themes and the order ------------------------------------------- */

.ek-themes { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: .45rem; }
.ek-theme { display: block; position: relative; cursor: pointer; }
/* Kept inside its card: an unanchored one floated to wherever the nearest
   positioned box put it, away from the card it belongs to. */
.ek-theme input { position: absolute; top: .5rem; left: .5rem; margin: 0; opacity: 0; }
.ek-theme-card {
    display: flex; gap: .75rem; align-items: center; padding: .55rem .7rem .55rem .55rem; border: 1px solid var(--eu-line-2);
    border-radius: 8px; transition: border-color var(--eu-fast), background var(--eu-fast);
}
.ek-theme:hover .ek-theme-card { border-color: #555; }
.ek-theme input:checked + .ek-theme-card { border-color: var(--eu-accent); background: var(--eu-accent-wash); }
/* Chosen is a tick as well as a colour. */
.ek-theme input:checked + .ek-theme-card::after {
    content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; flex: 0 0 auto;
    color: var(--eu-accent-text); font-size: .85rem;
}
.ek-theme input:focus-visible + .ek-theme-card { outline: 2px solid var(--eu-focus); outline-offset: 2px; }
.ek-theme-swatch { flex: 0 0 2.75rem; height: 2.75rem; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid var(--eu-line-2); font-weight: 800; }
.ek-theme-text { min-width: 0; }
.ek-theme-text strong { display: block; color: #fff; font-size: .9rem; }
.ek-theme-text span { color: var(--eu-faint); font-size: .78rem; line-height: 1.35; }
.ek-field--colour input[type="color"] { width: 100%; height: 42px; padding: .15rem; background: var(--eu-well); border: 1px solid var(--eu-line-2); border-radius: 8px; cursor: pointer; }

.ek-sections { list-style: none; margin: .5rem 0 .7rem; padding: 0; display: grid; gap: .4rem; }
.ek-section {
    display: grid; grid-template-columns: 1.2rem 34px minmax(0, 1fr) auto; gap: .5rem; align-items: start;
    background: var(--eu-surface-2); border: 1px solid var(--eu-line); border-radius: 8px; padding: .5rem .55rem;
    transition: border-color var(--eu-fast), box-shadow var(--eu-fast);
}
.ek-section.is-off .ek-section-main { opacity: .5; }
.ek-section-empty { color: #b9a56a; font-size: .76rem; }
.ek-section-empty a { color: var(--eu-warn); }
.ek-section.is-dragging { border-color: var(--eu-accent); box-shadow: var(--eu-shadow); }
.ek-grip { color: var(--eu-faint); cursor: grab; touch-action: none; padding-top: .4rem; text-align: center; }
.ek-grip:hover { color: #fff; }
.ek-section.is-dragging .ek-grip { cursor: grabbing; }
/* Shown or not: a switch, which is what it is. */
.ek-switch { padding-top: .35rem; line-height: 0; }
.ek-switch input {
    appearance: none; -webkit-appearance: none; position: relative; width: 34px; height: 20px; margin: 0;
    background: #3d3d3d; border-radius: 999px; cursor: pointer; transition: background var(--eu-fast);
}
.ek-switch input::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; transition: transform var(--eu-fast) var(--eu-ease);
}
.ek-switch input:checked { background: var(--eu-ok); }
.ek-switch input:checked::after { transform: translateX(14px); }
.ek-section-main { display: grid; gap: .35rem; min-width: 0; }
.ek-section-label { color: #e4e4e4; font-size: .86rem; font-weight: 600; padding-top: .3rem; }
.ek-section-label i { color: var(--eu-faint); width: 1.1rem; }
.ek-section .form-control { min-height: 36px; padding: .4rem .55rem; font-size: .84rem; }
.ek-move { display: inline-flex; gap: .2rem; }
.ek-move button {
    width: 2rem; height: 2rem; border: 1px solid var(--eu-line-2); background: var(--eu-surface); color: var(--eu-muted);
    border-radius: 6px; cursor: pointer; font-size: .75rem; transition: border-color var(--eu-fast), color var(--eu-fast);
}
.ek-move button:hover { color: #fff; border-color: #777; }
.ek-move button[data-section-remove]:hover { color: var(--eu-danger); border-color: var(--eu-danger); }
@media (max-width: 899px) {
    .ek-section { grid-template-columns: 1.6rem 34px minmax(0, 1fr); }
    .ek-move { grid-column: 1 / -1; justify-content: flex-end; }
    .ek-move button { width: var(--eu-tap); height: var(--eu-tap); }
    .ek-grip { padding: .4rem 0 .9rem; }
}

/* --- the right-hand column -------------------------------------------------- */

@media (min-width: 900px) {
    .ek-inspector .ek-panel--share { background: none; border: 0; }
}
/* On a phone the tab bar scrolls sideways (design_frame.css, pages), so a
   label is readable rather than squeezed to fit. */
.ek-card { background: var(--eu-surface); border: 1px solid var(--eu-line); border-radius: var(--eu-r); padding: 1rem; margin-bottom: 8px; }
.ek-card h3 { color: #fff; font-size: .98rem; font-weight: 700; margin: 0 0 .6rem; }
.ek-card p { font-size: .86rem; line-height: 1.55; margin: 0 0 .6rem; }
.ek-card > :last-child { margin-bottom: 0; }

.ek-progress { height: 8px; background: var(--eu-surface-3); border-radius: 99px; overflow: hidden; }
.ek-progress span { display: block; height: 100%; width: 0; background: var(--eu-ok); border-radius: 99px; transition: width .3s var(--eu-ease); }
.ek-progress-label { color: var(--eu-muted); font-size: .82rem !important; margin: .5rem 0 .4rem !important; }
.ek-checklist ol { list-style: none; margin: 0 -.4rem; padding: 0; }
.ek-checklist li a {
    display: flex; gap: .6rem; align-items: center; min-height: 34px; padding: .2rem .4rem; border-radius: 6px;
    color: var(--eu-text); text-decoration: none; font-size: .87rem; transition: background var(--eu-fast), color var(--eu-fast);
}
.ek-checklist li a:hover { color: #fff; background: var(--eu-surface-3); }
.ek-checklist li i { color: #4a4a4a; }
.ek-checklist li.is-done i { color: var(--eu-ok); }
.ek-checklist li.is-done a { color: var(--eu-faint); }
.ek-checklist li.is-first:not(.is-done) a { color: #fff; font-weight: 600; }
.ek-checklist li.is-first:not(.is-done) i { color: var(--eu-muted); }

.ek-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 36px; padding: 0 .8rem;
    background: transparent; border: 1px solid var(--eu-line-2); color: var(--eu-text); border-radius: 8px;
    font: inherit; font-size: .84rem; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: border-color var(--eu-fast), color var(--eu-fast), background var(--eu-fast);
}
.ek-btn:hover { border-color: #777; color: #fff; background: var(--eu-surface-3); }
.ek-btn--primary { background: var(--eu-accent-fill); border-color: var(--eu-accent-fill); color: #fff; font-weight: 800; }
.ek-btn--primary:hover { background: var(--eu-accent-fill-hover); border-color: var(--eu-accent-fill-hover); }
.ek-btn:disabled { opacity: .45; cursor: default; }
/* A link and the button that copies it, as one control. */
.ek-link { display: flex; }
.ek-link > :first-child { flex: 1; min-width: 0; border-radius: 8px 0 0 8px; }
.ek-link > .ek-btn { border-radius: 0 8px 8px 0; margin-left: -1px; background: var(--eu-surface-3); }
.ek-link input {
    min-height: 36px; box-sizing: border-box; background: var(--eu-well); border: 1px solid var(--eu-line-2); color: var(--eu-text);
    padding: 0 .6rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem;
}
.ek-link input:focus { outline: none; border-color: var(--eu-accent); box-shadow: 0 0 0 3px var(--eu-accent-ring); position: relative; }
.ek-send-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 .9rem; }
.ek-send-actions .ek-btn { flex: 1 1 auto; }
.ek-qr { display: flex; gap: .8rem; align-items: center; margin-bottom: .9rem; }
.ek-qr img { background: #fff; padding: 4px; border-radius: 6px; }
.ek-qr p { font-size: .8rem !important; color: var(--eu-muted); }
.ek-unfurl-label { display: block; color: var(--eu-faint); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.ek-unfurl-card { display: flex; border: 1px solid var(--eu-line-2); border-radius: 8px; overflow: hidden; background: var(--eu-well); }
.ek-unfurl-card img { width: 84px; height: 84px; object-fit: cover; flex: 0 0 84px; }
.ek-unfurl-card div { padding: .5rem .65rem; display: grid; gap: .15rem; min-width: 0; align-content: center; }
.ek-unfurl-card strong { color: #fff; font-size: .84rem; }
.ek-unfurl-card span { color: var(--eu-faint); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; }
.ek-unfurl-site { text-transform: uppercase; letter-spacing: .05em; }
.ek-benefits { margin: 0 0 .8rem; padding-left: 1.1rem; font-size: .85rem; line-height: 1.6; color: var(--eu-text); }
.ek-benefits li::marker { color: var(--eu-accent-text); }
.ek-claim { border-color: rgba(242, 193, 78, .35); background: linear-gradient(180deg, var(--eu-warn-wash), rgba(242, 193, 78, 0) 70%), var(--eu-surface); }
.ek-claim a:not(.ek-btn) { color: var(--eu-accent-text); }
.ek-keep .ek-btn + .ek-btn { margin-left: .3rem; }

.ek-prose { max-width: 820px; margin-top: 2.5rem; }

/* --- tracked links and versions (Phase 3) ---------------------------------- */

.ek-help-inline { color: var(--eu-faint); font-weight: 400; }
.ek-shares { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .5rem; }
.ek-shares li { display: grid; gap: .4rem; padding: .6rem .65rem; background: var(--eu-surface-2); border: 1px solid var(--eu-line); border-radius: 8px; }
.ek-shares li.is-dead { opacity: .55; }
.ek-share-who strong { color: #fff; font-size: .88rem; }
.ek-share-who .ek-help { margin-top: .1rem; }
.ek-share-actions { display: flex; gap: .35rem; }
.ek-copies .ek-btn { margin: 0 .3rem .4rem 0; }
.ek-btn--danger:hover { border-color: var(--eu-danger); color: var(--eu-danger); background: transparent; }

/* --- more photos and the logo (Phase 4) ------------------------------------ */

.ek-gallery { border-top: 1px solid var(--eu-line); padding-top: .95rem; margin-top: .4rem; }
.ek-gallery-list { display: grid; gap: .7rem; margin: .6rem 0; }
.ek-gallery-photo { background: var(--eu-surface-2); border: 1px solid var(--eu-line); border-radius: 8px; padding: .65rem; display: grid; gap: .45rem; }
/* A gallery photo is shown as a square on the kit, so its frame is one. */
.ek-gallery-frame .epk-focus-frame { aspect-ratio: 1 / 1; max-width: 180px; }
.ek-gallery-frame .epk-focus-preset { margin-top: .35rem; }
.ek-gallery-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.ek-gallery-add { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.ek-gallery-add[hidden] { display: none; }
.ek-gallery-add input[type="file"] { flex: 1 1 200px; }
.ek-locked { background: var(--eu-surface-2); border: 1px dashed var(--eu-line-2); border-radius: 8px; padding: .8rem .85rem; margin: .4rem 0 .9rem; }
.ek-locked p { margin: 0 0 .6rem; color: var(--eu-text); font-size: .86rem; line-height: 1.55; }
.ek-locked i { color: var(--eu-warn); margin-right: .25rem; }
.ek-logo-help { margin: -.5rem 0 1rem; }
.ek-logo-help a, .ek-gallery a:not(.ek-btn) { color: var(--eu-accent-text); }

/* The photo's framing control (epk_focus.css) inside the editor. */
.ek-editor .epk-focus-frame { border-color: var(--eu-line-2); border-radius: 8px; }
.ek-editor .epk-focus-frame:focus-visible { outline: 2px solid var(--eu-focus); outline-offset: 2px; }
.ek-editor .epk-focus-hint { color: var(--eu-faint); }
.ek-editor .epk-focus-fits label { color: var(--eu-text); min-height: 28px; }
.ek-editor .epk-focus-preset label { color: #e4e4e4; font-weight: 600; }

/* --- a band's own kit (act_kit_editor, Phase 5) ---------------------------- */

.ek-kit-name { color: var(--eu-faint); font-weight: 400; font-size: .7em; }
.ek-tag { display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: 999px; background: var(--eu-ok-wash); border: 1px solid rgba(29, 185, 84, .45); color: var(--eu-ok-text); font-size: .75rem; font-weight: 700; }
.ek-gallery-frame--cover .epk-focus-frame { border-color: var(--eu-ok); }
.ek-gallery-add--act { display: grid; gap: .45rem; grid-template-columns: minmax(0, 1fr); }
.ek-links { list-style: none; margin: .5rem 0 .8rem; padding: 0; display: grid; gap: .5rem; }
.ek-link-row { background: var(--eu-surface-2); border: 1px solid var(--eu-line); border-radius: 8px; padding: .6rem .65rem; }
.ek-link-head { display: grid; gap: .1rem; margin-bottom: .4rem; }
.ek-link-head strong { color: #fff; font-size: .88rem; }
.ek-lock { color: var(--eu-warn); font-size: .8rem; }
.ek-link-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.ek-link-actions select.form-control { width: auto; flex: 1 1 140px; min-height: 36px; padding: .35rem .5rem; font-size: .82rem; }
.ek-clicks { list-style: none; margin: .3rem 0; padding: 0; display: grid; gap: .3rem; font-size: .86rem; }
.ek-stats { border: 0; padding: 0; margin: .4rem 0 1rem; }
.ek-kit-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .4rem; }
.ek-kit-list li { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .5rem .6rem; border: 1px solid var(--eu-line); border-radius: 8px; background: var(--eu-surface-2); }
.ek-kit-list li.is-on { border-color: var(--eu-accent); }
.ek-kit-list li > a { flex: 1 1 100%; color: var(--eu-text); text-decoration: none; display: grid; }
.ek-kit-list li > a strong { color: #fff; font-size: .88rem; }
.ek-kit-list select.form-control { width: auto; flex: 1 1 120px; min-height: 36px; padding: .3rem .45rem; font-size: .8rem; }
.ek-pending { border-color: rgba(242, 193, 78, .45); background: var(--eu-warn-wash); }
.ek-embed { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .76rem; margin-bottom: .4rem; }

/* --- the designable kit (19 Oct 2026, the review's Phase 4) --------------- */

.ek-presets { margin-bottom: 1rem; }
.ek-preset-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-bottom: .6rem; }
.ek-preset {
    display: grid; align-content: start; gap: .2rem; text-align: left; background: var(--eu-surface-2); border: 1px solid var(--eu-line-2);
    border-radius: 8px; padding: .6rem .65rem; color: var(--eu-text); font: inherit; cursor: pointer;
    transition: border-color var(--eu-fast), background var(--eu-fast), transform var(--eu-fast);
}
.ek-preset strong { color: #fff; font-size: .86rem; }
.ek-preset span { color: var(--eu-faint); font-size: .76rem; line-height: 1.35; }
.ek-preset:hover { border-color: var(--eu-accent); background: var(--eu-accent-wash); }
.ek-preset:active { transform: scale(.98); }
.ek-borrow { margin-top: .4rem; }
.ek-palette { margin: 0 0 1rem; }
.ek-swatches { display: flex; gap: .45rem; flex-wrap: wrap; margin: .2rem 0; }
.ek-swatch { width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 2px solid var(--eu-line-2); cursor: pointer; padding: 0; transition: transform var(--eu-fast), border-color var(--eu-fast); }
.ek-swatch:hover { border-color: #fff; transform: scale(1.08); }
.ek-link-btn { background: none; border: 0; padding: .4rem 0 0; color: var(--eu-accent-text); font: inherit; font-size: .78rem; cursor: pointer; text-decoration: underline; }
.ek-density { border: 0; padding: 0; margin: 0 0 .9rem; }
.ek-inline { display: inline-flex; margin-right: 1rem; }
.ek-field--colour input[data-accent2] { width: 100%; height: 36px; padding: .1rem; background: var(--eu-well); border: 1px solid var(--eu-line-2); border-radius: 8px; }
.ek-section-dress { display: flex; gap: .35rem; flex-wrap: wrap; }
.ek-section-dress select.form-control { width: auto; flex: 1 1 8rem; padding: .3rem .45rem; font-size: .78rem; }
@media (max-width: 899px) {
    .ek-editor .form-control, .ek-field--colour input[type="color"], .ek-field--colour input[data-accent2] { min-height: var(--eu-tap); }
    .ek-section .form-control { min-height: var(--eu-tap); }
    .ek-link-btn { display: inline-flex; align-items: center; min-height: var(--eu-tap); padding-top: 0; }
    .ek-swatch { width: var(--eu-tap); height: var(--eu-tap); }
    .ek-btn { min-height: var(--eu-tap); }
    .ek-link input { min-height: var(--eu-tap); }
    .ek-checklist li a { min-height: var(--eu-tap); }
}

/* The bar over the block chosen on the preview (epk_editor/blocks.js). */
.ek-blockbar {
    position: absolute; z-index: 6; display: flex; align-items: center; gap: .25rem; padding: .3rem .35rem;
    background: rgba(17, 17, 17, .97); border: 1px solid var(--eu-line-2); border-radius: 10px; box-shadow: var(--eu-shadow);
    max-width: calc(100% - 12px);
}
.ek-blockbar[hidden] { display: none; }
.ek-blockbar-name { color: #fff; font-size: .78rem; font-weight: 700; padding: 0 .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 9rem; }
.ek-blockbar select { min-height: 32px; background: var(--eu-well); border: 1px solid var(--eu-line-2); color: #eee; border-radius: 6px; font: inherit; font-size: .78rem; padding: .25rem .35rem; }
.ek-blockbar button {
    width: 32px; height: 32px; border: 1px solid transparent; background: none; color: var(--eu-text); border-radius: 6px;
    cursor: pointer; font-size: .78rem; transition: background var(--eu-fast), color var(--eu-fast);
}
.ek-blockbar button:hover { color: #fff; background: var(--eu-surface-3); }
.ek-blockbar button[hidden], .ek-blockbar select[hidden] { display: none; }

/* The last 30 days (views/epk/editor/_activity.html, Phase 8). */
.ek-spark { display: block; width: 100%; height: 56px; margin: .2rem 0 .6rem; }
.ek-spark-area { fill: rgba(255, 0, 0, .14); }
.ek-spark-line { fill: none; stroke: #ff3b30; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ek-activity-head { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--eu-faint); margin: .9rem 0 .35rem; }
.ek-activity-list { list-style: none; padding: 0; margin: 0 0 .5rem; font-size: .86rem; }
.ek-activity-list li { display: flex; justify-content: space-between; gap: .8rem; padding: .35rem 0; border-bottom: 1px solid var(--eu-line); }
.ek-activity-list li:last-child { border-bottom: 0; }
.ek-activity-list strong { color: #fff; font-variant-numeric: tabular-nums; }
/* Who to send it to (_send_to.html, kit_outreach, 29 Oct 2026): a name with what
   they put on, and the button that starts a tracked link for them. */
.ek-sendto-list li { align-items: center; }
.ek-sendto-list li > span { display: grid; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.ek-sendto-list a { color: #fff; }
.ek-sendto-list .ek-btn { flex-shrink: 0; }

/* --- motion, for whoever asked for less ------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    .ek-page *, .ek-page *::before, .ek-page *::after, .ek-blockbar * { transition: none !important; }
    .is-flash { animation: none; }
}
