.feed-setup {
    --feed-wizard-line: #d9e3ef;
    --feed-wizard-soft: #f5f9fd;
    --feed-wizard-success: #10815c;
    margin-top: 24px;
    border: 1px solid var(--feed-wizard-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(30, 55, 82, .08);
    overflow: visible;
}

.feed-setup__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    border-bottom: 1px solid var(--feed-wizard-line);
}

.feed-setup__header h2,
.feed-setup__header p,
.feed-setup__safety strong,
.feed-setup__safety span {
    margin: 0;
}

.feed-setup__header h2 {
    margin-top: 6px;
    color: var(--ink);
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.15;
}

.feed-setup__header p {
    margin-top: 8px;
    max-width: 720px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.feed-setup__eyebrow {
    color: var(--brand-700);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.feed-setup__safety {
    display: flex;
    flex: 0 1 340px;
    flex-direction: column;
    gap: 4px;
    border-left: 3px solid var(--feed-wizard-success);
    padding: 10px 0 10px 14px;
    color: var(--ink);
}

.feed-setup__safety strong {
    color: var(--feed-wizard-success);
    font-size: 13px;
}

.feed-setup__safety span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.feed-wizard-progress {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 8px;
    padding: 16px 24px;
    overflow-x: auto;
    border-bottom: 1px solid var(--feed-wizard-line);
    background: var(--feed-wizard-soft);
    scrollbar-width: thin;
}

.feed-wizard-progress__step {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 9px 10px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.feed-wizard-progress__step:not(:disabled):hover {
    border-color: rgba(10, 141, 255, .25);
    background: #fff;
}

.feed-wizard-progress__step:focus-visible,
.feed-field-picker__trigger:focus-visible,
.feed-field-menu__option:focus-visible {
    outline: 3px solid rgba(10, 141, 255, .24);
    outline-offset: 2px;
}

.feed-wizard-progress__step:disabled {
    cursor: not-allowed;
    opacity: .54;
}

.feed-wizard-progress__step.is-current {
    border-color: rgba(10, 141, 255, .34);
    color: var(--ink);
    background: #fff;
    box-shadow: 0 7px 18px rgba(30, 55, 82, .08);
}

.feed-wizard-progress__step.is-complete {
    color: var(--feed-wizard-success);
}

.feed-wizard-progress__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--feed-wizard-line);
    border-radius: 50%;
    color: inherit;
    background: #fff;
    font-weight: 900;
}

.feed-wizard-progress__step.is-current .feed-wizard-progress__number {
    border-color: var(--brand);
    color: #fff;
    background: var(--brand);
}

.feed-wizard-progress__step.is-complete .feed-wizard-progress__number {
    border-color: var(--feed-wizard-success);
    color: #fff;
    background: var(--feed-wizard-success);
}

.feed-wizard-progress__step strong,
.feed-wizard-progress__step small {
    display: block;
}

.feed-wizard-progress__step strong {
    font-size: 13px;
    line-height: 1.25;
}

.feed-wizard-progress__step small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}

.feed-setup .feed-builder-layout {
    display: block;
    padding: 24px;
}

.feed-setup .feed-builder-sidebar,
.feed-setup .feed-builder-main {
    display: contents;
}

.feed-setup .feed-wizard-panel {
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.feed-setup .feed-wizard-panel[hidden] {
    display: none;
}

.feed-setup .feed-wizard-panel.is-active {
    animation: feed-wizard-panel-in .18s ease-out;
}

.feed-setup .feed-builder-card__head {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--feed-wizard-line);
}

.feed-setup .feed-builder-card__title h2 {
    font-size: 21px;
}

.feed-setup .feed-builder-step {
    width: 34px;
    height: 34px;
}

.feed-setup .feed-builder-workspace {
    max-height: none;
    overflow: visible;
    background: var(--feed-wizard-soft);
}

.feed-setup .feed-builder-fields {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feed-builder-field > label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}

