/* ==========================================================================
   Index — design tokens and base UI
   --------------------------------------------------------------------------
   Motion rules applied throughout:
   - Named transition properties only, never `all`
   - transform/opacity only (GPU); no layout properties animated
   - Custom ease-out curves; built-in easings are too weak, ease-in is banned
   - UI durations stay under 300ms
   - Entrances start from scale(0.97)/translateY, never scale(0)
   - Hover motion gated behind (hover: hover) and (pointer: fine)
   - prefers-reduced-motion drops movement, keeps opacity
   ========================================================================== */

:root {
    /* Surfaces — layered, not flat black. */
    --bg: #08090b;
    --surface: #0e1014;
    --surface-2: #13161b;
    --surface-3: #191d23;
    --border: #1e2126;
    --border-strong: #2a2e35;
    --border-loud: #3a3f47;

    /* Text */
    --text: #f2f3f5;
    --text-2: #c3c7cd;
    --muted: #8b9099;
    --faint: #6a6f78;

    /* One accent. Everything else is neutral. */
    --accent: #6e8bff;
    --accent-hover: #839cff;
    --accent-dim: #1b2340;
    --danger: #ff6b6b;
    --success: #4ec9a0;

    /* Type */
    --sans: ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

    /* Geometry */
    --radius-sm: 6px;
    --radius: 9px;
    --radius-lg: 13px;

    /* Spacing scale — consistent rhythm, no arbitrary values. */
    --s1: 4px;
    --s2: 8px;
    --s3: 12px;
    --s4: 16px;
    --s5: 24px;
    --s6: 32px;
    --s7: 48px;
    --s8: 72px;

    /* Easing. Sourced strong curves, not the weak CSS built-ins. */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 var(--sans);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: color-mix(in oklab, var(--accent) 32%, transparent);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3 {
    margin: 0;
    font-weight: 560;
    letter-spacing: -0.021em;
    line-height: 1.2;
}

h1 {
    font-size: 27px;
}

h2 {
    font-size: 19px;
}

h3 {
    font-size: 15px;
    letter-spacing: -0.012em;
}

p {
    margin: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    a:hover {
        color: var(--accent-hover);
    }
}

.lede {
    color: var(--muted);
    font-size: 15.5px;
    max-width: 46ch;
}

.eyebrow {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
}

.mono {
    font-family: var(--mono);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.num {
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.shell {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 var(--s5);
}

.center-page {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: var(--s7) var(--s5);
}

.stack {
    display: flex;
    flex-direction: column;
}

.stack-2 {
    gap: var(--s2);
}

.stack-3 {
    gap: var(--s3);
}

.stack-4 {
    gap: var(--s4);
}

.stack-5 {
    gap: var(--s5);
}

.stack-6 {
    gap: var(--s6);
}

.row {
    display: flex;
    align-items: center;
    gap: var(--s3);
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
}

.grow {
    flex: 1;
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Site header
   -------------------------------------------------------------------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
    background: color-mix(in oklab, var(--bg) 82%, transparent);
    backdrop-filter: saturate(140%) blur(12px);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.brand {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    /* Optical nudge: the bird's tail reads lighter than a solid wordmark. */
    margin-left: -2px;
}

.brand__logo {
    height: 26px;
    width: auto;
    display: block;
    transition: transform 200ms var(--ease-out), opacity 140ms ease;
}

.brand:active .brand__logo {
    transform: scale(0.94);
}

@media (hover: hover) and (pointer: fine) {
    .brand:hover .brand__logo {
        opacity: 0.82;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand:active .brand__logo {
        transform: none;
    }
}

.navlinks {
    display: flex;
    align-items: center;
    gap: var(--s5);
}

.navlink {
    color: var(--muted);
    font-size: 14px;
    transition: color 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .navlink:hover {
        color: var(--text);
    }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    --btn-bg: var(--surface-2);
    --btn-border: var(--border-strong);
    --btn-text: var(--text);

    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    padding: 0 var(--s4);
    height: 36px;
    border: 1px solid var(--btn-border);
    border-radius: var(--radius-sm);
    background: var(--btn-bg);
    color: var(--btn-text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition:
        transform 160ms var(--ease-out),
        background-color 140ms ease,
        border-color 140ms ease,
        opacity 140ms ease;
}

/* Instant feedback on press — the single highest-value micro-interaction. */
.btn:active:not(:disabled) {
    transform: scale(0.97);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn--primary {
    --btn-bg: var(--accent);
    --btn-border: var(--accent);
    --btn-text: #05070d;
    font-weight: 560;
}

.btn--ghost {
    --btn-bg: transparent;
    --btn-border: transparent;
    --btn-text: var(--muted);
}

.btn--danger {
    --btn-bg: transparent;
    --btn-border: var(--border-strong);
    --btn-text: var(--danger);
}

.btn--sm {
    height: 30px;
    padding: 0 var(--s3);
    font-size: 13px;
}

.btn--block {
    width: 100%;
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover:not(:disabled) {
        background: var(--surface-3);
    }

    .btn--primary:hover:not(:disabled) {
        background: var(--accent-hover);
    }

    .btn--ghost:hover:not(:disabled) {
        background: var(--surface-2);
        color: var(--text);
    }

    .btn--danger:hover:not(:disabled) {
        background: color-mix(in oklab, var(--danger) 12%, transparent);
        border-color: color-mix(in oklab, var(--danger) 40%, transparent);
    }
}

/* Button label swap during async work. Blur bridges the two states so the eye
   reads one transformation instead of two overlapping objects. */
.btn__label {
    display: inline-block;
    transition: filter 180ms ease, opacity 180ms ease;
}

.btn[data-busy="true"] .btn__label {
    filter: blur(2.5px);
    opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Cards, panels
   -------------------------------------------------------------------------- */

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: var(--s5);
}

.card--tight {
    padding: var(--s4);
}

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: var(--s4);
}

.divider {
    height: 1px;
    background: var(--border);
    border: 0;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

.hint {
    font-size: 12.5px;
    color: var(--faint);
}

.input,
.textarea {
    width: 100%;
    padding: 9px var(--s3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    transition: border-color 140ms ease, background-color 140ms ease;
}

.textarea {
    min-height: 84px;
    resize: vertical;
    line-height: 1.5;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--faint);
}

.input:focus,
.textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-3);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
    border-color: var(--danger);
}

.input--code {
    font-family: var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.input-affix {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    transition: border-color 140ms ease;
}

.input-affix:focus-within {
    border-color: var(--accent);
}

.input-affix__prefix {
    padding-left: var(--s3);
    color: var(--faint);
    font-size: 14px;
    user-select: none;
}

.input-affix .input {
    border: 0;
    background: transparent;
    padding-left: 2px;
}

.input-affix .input:focus {
    background: transparent;
}

.error {
    font-size: 12.5px;
    color: var(--danger);
    min-height: 1lh;
}

.swatch-row {
    display: flex;
    gap: var(--s2);
    flex-wrap: wrap;
}

.swatch {
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--swatch);
    cursor: pointer;
    transition: transform 160ms var(--ease-out), border-color 140ms ease;
}

.swatch[aria-pressed="true"] {
    border-color: var(--text);
}

.swatch:active {
    transform: scale(0.9);
}

.swatch:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .swatch:hover {
        transform: scale(1.08);
    }
}

/* --------------------------------------------------------------------------
   Badges, chips
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px var(--s2);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.badge--open {
    color: var(--success);
    border-color: color-mix(in oklab, var(--success) 34%, transparent);
}

.badge--claimed {
    color: var(--muted);
}

.badge--expired {
    color: var(--faint);
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

/* --------------------------------------------------------------------------
   Link rows (dashboard list)
   -------------------------------------------------------------------------- */

.linkrow {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    transition: border-color 140ms ease, transform 160ms var(--ease-out);
}

.linkrow__grip {
    color: var(--faint);
    cursor: grab;
    display: grid;
    place-items: center;
    flex: none;
}

.linkrow[data-dragging="true"] {
    border-color: var(--border-loud);
    transform: scale(1.01);
    cursor: grabbing;
}

.linkrow__label {
    font-size: 14px;
    font-weight: 500;
}

.linkrow__url {
    font-size: 12.5px;
    color: var(--faint);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Toasts
   Transitions, not keyframes: toasts stack rapidly and must retarget from
   their current position rather than restart from zero.
   -------------------------------------------------------------------------- */

.toaster {
    position: fixed;
    bottom: var(--s5);
    left: 50%;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    align-items: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--s2);
    padding: 10px var(--s4);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--text);
    font-size: 13.5px;
    box-shadow: 0 8px 28px -12px rgb(0 0 0 / 0.7);
    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        opacity 220ms var(--ease-out),
        transform 220ms var(--ease-out);
}

/* Never scale(0) — nothing in the world appears from nothing. */
.toast[data-state="enter"],
.toast[data-state="exit"] {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
}

.toast--error {
    color: var(--danger);
}

.toast--success {
    color: var(--success);
}

/* --------------------------------------------------------------------------
   Entry motion
   One-shot on load. Keyframes are correct here: nothing retriggers or
   interrupts, and CSS animations run off the main thread.
   -------------------------------------------------------------------------- */

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-rise] {
    opacity: 0;
    animation: rise 300ms var(--ease-out) forwards;
    /* 45ms stagger reads as a cascade without feeling slow. */
    animation-delay: calc(var(--i, 0) * 45ms);
}

/* --------------------------------------------------------------------------
   Reduced motion — gentler, not zero. Opacity stays (it aids comprehension),
   positional movement goes (it is what causes discomfort).
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    @keyframes rise {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .btn:active:not(:disabled),
    .swatch:active,
    .linkrow[data-dragging="true"] {
        transform: none;
    }

    .toast,
    .toast[data-state="enter"],
    .toast[data-state="exit"] {
        transform: translateY(0) scale(1);
    }

    .toast[data-state="enter"],
    .toast[data-state="exit"] {
        opacity: 0;
    }

    @media (hover: hover) and (pointer: fine) {
        .swatch:hover {
            transform: none;
        }
    }
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

[hidden] {
    display: none !important;
}

/* ==========================================================================
   Customisation controls (dashboard)
   ========================================================================== */

/* --- segmented control ---------------------------------------------------- */

.seg {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface-2);
    gap: 2px;
}

.seg__btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    padding: 5px 11px;
    border-radius: 6px;
    cursor: pointer;
    transition:
        background-color 150ms ease,
        color 150ms ease,
        transform 160ms var(--ease-out);
}