.feed-required-mark {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    padding: 3px 8px;
    color: #a24a16;
    background: #fff1e7;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.feed-field-picker {
    position: relative;
    min-width: 0;
}

.feed-field-picker__trigger {
    display: flex;
    width: 100%;
    min-height: 68px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--feed-wizard-line);
    border-radius: 10px;
    padding: 10px 38px 10px 12px;
    color: var(--ink);
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.feed-field-picker__trigger::after {
    content: "⌄";
    position: absolute;
    top: 50%;
    right: 14px;
    color: var(--brand-700);
    font-size: 19px;
    transform: translateY(-50%);
}

.feed-field-picker__trigger:hover {
    border-color: rgba(10, 141, 255, .45);
}

.feed-field-picker.has-value .feed-field-picker__trigger {
    border-color: rgba(16, 129, 92, .34);
    background: #fbfffd;
}

.feed-field-picker.has-error .feed-field-picker__trigger {
    border-color: #d54444;
    box-shadow: 0 0 0 3px rgba(213, 68, 68, .1);
}

.feed-field-picker__trigger strong,
.feed-field-picker__trigger span {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-field-picker__trigger strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.feed-field-picker__trigger span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.feed-field-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 70;
    width: min(520px, calc(100vw - 48px));
    max-height: min(440px, 62vh);
    border: 1px solid var(--feed-wizard-line);
    border-radius: 14px;
    padding: 10px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(22, 42, 66, .2);
    overflow: auto;
}

.feed-field-menu[hidden] {
    display: none;
}

.feed-field-menu__search {
    position: sticky;
    top: -10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: -2px -2px 8px;
    padding: 8px;
    background: #fff;
}

.feed-field-menu__search label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.feed-field-menu__search input {
    width: 100%;
    min-height: 42px;
}

.feed-field-menu__options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feed-field-menu__option {
    display: flex;
    width: 100%;
    min-height: 58px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    border: 0;
    border-radius: 9px;
    padding: 9px 10px;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.feed-field-menu__option:hover,
.feed-field-menu__option:focus-visible {
    background: var(--brand-soft);
}

.feed-field-menu__option strong,
.feed-field-menu__option span {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.feed-field-menu__option strong {
    font-size: 13px;
    font-weight: 900;
}

.feed-field-menu__option span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.feed-field-menu__option--clear strong {
    color: var(--muted);
}

.feed-field-menu__empty {
    margin: 8px;
    color: var(--muted);
    font-size: 13px;
}

[data-feed-category-fields] {
    position: relative;
    min-height: 96px;
}

[data-feed-category-fields].is-loading {
    opacity: .58;
    pointer-events: none;
}

.feed-wizard-feedback {
    margin: 0 24px;
    border: 1px solid #f0c4c4;
    border-radius: 10px;
    padding: 10px 12px;
    color: #8f2424;
    background: #fff7f7;
    font-size: 13px;
    font-weight: 700;
}

.feed-wizard-actions {
    justify-content: space-between;
    margin: 24px 24px 0;
}

.feed-wizard-actions [hidden] {
    display: none;
}

.feed-wizard-actions__navigation {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.feed-wizard-actions .btn:disabled,
.feed-source-check .btn:disabled,
.feed-trial-card--wizard .btn:disabled {
    cursor: not-allowed;
    opacity: .42;
    filter: saturate(.4);
    box-shadow: none;
}

.feed-source-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #cfe0f2;
    border-radius: 12px;
    padding: 16px;
    background: var(--feed-wizard-soft);
}

.feed-source-check strong,
.feed-source-check p {
    margin: 0;
}

.feed-source-check strong {
    color: var(--ink);
    font-size: 14px;
}

.feed-source-check__status {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.feed-source-check__status.is-success,
.feed-trial-card__status.is-success {
    color: var(--feed-wizard-success);
}

.feed-source-check__status.is-error,
.feed-trial-card__status.is-error {
    color: #a42b2b;
}

.feed-source-check__status.is-pending,
.feed-trial-card__status.is-pending {
    color: var(--brand-700);
}

.feed-source-check__status.is-dirty,
.feed-trial-card__status.is-dirty {
    color: #8a5b08;
}

.feed-publish-intro {
    margin-top: 24px;
    border-top: 1px solid var(--feed-wizard-line);
    padding-top: 20px;
}

.feed-publish-intro h3,
.feed-publish-intro p {
    margin: 0;
}

.feed-publish-intro h3 {
    color: var(--ink);
    font-size: 18px;
}

.feed-publish-intro p {
    margin-top: 6px;
    max-width: 780px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.feed-trial-card--wizard {
    display: block;
    margin-top: 24px;
    border-color: #cfe0f2;
    box-shadow: none;
}

.feed-trial-card--wizard.is-busy {
    cursor: progress;
}

.feed-trial-card--wizard .feed-trial-card__header {
    align-items: flex-start;
}

.feed-trial-card__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    cursor: pointer;
    list-style: none;
}

.feed-trial-card__summary::-webkit-details-marker {
    display: none;
}

.feed-trial-card__summary h3,
.feed-trial-card__summary p,
.feed-trial-card__content h3,
.feed-trial-card__content p {
    margin: 0;
}

.feed-trial-card__summary h3,
.feed-trial-card__content h3 {
    margin-top: 6px;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.25;
}

.feed-trial-card__summary p,
.feed-trial-card__content .feed-trial-card__header p {
    margin-top: 6px;
    max-width: 780px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.feed-trial-card__summary:focus-visible {
    border-radius: 10px;
    outline: 3px solid rgba(10, 141, 255, .24);
    outline-offset: 5px;
}

.feed-trial-card__chevron {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border-right: 2px solid var(--brand-700);
    border-bottom: 2px solid var(--brand-700);
    transform: rotate(45deg);
    transition: transform .16s ease;
}

.feed-trial-card--wizard[open] .feed-trial-card__chevron {
    transform: rotate(225deg);
}

.feed-trial-card__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 18px;
    border-top: 1px solid var(--feed-wizard-line);
    padding-top: 18px;
}

.feed-trial-card__status {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.feed-trial-card--wizard .feed-trial-card__links {
    margin-top: 16px;
}

.feed-trial-card--wizard .feed-trial-card__empty {
    margin-top: 16px;
}

.feed-trial-card--wizard [hidden] {
    display: none;
}

.feed-trial-card__debug {
    margin-top: 16px;
    border: 1px solid #f0c4c4;
    border-radius: 10px;
    padding: 12px 14px;
    color: #8f2424;
    background: #fff7f7;
    font-size: 13px;
}

.feed-trial-card__debug strong {
    display: block;
    margin-bottom: 6px;
}

.feed-trial-card__debug ul {
    margin: 0;
    padding-left: 18px;
}

.feed-trial-card--disabled {
    opacity: .72;
}

@keyframes feed-wizard-panel-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .feed-setup {
        margin-top: 16px;
        border-radius: 16px;
    }

    .feed-setup__header {
        flex-direction: column;
        gap: 16px;
        padding: 18px 16px;
    }

    .feed-setup__safety {
        flex-basis: auto;
        width: 100%;
    }

    .feed-wizard-progress {
        grid-template-columns: repeat(4, minmax(148px, 1fr));
        padding: 12px 16px;
    }

    .feed-setup .feed-builder-layout {
        padding: 18px 16px;
    }

    .feed-setup .feed-builder-card__head,
    .feed-setup .feed-builder-card__title {
        flex-direction: row;
    }

    .feed-setup .feed-builder-fields {
        grid-template-columns: 1fr;
    }

    .feed-field-menu {
        width: min(420px, calc(100vw - 54px));
    }

    .feed-wizard-actions {
        align-items: stretch;
        margin: 18px 16px 0;
    }

    .feed-wizard-actions__navigation {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .feed-wizard-actions__navigation .btn:only-child,
    .feed-wizard-actions__navigation .btn[data-feed-wizard-next]:first-child {
        grid-column: 1 / -1;
    }

    .feed-wizard-actions__navigation [data-feed-publish-submit] {
        grid-column: 1 / -1;
    }

    .feed-wizard-feedback {
        margin: 0 16px;
    }

    .feed-source-check,
    .feed-trial-card__summary,
    .feed-trial-card--wizard .feed-trial-card__header,
    .feed-trial-card--wizard .feed-trial-card__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .feed-source-check .btn,
    .feed-trial-card--wizard .btn {
        width: 100%;
    }

    .feed-trial-card__summary {
        align-items: flex-start;
        flex-direction: row;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feed-wizard-progress__step,
    .feed-setup .feed-wizard-panel.is-active {
        animation: none;
        transition: none;
    }
}

.feed-source-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-source-card {
    min-width: 0;
    border: 1px solid #d9e5f1;
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 42, 68, .04);
}

.feed-source-card__header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-source-card__identity {
    min-width: 0;
}

.feed-source-card__identity h3,
.feed-source-card__identity p {
    margin: 0;
}

.feed-source-card__identity h3 {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.feed-source-card__identity p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.feed-source-card__status {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.feed-source-card__details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    border-top: 1px solid #e5edf5;
    padding-top: 16px;
}

.feed-source-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin: 0;
}

.feed-source-meta > div {
    min-width: 0;
}

.feed-source-meta dt {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.feed-source-meta dd {
    margin: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.feed-source-meta dd span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.feed-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

.feed-counts span {
    min-width: 0;
    border-left: 2px solid #d8e8f7;
    padding: 3px 0 3px 9px;
}

.feed-counts strong {
    display: block;
    margin-bottom: 2px;
    color: var(--ink);
    font-size: 18px;
    line-height: 1;
}

.feed-row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.feed-row-actions > a,
.feed-row-actions > form,
.feed-row-actions > details {
    min-width: 0;
    width: 100%;
}

.feed-row-actions .btn {
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding-inline: 14px;
}

.feed-row-actions .btn--ghost {
    border-color: var(--line-strong);
    color: var(--ink);
    background: #fff;
    box-shadow: none;
}

.feed-row-actions .btn--ghost:hover {
    border-color: #b6dfff;
    color: var(--brand-700);
    background: var(--brand-soft);
}

.feed-row-actions .btn--danger {
    border-color: #d71920;
    color: #fff;
    background: #d71920;
    box-shadow: 0 12px 26px rgba(180, 35, 24, .16);
}

.feed-row-actions .btn--danger:hover {
    border-color: #b81218;
    color: #fff;
    background: #b81218;
}

.feed-actions-menu {
    position: relative;
}

.feed-actions-menu > summary {
    list-style: none;
    cursor: pointer;
}

.feed-actions-menu > summary::-webkit-details-marker {
    display: none;
}

.feed-actions-menu > summary::after {
    margin-left: 7px;
    font-size: 11px;
    content: '▾';
}

.feed-actions-menu[open] > summary::after {
    content: '▴';
}

.feed-actions-menu__panel {
    position: absolute;
    z-index: 15;
    top: calc(100% + 8px);
    right: 0;
    display: flex;
    width: min(250px, calc(100vw - 48px));
    border: 1px solid #d9e5f1;
    border-radius: 12px;
    padding: 6px;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 42, 68, .16);
}

.feed-actions-menu__panel form {
    width: 100%;
}

.feed-actions-menu__item {
    display: flex;
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    padding: 10px 12px;
    align-items: center;
    color: var(--ink);
    font: inherit;
    font-weight: 750;
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.feed-actions-menu__item:hover,
.feed-actions-menu__item:focus-visible {
    outline: none;
    background: #f3f7fb;
}

.feed-actions-menu__item--danger {
    color: #b42318;
}

.feed-actions-menu__item--danger:hover,
.feed-actions-menu__item--danger:focus-visible {
    background: #fff0ee;
}

.feed-actions-menu__item:disabled {
    color: #9ba8b5;
    background: transparent;
    cursor: not-allowed;
}

.feed-row-actions .btn:focus-visible,
.feed-run-inline a:focus-visible,
.feed-debug-portal .btn:focus-visible {
    outline: 3px solid rgba(10, 141, 255, .28);
    outline-offset: 3px;
}

.feed-progress-row {
    margin-top: 16px;
}

.feed-progress-row[hidden] {
    display: none;
}

.feed-run-inline {
    border: 1px solid #cfe3f8;
    border-radius: 12px;
    padding: 14px 16px;
    background: #f7fbff;
}

.feed-run-inline__head,
.feed-run-summary__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.feed-run-inline__head > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.feed-run-inline__controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.feed-run-inline__controls form {
    margin: 0;
}

.feed-run-stop {
    min-height: 34px;
    border: 1px solid #f1b8b4;
    border-radius: 9px;
    padding: 7px 11px;
    color: #b42318;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    background: #fff;
    cursor: pointer;
}

.feed-run-stop:hover,
.feed-run-stop:focus-visible {
    border-color: #d92d20;
    outline: 3px solid rgba(217, 45, 32, .15);
    outline-offset: 2px;
    background: #fff5f4;
}

.feed-run-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.feed-run-state::before {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand-600);
    content: '';
    flex: 0 0 auto;
}

[data-feed-run-status="queued"] .feed-run-state::before {
    animation: feed-queue-pulse 1.3s cubic-bezier(.23, 1, .32, 1) infinite;
}

[data-feed-run-status="running"] .feed-run-state::before {
    width: 12px;
    height: 12px;
    border: 2px solid #b9dcfb;
    border-top-color: var(--brand-600);
    background: transparent;
    animation: feed-run-spin .8s linear infinite;
}

.feed-run-inline__head a {
    color: var(--brand-700);
    font-weight: 800;
}

.feed-progress {
    width: 100%;
    height: 8px;
    margin-top: 12px;
    border: 0;
    border-radius: 999px;
    background: #e7eff7;
    overflow: hidden;
}

.feed-progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #e7eff7;
}

.feed-progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--brand-600);
}

.feed-progress::-moz-progress-bar {
    border-radius: 999px;
    background: var(--brand-600);
}

.is-indeterminate .feed-progress {
    background: linear-gradient(90deg, #e7eff7 0%, #d8ebfd 35%, var(--brand-600) 50%, #d8ebfd 65%, #e7eff7 100%);
    background-size: 220% 100%;
    animation: feed-progress-sweep 1.25s linear infinite;
}

.is-indeterminate .feed-progress::-webkit-progress-bar {
    background: transparent;
}

.is-indeterminate .feed-progress::-webkit-progress-value,
.is-indeterminate .feed-progress::-moz-progress-bar {
    background: transparent;
}

.feed-run-inline__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.feed-run-inline__stats strong {
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.feed-import-form [data-feed-import-submit][aria-busy="true"]::before {
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    content: '';
    opacity: .8;
    animation: feed-run-spin .8s linear infinite;
}

.feed-source-card__trial {
    margin-top: 16px;
}

.feed-purge-dialog {
    width: min(560px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    border: 0;
    border-radius: 18px;
    padding: 0;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 26px 80px rgba(15, 42, 68, .28);
}

.feed-purge-dialog::backdrop {
    background: rgba(15, 35, 55, .58);
    backdrop-filter: blur(2px);
}

.feed-purge-dialog form {
    padding: 24px;
}

.feed-purge-dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.feed-purge-dialog__head h2,
.feed-purge-dialog__head p,
.feed-purge-dialog__copy {
    margin: 0;
}

.feed-purge-dialog__head h2 {
    margin-top: 4px;
    font-size: clamp(22px, 4vw, 28px);
}

.feed-purge-dialog__close {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border: 1px solid #d9e5f1;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 26px;
    line-height: 1;
    background: #fff;
    cursor: pointer;
}

.feed-purge-dialog__copy {
    margin-top: 16px;
    color: var(--muted);
    line-height: 1.55;
}

.feed-purge-dialog__summary {
    display: grid;
    grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
    gap: 8px 16px;
    margin-top: 18px;
    border-radius: 12px;
    padding: 14px;
    background: #f5f9fd;
}

.feed-purge-dialog__summary span {
    color: var(--muted);
    font-size: 13px;
}

.feed-purge-dialog__summary strong {
    overflow-wrap: anywhere;
}

.feed-purge-dialog__field {
    display: flex;
    margin-top: 20px;
    flex-direction: column;
    gap: 7px;
    font-size: 14px;
}

.feed-purge-dialog__field strong {
    overflow-wrap: anywhere;
}

.feed-purge-dialog__field input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #b8cce0;
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--ink);
    font: inherit;
    background: #fff;
}

.feed-purge-dialog__field input:focus-visible {
    border-color: var(--brand-600);
    outline: 3px solid rgba(10, 141, 255, .18);
}

.feed-purge-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.feed-purge-dialog__actions .btn--danger {
    border-color: #d71920;
    color: #fff;
    background: #d71920;
}

.feed-purge-dialog__actions .btn--danger:disabled {
    border-color: #d9e1e8;
    color: #8b98a5;
    background: #edf1f4;
    box-shadow: none;
    cursor: not-allowed;
}

@keyframes feed-run-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes feed-queue-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(10, 141, 255, .28);
        opacity: .75;
    }

    50% {
        box-shadow: 0 0 0 6px rgba(10, 141, 255, 0);
        opacity: 1;
    }
}

@keyframes feed-progress-sweep {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: -100% 0;
    }
}