.seg__btn[aria-pressed="true"] {
    background: var(--surface-3);
    color: var(--text);
}

.seg__btn:active {
    transform: scale(0.96);
}

.seg__btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

@media (hover: hover) and (pointer: fine) {
    .seg__btn:hover:not([aria-pressed="true"]) {
        color: var(--text);
    }
}

/* --- range slider --------------------------------------------------------- */

.range {
    display: flex;
    align-items: center;
    gap: var(--s3);
}

/* The filled portion is painted with a gradient driven by --pct, which JS
   updates on input. Cheaper than a second element and it tracks exactly. */
.range input[type="range"] {
    flex: 1;
    appearance: none;
    -webkit-appearance: none;
    height: 22px;
    background: transparent;
    outline: none;
    cursor: pointer;
    margin: 0;
}

.range input[type="range"]::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 3px;
    background:
        linear-gradient(90deg,
            var(--accent) 0 var(--pct, 50%),
            var(--surface-3) var(--pct, 50%) 100%);
}

.range input[type="range"]::-moz-range-track {
    height: 5px;
    border-radius: 3px;
    background: var(--surface-3);
}

.range input[type="range"]::-moz-range-progress {
    height: 5px;
    border-radius: 3px;
    background: var(--accent);
}

.range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    margin-top: -5px;
    border-radius: 50%;
    background: #fff;
    border: 0;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.5);
    /* transform only, so dragging stays on the GPU */
    transition: transform 150ms var(--ease-out);
}