@media (min-width: 768px) {
    .feed-source-card {
        padding: 20px;
    }

    .feed-source-card__header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
    }

    .feed-row-actions {
        display: flex;
        grid-column: 1 / -1;
        flex-wrap: wrap;
        width: auto;
    }

    .feed-row-actions > a,
    .feed-row-actions > form,
    .feed-row-actions > details,
    .feed-row-actions .btn {
        width: auto;
    }

    .feed-source-card__details {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr);
        align-items: center;
    }

    .feed-source-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .feed-source-card__header {
        grid-template-columns: minmax(220px, 1fr) minmax(130px, auto) auto;
    }

    .feed-row-actions {
        grid-column: auto;
        justify-content: flex-end;
        max-width: 470px;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-feed-run-status="queued"] .feed-run-state::before,
    [data-feed-run-status="running"] .feed-run-state::before,
    .is-indeterminate .feed-progress,
    .feed-import-form [data-feed-import-submit][aria-busy="true"]::before {
        animation: none;
    }
}

.feed-debug-portal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 24px;
}

.feed-debug-portal h2,
.feed-debug-portal p {
    margin: 0;
}

.feed-debug-portal h2 {
    margin-top: 5px;
}

.feed-debug-portal .muted {
    margin-top: 7px;
    max-width: 820px;
    line-height: 1.5;
}

.feed-debug-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feed-debug-page .panel {
    margin: 0;
}

.panel > .feed-debug-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(160px, .8fr) minmax(160px, .8fr) minmax(260px, 1.4fr);
    gap: 16px;
    align-items: end;
}

.feed-debug-filter {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}

.feed-debug-filter input,
.feed-debug-filter select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cfdbea;
    border-radius: 10px;
    padding: 9px 12px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-weight: 500;
}

.feed-debug-filter input:focus-visible,
.feed-debug-filter select:focus-visible {
    border-color: var(--brand-600);
    outline: 3px solid rgba(10, 141, 255, .18);
    outline-offset: 1px;
}

.feed-debug-filters__actions {
    display: flex;
    grid-column: 1 / -1;
    gap: 10px;
}

.feed-debug-table td {
    vertical-align: top;
}

.feed-debug-message {
    max-width: 520px;
    line-height: 1.45;
}

.feed-event-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    color: #15588c;
    background: #e8f4ff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.feed-event-badge--warning {
    color: #805400;
    background: #fff3d4;
}

.feed-event-badge--error {
    color: #982b2b;
    background: #ffeded;
}

.feed-run-summary {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.feed-run-summary__head p {
    margin: 7px 0 0;
}

.feed-run-metrics {
    display: grid;
    grid-template-columns: repeat(7, minmax(95px, 1fr));
    gap: 10px;
}

.feed-run-metrics > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-left: 2px solid #dbe8f4;
    padding: 8px 10px;
}