.range input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.22);
}

.range input[type="range"]:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 45%, transparent);
}

.range input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.5);
}

/* --- custom checkbox ------------------------------------------------------ */

.check {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    cursor: pointer;
    user-select: none;
}

.check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    flex: none;
    margin: 0;
    border: 1px solid var(--border-loud);
    border-radius: 5px;
    background: var(--surface-2);
    cursor: pointer;
    position: relative;
    transition:
        background-color 140ms ease,
        border-color 140ms ease,
        transform 150ms var(--ease-out);
}

.check input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

/* Drawn with borders rather than a glyph so it scales crisply. */
.check input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #05070d;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.check input[type="checkbox"]:active {
    transform: scale(0.9);
}

.check input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.check span {
    font-size: 13px;
    color: var(--text-2);
}

.range__value {
    width: 44px;
    text-align: right;
    font-size: 12.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* --- colour input --------------------------------------------------------- */

.colorfield {
    display: flex;
    align-items: center;
    gap: var(--s2);
}

.colorfield input[type="color"] {
    appearance: none;
    width: 34px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
}

.colorfield input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 3px;
}

.colorfield input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 4px;
}

/* --- platform picker ------------------------------------------------------ */

.picker {
    position: relative;
}

.picker__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 6px;
    max-height: 188px;
    overflow-y: auto;
    padding: var(--s2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    scrollbar-width: thin;
}