.feed-run-metrics span {
    color: var(--muted);
    font-size: 12px;
}

.feed-run-metrics strong {
    color: var(--ink);
    font-size: 21px;
}

.feed-run-events {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-run-event {
    border: 1px solid #dce6f0;
    border-left: 4px solid #61a8dd;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}

.feed-run-event--warning {
    border-left-color: #e3a521;
}

.feed-run-event--error {
    border-left-color: #d34d4d;
}

.feed-run-event__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.feed-run-event__head h3,
.feed-run-event__head p,
.feed-run-event__message {
    margin: 0;
}

.feed-run-event__head h3 {
    margin-top: 9px;
    font-size: 17px;
}

.feed-run-event__head p,
.feed-run-event__head time {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.feed-run-event__message {
    margin-top: 12px;
    line-height: 1.5;
}

.feed-run-event__changes {
    margin-top: 14px;
}

.feed-run-event__changes summary {
    color: var(--brand-700);
    cursor: pointer;
    font-weight: 800;
}

.feed-run-event__changes summary:focus-visible {
    outline: 3px solid rgba(10, 141, 255, .2);
    outline-offset: 4px;
}

.feed-diff-table {
    width: 100%;
    margin-top: 12px;
    border-collapse: collapse;
    font-size: 13px;
}

.feed-diff-table th,
.feed-diff-table td {
    border-bottom: 1px solid #e5edf5;
    padding: 9px 10px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.feed-import-form__feedback {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.feed-import-form--with-progress {
    width: min(620px, 100%);
}

.feed-import-form__progress {
    margin-top: 12px;
}

@media (max-width: 1023px) {
    .panel > .feed-debug-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feed-run-metrics {
        grid-template-columns: repeat(4, minmax(95px, 1fr));
    }
}

@media (max-width: 767px) {
    .feed-debug-portal,
    .feed-run-summary__head,
    .feed-run-event__head {
        align-items: stretch;
        flex-direction: column;
    }

    .feed-debug-portal .btn {
        width: 100%;
    }

    .panel > .feed-debug-filters,
    .feed-run-metrics {
        grid-template-columns: 1fr;
    }

    .feed-debug-filters__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .feed-run-inline__head,
    .feed-run-inline__head > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .feed-run-metrics > div {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
    }

    .feed-row-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .feed-row-actions > a,
    .feed-row-actions > form,
    .feed-row-actions > details {
        width: 100%;
        min-width: 0;
    }

    .feed-row-actions .btn {
        justify-content: center;
        width: 100%;
    }

    .feed-actions-menu__panel {
        right: 0;
    }

    .feed-run-inline__controls {
        width: 100%;
        justify-content: space-between;
    }

    .feed-purge-dialog form {
        padding: 20px;
    }

    .feed-purge-dialog__summary {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .feed-purge-dialog__summary strong + span {
        margin-top: 8px;
    }

    .feed-purge-dialog__actions {
        flex-direction: column-reverse;
    }

    .feed-purge-dialog__actions .btn {
        width: 100%;
    }
}