.picker__btn {
    appearance: none;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    transition:
        transform 160ms var(--ease-out),
        color 150ms ease,
        border-color 150ms ease,
        box-shadow 170ms ease;
}

.picker__btn svg {
    fill: currentColor;
    width: 17px;
    height: 17px;
    display: block;
}

/* Brand colour only appears on hover or selection, so the grid stays calm
   at rest instead of turning into confetti. */
@media (hover: hover) and (pointer: fine) {
    .picker__btn:hover {
        color: var(--c);
        border-color: color-mix(in oklab, var(--c) 45%, transparent);
        transform: translateY(-2px);
        box-shadow: 0 0 18px -5px color-mix(in oklab, var(--c) 70%, transparent);
    }
}

.picker__btn[aria-pressed="true"] {
    color: var(--c);
    border-color: color-mix(in oklab, var(--c) 60%, transparent);
    background: color-mix(in oklab, var(--c) 14%, transparent);
    box-shadow: 0 0 16px -4px color-mix(in oklab, var(--c) 65%, transparent);
}

.picker__btn:active {
    transform: scale(0.92);
}

.picker__btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* --- badge display -------------------------------------------------------- */

.badgewall {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2);
}

.badgechip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 7px;
    border-radius: 999px;
    color: var(--c);
    background: color-mix(in oklab, var(--c) 14%, transparent);
    border: 1px solid color-mix(in oklab, var(--c) 32%, transparent);
    font-size: 12.5px;
    font-weight: 500;
    box-shadow: 0 0 14px -4px color-mix(in oklab, var(--c) 60%, transparent);
}

.badgechip svg {
    fill: currentColor;
    display: block;
}

/* --- social row in the editor --------------------------------------------- */

.socialrow {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: 9px var(--s3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.socialrow__icon {
    width: 28px;
    height: 28px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: var(--c);
    background: color-mix(in oklab, var(--c) 14%, transparent);
}

.socialrow__icon svg {
    fill: currentColor;
    display: block;
}

/* --- live preview --------------------------------------------------------- */

.preview-frame {
    width: 100%;
    height: 540px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    display: block;
}

@media (prefers-reduced-motion: reduce) {

    .seg__btn:active,
    .picker__btn:active,
    .range input[type="range"]:active::-webkit-slider-thumb {
        transform: none;
    }

    @media (hover: hover) and (pointer: fine) {
        .picker__btn:hover {
            transform: none;
        }
    }
}

/* --- upload dropzone ------------------------------------------------------ */

.drop {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3);
    border: 1px dashed var(--border-loud);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    transition:
        border-color 150ms ease,
        background-color 150ms ease;
}

.drop[data-over="true"] {
    border-color: var(--accent);
    background: color-mix(in oklab, var(--accent) 10%, var(--surface-2));
}

.drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.drop__thumb {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--surface-3) center / cover no-repeat;
    display: grid;
    place-items: center;
    color: var(--faint);
    overflow: hidden;
}

.drop__body {
    min-width: 0;
    flex: 1;
}

.drop__title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

.drop__hint {
    font-size: 11.5px;
    color: var(--faint);
}

/* Progress is a transform-scaled bar, so it stays off the layout path. */
.drop__bar {
    height: 3px;
    margin-top: 6px;
    border-radius: 2px;
    background: var(--surface-3);
    overflow: hidden;
}

.drop__fill {
    height: 100%;
    background: var(--accent);
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 200ms var(--ease-out);
}

/* --- badge dialog choices ------------------------------------------------- */

button.badgechip {
    cursor: pointer;
    transition:
        transform 160ms var(--ease-out),
        box-shadow 170ms ease;
}

button.badgechip:active {
    transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
    button.badgechip:hover {
        box-shadow: 0 0 20px -4px color-mix(in oklab, var(--c) 75%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {

    .check input[type="checkbox"]:active,
    button.badgechip:active,
    .range input[type="range"]:active::-webkit-slider-thumb {
        transform: none;
    }
}