.dt1-feed {
    --feed-border: color-mix(in srgb, currentColor 12%, transparent);
    --feed-soft: color-mix(in srgb, currentColor 5%, transparent);
    --feed-softer: color-mix(in srgb, currentColor 3%, transparent);
    --feed-surface: var(--dt1-surface, oklch(var(--b1)));
    --feed-surface-text: var(--dt1-text, oklch(var(--bc)));
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 1rem;
}

/* Provider-aware Web/AFCP sources share the primary Feed tree and reader. */
.dt1-feed-source-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: 0.05rem 0.4rem;
    border: 1px solid color-mix(in srgb, var(--dt1-primary, #2563eb) 32%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--dt1-primary, #2563eb) 10%, transparent);
    color: var(--dt1-primary, #2563eb);
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

.dt1-feed-web-item {
    border-inline-start: 3px solid var(--dt1-primary, #2563eb);
}

.dt1-feed-web-meta,
.dt1-feed-web-source-meta {
    color: var(--dt1-text-muted, #64748b);
    font-size: 0.78rem;
}

.dt1-feed-web-origin,
.dt1-feed-web-safe-link {
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.7;
}

.dt1-feed-web-safe-link {
    padding: 0.35rem 0;
}

.dt1-feed-web-discovery-box {
    margin-top: 1rem;
}

.dt1-feed-web-discovery-box > summary {
    cursor: pointer;
    padding: 0.5rem 0;
    font-weight: 650;
}

.dt1-feed-web-discovery-form,
.dt1-feed-web-enroll,
.dt1-feed-web-result-group,
.dt1-feed-web-manager-wrap {
    margin-top: 0.75rem;
}

.dt1-feed-web-status {
    min-height: 1.4rem;
    margin: 0.65rem 0;
    color: var(--dt1-text-muted, #64748b);
}

.dt1-feed-web-source-manager {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.45rem;
}

.dt1-feed-web-source-row {
    display: grid;
    gap: 0.5rem;
    padding: 0.7rem;
    overflow-wrap: anywhere;
    border: 1px solid var(--feed-border, var(--dt1-border-color, #cbd5e1));
    border-radius: 0.75rem;
    background: var(--feed-surface, var(--dt1-surface, #fff));
}

.dt1-feed-web-source-edit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 0.65rem;
    align-items: end;
}
.dt1-feed-web-source-edit > label {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
    font-size: 0.83rem;
}
.dt1-feed-web-source-edit .input {
    width: 100%;
    min-width: 0;
    background: var(--feed-surface, var(--dt1-surface, #fff));
    color: var(--dt1-text, inherit);
}
@media (max-width: 640px) {
    .dt1-feed-web-source-edit { grid-template-columns: minmax(0, 1fr); }
}
.dt1-feed-web-source-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.dt1-feed-web-result-group h4 {
    font-weight: 650;
}

@media (max-width: 640px) {
    .dt1-feed-web-source-actions > .btn,
    .dt1-feed-web-source-row > .select {
        width: 100%;
    }
}

/* Product Phase 7C: source navigation + inline Feed details. */
.dt1-feed-source-tree {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border: 1px solid color-mix(in srgb, var(--dt1-border, #334155) 78%, transparent);
    border-radius: 1rem;
    background: var(--dt1-surface, #111827);
    color: var(--dt1-text, #e5e7eb);
    padding: .85rem;
}

.dt1-feed-source-tree-head,
.dt1-feed-source-group > summary,
.dt1-feed-source-tree-link,
.dt1-feed-inline-ai-head,
.dt1-feed-inline-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}

.dt1-feed-inline-production {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .75rem;
    margin-bottom: .7rem;
    padding: .65rem .75rem;
    border: 1px solid var(--feed-border);
    border-radius: .75rem;
    background: color-mix(in srgb, var(--feed-accent) 7%, transparent);
}

.dt1-feed-source-tree-head > div {
    display: grid;
    gap: .1rem;
}

.dt1-feed-source-tree-head span,
.dt1-feed-inline-ai-head span {
    color: var(--dt1-muted, #94a3b8);
    font-size: .72rem;
}

.dt1-feed-source-tree-groups {
    display: grid;
    gap: .45rem;
    margin-top: .8rem;
}

.dt1-feed-source-group {
    border: 1px solid color-mix(in srgb, var(--dt1-border, #334155) 64%, transparent);
    border-radius: .75rem;
    overflow: hidden;
}

.dt1-feed-source-group > summary {
    cursor: pointer;
    list-style: none;
    padding: .65rem .7rem;
    font-weight: 800;
}

.dt1-feed-source-group > summary::-webkit-details-marker {
    display: none;
}

.dt1-feed-source-group > div {
    display: grid;
    gap: .25rem;
    padding: 0 .45rem .45rem;
}

.dt1-feed-unread-count,
.dt1-feed-source-tree-link > span:last-child {
    min-width: 1.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--dt1-primary, #2563eb) 18%, transparent);
    color: var(--dt1-primary, #60a5fa);
    padding: .1rem .42rem;
    text-align: center;
    font-size: .72rem;
    font-weight: 800;
}

.dt1-feed-source-tree-link {
    border-radius: .55rem;
    padding: .48rem .55rem;
    color: inherit;
    text-decoration: none;
}

.dt1-feed-source-tree-link:hover,
.dt1-feed-source-tree-link:focus-visible,
.dt1-feed-source-tree-link.is-active,
.dt1-feed-source-tree-head .is-active {
    background: color-mix(in srgb, var(--dt1-primary, #2563eb) 14%, transparent);
    outline: none;
}

.dt1-feed-item.is-read {
    opacity: .72;
    background: color-mix(in srgb, var(--dt1-surface, #111827) 88%, var(--dt1-success, #16a34a) 12%);
}

.dt1-feed-item.is-expanded {
    opacity: 1;
    border-color: color-mix(in srgb, var(--dt1-primary, #2563eb) 55%, var(--dt1-border, #334155));
}

.dt1-feed-read-action.btn-error {
    color: #fff;
}

.dt1-feed-inline-details {
    margin-top: .8rem;
    border-top: 1px solid color-mix(in srgb, var(--dt1-border, #334155) 70%, transparent);
    padding-top: .85rem;
}

.dt1-feed-inline-details[hidden] {
    display: none;
}

.dt1-feed-inline-links {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.dt1-feed-inline-ai {
    display: grid;
    gap: .7rem;
    margin-top: .8rem;
    border: 1px solid color-mix(in srgb, var(--dt1-primary, #2563eb) 28%, var(--dt1-border, #334155));
    border-radius: .75rem;
    background: color-mix(in srgb, var(--dt1-surface, #111827) 92%, var(--dt1-primary, #2563eb) 8%);
    padding: .8rem;
}

.dt1-feed-inline-title-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .65rem;
    align-items: end;
}

.dt1-feed-inline-title-form textarea {
    width: 100%;
    min-height: 4rem;
    background: var(--dt1-surface-raised, var(--dt1-surface, #111827));
    color: var(--dt1-text, #e5e7eb);
}

@media (max-width: 980px) {
    .dt1-feed-workspace {
        grid-template-columns: 1fr;
    }

    .dt1-feed-source-tree {
        position: static;
        max-height: none;
    }
}

@media (max-width: 640px) {
    .dt1-feed-inline-title-form {
        grid-template-columns: 1fr;
    }

    .dt1-feed-inline-links .btn,
    .dt1-feed-inline-title-form .btn {
        width: 100%;
    }
}

.dt1-feed-hero,
.dt1-feed-toolbar,
.dt1-feed-workspace,
.dt1-feed-provider-error,
.dt1-feed-stats,
.dt1-feed-empty {
    border: 1px solid var(--feed-border);
    border-radius: 1.2rem;
    background: var(--feed-softer);
}

.dt1-feed-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 1.4rem;
}

.dt1-feed-eyebrow {
    display: inline-block;
    margin-bottom: .3rem;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    opacity: .58;
    text-transform: uppercase;
}

.dt1-feed-hero h1 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 900;
}

.dt1-feed-hero p {
    max-width: 48rem;
    margin: .45rem 0 0;
    opacity: .72;
}

.dt1-feed-hero-actions {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: .65rem;
}

.dt1-feed-board-switch,
.dt1-feed-filter-panel label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-size: .76rem;
    font-weight: 700;
}

.dt1-feed-toolbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .65rem;
}

.dt1-feed-searchbar {
    display: flex;
    flex: 1 1 24rem;
    align-items: center;
    gap: .4rem;
    min-width: 14rem;
}

.dt1-feed-search {
    flex: 1 1 auto;
    min-width: 0;
}

.dt1-feed-search input {
    width: 100%;
}

.dt1-feed-filters {
    position: relative;
    flex: 0 0 auto;
}

.dt1-feed-filters > summary {
    list-style: none;
}

.dt1-feed-filters > summary::-webkit-details-marker {
    display: none;
}

.dt1-feed-filter-count {
    display: inline-grid;
    min-width: 1.2rem;
    height: 1.2rem;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 11%, transparent);
    font-size: .68rem;
    line-height: 1;
}

.dt1-feed-filter-panel {
    position: absolute;
    z-index: 45;
    inset-inline-end: 0;
    inset-block-start: calc(100% + .4rem);
    display: none;
    grid-template-columns: repeat(2, minmax(9rem, 1fr));
    gap: .7rem;
    width: min(28rem, calc(100vw - 2rem));
    padding: .8rem;
    border: 1px solid var(--feed-border);
    border-radius: .95rem;
    background: var(--feed-surface);
    color: var(--feed-surface-text);
    box-shadow: 0 16px 44px color-mix(in srgb, #000 22%, transparent);
}

.dt1-feed-filters[open] .dt1-feed-filter-panel {
    display: grid;
}

.dt1-feed-toggle {
    align-self: center;
    flex-direction: row !important;
    align-items: center;
    gap: .45rem !important;
    white-space: nowrap;
}

.dt1-feed-filter-actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: .35rem;
}

.dt1-feed-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .8rem;
    padding: .05rem .2rem;
    border: 0;
    background: transparent;
    font-size: .72rem;
    opacity: .62;
}

.dt1-feed-bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .75rem .9rem;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 1rem;
    background: color-mix(in srgb, currentColor 6%, transparent);
}

.dt1-feed-bulk-bar[hidden] {
    display: none;
}

.dt1-feed-bulk-bar > div {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .35rem .65rem;
}

.dt1-feed-bulk-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.dt1-feed:not(.is-bulk-mode) [data-feed-select] {
    display: none;
}

.dt1-feed-bulk-bar strong {
    font-size: .9rem;
}

.dt1-feed-bulk-bar span {
    font-size: .75rem;
    opacity: .65;
}

.dt1-feed-select {
    flex: 0 0 auto;
}

.dt1-feed-workspace {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: start;
    min-height: 32rem;
    overflow: visible;
}

.dt1-feed-list {
    min-width: 0;
    padding: .65rem;
    border-inline-end: 1px solid var(--feed-border);
}

.dt1-feed-item {
    position: relative;
    padding: .68rem .78rem;
    border: 1px solid transparent;
    border-radius: .9rem;
    transition: opacity .2s ease, transform .2s ease, border-color .2s ease, background .2s ease;
}

.dt1-feed-item + .dt1-feed-item {
    margin-top: .28rem;
}

.dt1-feed-item:hover,
.dt1-feed-item.is-selected {
    border-color: var(--feed-border);
    background: var(--feed-soft);
}

.dt1-feed-item.is-selected {
    box-shadow: inset 3px 0 0 color-mix(in srgb, currentColor 35%, transparent);
}

.dt1-feed-item:focus-visible {
    outline: 2px solid color-mix(in srgb, currentColor 45%, transparent);
    outline-offset: 2px;
}

.dt1-feed-item.is-handled {
    opacity: 0;
    transform: translateY(-.3rem);
}

.dt1-feed-item-top,
.dt1-feed-inspector-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .28rem .55rem;
    font-size: .7rem;
    opacity: .7;
}

.dt1-feed-source {
    font-weight: 800;
    opacity: 1;
}

.dt1-feed-state {
    padding: .11rem .4rem;
    border-radius: 999px;
    background: var(--feed-soft);
    font-size: .68rem;
    font-weight: 800;
}

.dt1-feed-item h2 {
    display: -webkit-box;
    margin: .28rem 0 .22rem;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 1.06rem;
    line-height: 1.55;
    font-weight: 900;
}

.dt1-feed-summary {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .8rem;
    line-height: 1.55;
    opacity: .7;
}

.dt1-feed-item-signals {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin: .18rem 0;
}

.dt1-feed-item-signals:empty {
    display: none;
}

.dt1-feed-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
    margin-top: .42rem;
}

.dt1-feed-primary-actions {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
}

.dt1-feed-more {
    position: relative;
    flex: 0 0 auto;
}

.dt1-feed-more > summary {
    list-style: none;
    min-width: 4.6rem;
}

.dt1-feed-more > summary::-webkit-details-marker {
    display: none;
}

.dt1-feed-more-menu {
    position: absolute;
    z-index: 50;
    inset-inline-end: 0;
    inset-block-start: calc(100% + .3rem);
    display: none;
    min-width: 13rem;
    padding: .35rem;
    border: 1px solid var(--feed-border);
    border-radius: .8rem;
    background: var(--feed-surface);
    color: var(--feed-surface-text);
    box-shadow: 0 14px 38px color-mix(in srgb, #000 22%, transparent);
}

.dt1-feed-more[open] .dt1-feed-more-menu {
    display: grid;
    gap: .12rem;
}

.dt1-feed-inline-action {
    display: flex;
    width: 100%;
    align-items: center;
    min-height: 2rem;
    padding: .4rem .55rem;
    border: 0;
    border-radius: .55rem;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .76rem;
    font-weight: 700;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}

.dt1-feed-inline-action:hover,
.dt1-feed-inline-action:focus-visible {
    background: var(--feed-soft);
    outline: none;
}

.dt1-feed-inspector {
    position: sticky;
    top: 1rem;
    align-self: start;
    min-width: 0;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1rem;
    border-inline-start: 1px solid var(--feed-border);
}

.dt1-feed-inspector-close {
    display: none;
}

.dt1-feed-inspector-placeholder {
    display: grid;
    min-height: 20rem;
    place-content: center;
    text-align: center;
    opacity: .58;
}

.dt1-feed-inspector-placeholder span {
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dt1-feed-inspector-placeholder strong {
    margin-top: .35rem;
    font-size: 1.05rem;
}

.dt1-feed-inspector-placeholder p {
    max-width: 23rem;
    margin: .4rem auto 0;
    line-height: 1.75;
}

.dt1-feed-inspector-content {
    display: grid;
    gap: .75rem;
}

.dt1-feed-inspector-content[hidden] {
    display: none;
}

.dt1-feed-inspector h2 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.65;
    font-weight: 900;
}

.dt1-feed-inspector-summary {
    margin: 0;
    max-height: 12rem;
    overflow-y: auto;
    font-size: .84rem;
    line-height: 1.8;
    opacity: .8;
}

.dt1-feed-inspector-signals {
    display: grid;
    gap: .4rem;
}

.dt1-feed-inspector-memory,
.dt1-feed-inspector-selected-title,
.dt1-feed-inspector-production {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .48rem .55rem;
    border: 1px solid var(--feed-border);
    border-radius: .72rem;
    background: var(--feed-soft);
    font-size: .75rem;
}

.dt1-feed-inspector-memory[hidden],
.dt1-feed-inspector-selected-title[hidden],
.dt1-feed-inspector-production[hidden] {
    display: none;
}

.dt1-feed-inspector-selected-title {
    align-items: flex-start;
    flex-direction: column;
}

.dt1-feed-inspector-selected-title span {
    font-size: .68rem;
    opacity: .62;
}

.dt1-feed-inspector-selected-title strong {
    line-height: 1.6;
}

.dt1-feed-inspector-source {
    justify-self: start;
}

.dt1-feed-inspector-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .4rem;
    padding-block: .2rem .7rem;
    border-block-end: 1px solid var(--feed-border);
}

.dt1-feed-inspector-actions > [data-inspector-primary],
.dt1-feed-inspector-actions > [data-inspector-secondary] {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.dt1-feed-inspector-actions > [data-inspector-secondary] {
    justify-content: flex-end;
}

.dt1-feed-inspector-utilities {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: .25rem;
}

.dt1-feed-inspector-ai {
    display: grid;
    gap: .55rem;
    padding-top: .15rem;
}

.dt1-feed-inspector-ai[hidden] {
    display: none;
}

.dt1-feed-inspector-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}

.dt1-feed-inspector-section-head > div {
    display: grid;
}

.dt1-feed-inspector-section-head span {
    font-size: .68rem;
    opacity: .58;
}

.dt1-feed-inspector-section-head strong {
    font-size: .9rem;
}

.dt1-feed-inspector-title-form {
    display: grid;
    gap: .5rem;
}

.dt1-feed-inspector-title-form label {
    display: grid;
    gap: .3rem;
    font-size: .75rem;
    font-weight: 700;
}

.dt1-feed-inspector-title-form textarea {
    width: 100%;
}

.dt1-feed-pagination {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding: .8rem .35rem .2rem;
}

.dt1-feed-empty,
.dt1-feed-provider-error,
.dt1-feed-empty-list {
    padding: 1.25rem;
}

.dt1-feed-provider-error {
    border-color: color-mix(in srgb, #e11d48 35%, transparent);
}

.dt1-feed-provider-error p {
    margin: .35rem 0 .8rem;
}

.dt1-feed-toast {
    position: fixed;
    z-index: 80;
    inset-inline-end: 1.25rem;
    inset-block-end: 1.25rem;
    max-width: min(24rem, calc(100vw - 2rem));
    padding: .8rem 1rem;
    border: 1px solid var(--feed-border);
    border-radius: .9rem;
    background: var(--feed-surface);
    color: var(--feed-surface-text);
    box-shadow: 0 14px 38px color-mix(in srgb, #000 18%, transparent);
}

.dt1-feed-toast[data-type="error"] {
    border-color: color-mix(in srgb, #e11d48 45%, transparent);
}

.dt1-feed-dialog .modal-box {
    max-width: 48rem;
}

.dt1-feed .is-busy {
    opacity: .72;
    pointer-events: none;
}

.dt1-feed [aria-busy="true"] {
    cursor: progress;
}

.dt1-feed [aria-busy="true"]::before {
    content: "";
    width: .8em;
    height: .8em;
    margin-inline-end: .35rem;
    border: 2px solid currentColor;
    border-inline-start-color: transparent;
    border-radius: 999px;
    animation: dt1-feed-spin .7s linear infinite;
}

.dt1-feed-confirm-dialog .modal-box {
    max-width: min(30rem, calc(100vw - 2rem));
}

.dt1-feed-confirm-kind {
    display: block;
    margin-bottom: .35rem;
    font-size: .68rem;
    font-weight: 800;
    opacity: .58;
}

.dt1-feed-confirm-evidence {
    display: grid;
    gap: .2rem;
    margin: .75rem 0;
    padding: .75rem;
    border: 1px solid var(--feed-border);
    border-radius: .8rem;
    background: color-mix(in srgb, currentColor 4%, transparent);
}

.dt1-feed-confirm-evidence[hidden],
.dt1-feed-confirm-history[hidden] {
    display: none;
}

.dt1-feed-confirm-evidence strong {
    overflow-wrap: anywhere;
    font-size: .82rem;
}

.dt1-feed-confirm-evidence span {
    font-size: .72rem;
    opacity: .65;
}

.dt1-feed-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .75rem;
}

@keyframes dt1-feed-spin {
    to { transform: rotate(1turn); }
}

@media (prefers-reduced-motion: reduce) {
    .dt1-feed [aria-busy="true"]::before {
        animation: none;
    }
}

.dt1-feed-source-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: .7rem;
    margin: 1rem 0;
}

.dt1-feed-source-form label {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.dt1-feed-discovery-results,
.dt1-feed-source-list {
    display: grid;
    gap: .55rem;
}

.dt1-feed-discovery-results {
    margin-bottom: 1rem;
}

.dt1-feed-discovery-row,
.dt1-feed-source-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .7rem;
    border: 1px solid var(--feed-border);
    border-radius: .8rem;
}

.dt1-feed-discovery-row > div,
.dt1-feed-source-row > div:first-child {
    display: grid;
    min-width: 0;
    gap: .15rem;
}

.dt1-feed-discovery-row small,
.dt1-feed-source-row small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: .65;
}

.dt1-feed-source-row span {
    font-size: .75rem;
    opacity: .68;
}

.dt1-feed-source-row > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

@media (max-width: 1100px) {
    .dt1-feed-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dt1-feed-workspace {
        grid-template-columns: 1fr;
    }

    .dt1-feed-list {
        border-inline-end: 0;
        border-block-end: 1px solid var(--feed-border);
    }

    .dt1-feed-inspector {
        position: static;
        max-height: none;
        border-inline-start: 0;
        border-block-start: 1px solid var(--feed-border);
    }
}

@media (max-width: 700px) {
    .dt1-feed {
        gap: .55rem;
    }

    .dt1-feed-stats {
        min-height: 1rem;
        padding-inline: .1rem;
        font-size: .68rem;
        white-space: nowrap;
    }

    .dt1-feed-stats span:not(:first-child) {
        display: none;
    }

    .dt1-feed-list {
        padding: .4rem;
    }

    .dt1-feed-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .dt1-feed-hero-actions,
    .dt1-feed-board-switch {
        width: 100%;
    }

    .dt1-feed-board-switch select {
        width: 100%;
    }

    .dt1-feed-toolbar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
    }

    .dt1-feed-searchbar {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .dt1-feed-filters,
    .dt1-feed-toolbar > [data-feed-bulk-mode],
    .dt1-feed-toolbar > a {
        min-width: 0;
    }

    .dt1-feed-stats {
        display: none;
    }

    .dt1-feed-workspace {
        order: 1;
    }

    .dt1-feed-state-help {
        order: 2;
    }

    .dt1-feed-list {
        order: 1;
    }

    .dt1-feed-source-tree {
        order: 2;
    }

    .dt1-feed-filters > summary,
    .dt1-feed-toolbar > [data-feed-bulk-mode],
    .dt1-feed-toolbar > a {
        width: 100%;
        justify-content: center;
    }

    .dt1-feed-filters[open] .dt1-feed-filter-panel {
        position: fixed;
        z-index: 76;
        inset-inline: .5rem;
        inset-block-end: .5rem;
        top: auto;
        display: grid;
        grid-template-columns: 1fr;
        width: auto;
        max-height: calc(100dvh - 1rem);
        overflow-y: auto;
        padding: .85rem;
        border-radius: 1rem;
        box-shadow: 0 18px 60px color-mix(in srgb, #000 28%, transparent);
    }

    .dt1-feed-filter-actions {
        grid-column: 1;
    }

    .dt1-feed-bulk-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .dt1-feed-bulk-actions {
        width: 100%;
    }

    .dt1-feed-bulk-actions .btn {
        flex: 1;
    }

    .dt1-feed-item-actions {
        align-items: center;
    }

    .dt1-feed-primary-actions {
        flex: 1 1 auto;
    }

    .dt1-feed-primary-actions .btn {
        width: auto;
    }

    .dt1-feed-more[open] .dt1-feed-more-menu {
        position: fixed;
        z-index: 77;
        inset-inline: .5rem;
        inset-block-end: .5rem;
        top: auto;
        min-width: 0;
        max-height: calc(100dvh - 1rem);
        overflow-y: auto;
        padding: .5rem;
        border-radius: 1rem;
        box-shadow: 0 18px 60px color-mix(in srgb, #000 28%, transparent);
    }

    .dt1-feed-source-form {
        grid-template-columns: 1fr;
    }

    .dt1-feed-source-row {
        width: 100%;
    }

    .dt1-feed-source-row,
    .dt1-feed-discovery-row {
        align-items: stretch;
        flex-direction: column;
    }

    .dt1-feed-inspector {
        display: none;
        position: fixed;
        z-index: 75;
        inset-inline: .5rem;
        inset-block-end: .5rem;
        top: auto;
        max-height: calc(100dvh - 1rem);
        overflow-y: auto;
        padding: .8rem;
        border: 1px solid var(--feed-border);
        border-radius: 1rem;
        background: var(--feed-surface);
        color: var(--feed-surface-text);
        box-shadow: 0 18px 60px color-mix(in srgb, #000 28%, transparent);
    }

    .dt1-feed-inspector.is-mobile-open {
        display: block;
    }

    .dt1-feed-inspector-close {
        display: inline-flex;
        position: sticky;
        inset-inline-start: 0;
        top: 0;
        z-index: 2;
        margin-inline-start: auto;
        background: var(--feed-surface);
    }

    .dt1-feed-inspector-actions {
        grid-template-columns: 1fr;
    }

    .dt1-feed-inspector-actions > [data-inspector-secondary] {
        justify-content: flex-start;
    }

    .dt1-feed-inspector-actions .btn,
    .dt1-feed-inspector-source {
        min-height: 2.35rem;
    }

    .dt1-feed-inspector-section-head {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Editorial Memory V1 */
.dt1-feed .dt1-memory-indicator {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: .16rem .42rem;
    border: 1px solid var(--feed-border);
    border-radius: 999px;
    background: var(--feed-soft);
    color: inherit;
    font-size: .69rem;
    font-weight: 750;
    line-height: 1.35;
    text-decoration: none;
}

.dt1-feed .dt1-memory-indicator[data-level="exact"] {
    border-width: 1px;
    font-weight: 850;
}

.dt1-feed .dt1-memory-indicator[data-level="related"] {
    border-style: dashed;
}

.dt1-feed .dt1-memory-results {
    display: grid;
    gap: .65rem;
    margin-top: 1rem;
}

.dt1-feed .dt1-memory-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .35rem .75rem;
    padding: .75rem;
    border: 1px solid var(--feed-border);
    border-radius: .85rem;
    background: var(--feed-softer);
}

.dt1-feed .dt1-memory-result-type {
    grid-row: 1 / span 2;
    padding: .2rem .5rem;
    border-radius: 999px;
    background: var(--feed-soft);
    font-size: .7rem;
    font-weight: 800;
}

.dt1-feed .dt1-memory-result small {
    opacity: .7;
}

.dt1-feed .dt1-memory-result .btn {
    grid-column: 3;
    grid-row: 1 / span 2;
}

.dt1-feed .dt1-memory-empty {
    margin: 0;
    padding: .85rem;
    border: 1px dashed var(--feed-border);
    border-radius: .8rem;
    text-align: center;
    opacity: .75;
}

@media (max-width: 700px) {
    .dt1-feed .dt1-memory-result {
        grid-template-columns: 1fr;
    }
    .dt1-feed .dt1-memory-result-type,
    .dt1-feed .dt1-memory-result .btn {
        grid-column: 1;
        grid-row: auto;
    }
}


/* Editorial Smart Title V1 */
.dt1-feed .dt1-feed-selected-title {
    display: inline-flex;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    padding: .16rem .42rem;
    border: 1px solid var(--feed-border);
    border-radius: 999px;
    background: var(--feed-soft);
    font-size: .69rem;
    font-weight: 750;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dt1-feed .dt1-feed-selected-title[hidden] {
    display: none;
}

.dt1-feed .dt1-ai-title-dialog .modal-box {
    width: min(44rem, calc(100vw - 2rem));
    max-width: 44rem;
}

.dt1-feed .dt1-ai-title-source,
.dt1-feed .dt1-ai-title-status {
    margin: .8rem 0;
    padding: .75rem .85rem;
    border: 1px solid var(--feed-border);
    border-radius: .85rem;
    background: var(--feed-soft);
}

.dt1-feed .dt1-ai-title-source {
    display: grid;
    gap: .25rem;
}

.dt1-feed .dt1-ai-title-source span,
.dt1-feed .dt1-ai-title-status {
    font-size: .78rem;
}

.dt1-feed .dt1-ai-title-source span {
    opacity: .68;
}

.dt1-feed .dt1-ai-title-candidates {
    display: grid;
    gap: .55rem;
    margin: .9rem 0;
}

.dt1-feed .dt1-ai-title-candidate {
    width: 100%;
    padding: .7rem .8rem;
    border: 1px solid var(--feed-border);
    border-radius: .8rem;
    background: var(--feed-softer);
    color: inherit;
    text-align: start;
    line-height: 1.8;
    cursor: pointer;
}

.dt1-feed .dt1-ai-title-candidate:hover,
.dt1-feed .dt1-ai-title-candidate:focus-visible,
.dt1-feed .dt1-ai-title-candidate.is-selected {
    border-width: 2px;
    background: var(--feed-soft);
}

@media (max-width: 700px) {
    .dt1-feed .dt1-ai-title-dialog .modal-box {
        width: calc(100vw - 1rem);
        max-height: calc(100dvh - 1rem);
        overflow: auto;
    }
}


@media (max-width: 700px) {
    .dt1-feed-item {
        padding: .5rem .55rem;
    }

    .dt1-feed-item:not(.is-expanded) .dt1-feed-summary {
        display: none;
    }

    .dt1-feed-item-actions {
        gap: .2rem;
        margin-top: .28rem;
    }

    .dt1-feed-item-actions .btn {
        min-height: 2rem;
        padding-inline: .45rem;
        font-size: .68rem;
    }

    .dt1-feed .dt1-feed-summary {
        -webkit-line-clamp: 1;
    }

    .dt1-feed .dt1-feed-item-signals {
        flex-wrap: nowrap;
        overflow: hidden;
        margin: .05rem 0;
    }

    .dt1-feed .dt1-memory-indicator,
    .dt1-feed .dt1-feed-selected-title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* 2026-09-26 pre-production acceptance remediation */
.dt1-feed-state-help {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .45rem;
    margin: .35rem 0 .65rem;
    padding: .55rem .7rem;
    border: 1px solid var(--feed-border);
    border-radius: .75rem;
    background: var(--feed-soft);
    font-size: .7rem;
    line-height: 1.75;
    opacity: .82;
}
.dt1-feed-state-help strong {
    color: var(--dt1-text, inherit);
    opacity: 1;
}
.dt1-feed-item-main {
    display: grid;
    grid-template-columns: 8.625rem minmax(0, 1fr);
    gap: .7rem;
    align-items: start;
}
.dt1-feed-item-main:not(:has(.dt1-feed-thumbnail)) {
    grid-template-columns: 1fr;
}
.dt1-feed-thumbnail {
    display: block;
    width: 8.625rem;
    max-width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border: 1px solid var(--feed-border);
    border-radius: .65rem;
    background: var(--feed-soft);
}
.dt1-feed-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dt1-feed-item-copy {
    min-width: 0;
}
.dt1-feed-translated-title {
    margin: .28rem 0 0;
    color: var(--dt1-muted, #64748b);
    font-size: .82rem;
    line-height: 1.75;
}
.dt1-feed-details-summary {
    margin-bottom: .7rem;
    padding: .7rem .8rem;
    border: 1px solid var(--feed-border);
    border-radius: .7rem;
    background: var(--feed-soft);
}
.dt1-feed-details-summary strong {
    display: block;
    margin-bottom: .3rem;
    font-size: .72rem;
}
.dt1-feed-details-summary p {
    margin: 0;
    line-height: 1.85;
    white-space: pre-wrap;
}
.dt1-feed-item h2 a {
    color: inherit;
    text-decoration: none;
}
.dt1-feed-item h2 a:hover,
.dt1-feed-item h2 a:focus-visible {
    text-decoration: underline;
    text-underline-offset: .18em;
}
.dt1-feed-infinite-sentinel {
    display: grid;
    place-items: center;
    min-height: 4rem;
    margin-top: .65rem;
    color: var(--dt1-muted, #94a3b8);
    font-size: .72rem;
    text-align: center;
}
.dt1-feed-infinite-sentinel[hidden] {
    display: none;
}
.dt1-feed-infinite-sentinel.is-loading::before {
    content: '';
    width: 1rem;
    height: 1rem;
    margin-bottom: .35rem;
    border: 2px solid currentColor;
    border-inline-start-color: transparent;
    border-radius: 999px;
    animation: dt1-feed-spin .7s linear infinite;
}
@keyframes dt1-feed-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
    .dt1-feed-item-main {
        grid-template-columns: minmax(0, 1fr);
        gap: .55rem;
    }
    .dt1-feed-thumbnail {
        width: 6.75rem;
    }
    .dt1-feed-state-help {
        display: block;
    }
}

.dt1-feed-category-create {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .35rem;
    margin-top: .65rem;
}
.dt1-feed-category-help {
    display: block;
    margin-top: .35rem;
    font-size: .64rem;
    line-height: 1.65;
    opacity: .58;
}
.dt1-feed-category-body {
    display: grid;
    gap: .25rem;
}
.dt1-feed-category-tools {
    display: flex;
    align-items: center;
    gap: .25rem;
}
.dt1-feed-category-tools > .dt1-feed-source-tree-link {
    flex: 1 1 auto;
    min-width: 0;
}
.dt1-feed-source-node {
    display: flex;
    align-items: stretch;
    gap: .2rem;
    min-width: 0;
}
.dt1-feed-source-node > .dt1-feed-source-tree-link {
    flex: 1 1 auto;
    min-width: 0;
}
.dt1-feed-source-drag {
    display: inline-flex;
    flex: 0 0 1.6rem;
    align-items: center;
    justify-content: center;
    border-radius: .45rem;
    cursor: grab;
    user-select: none;
    opacity: .48;
    touch-action: none;
}
.dt1-feed-source-drag:hover,
.dt1-feed-source-drag:focus-visible {
    background: var(--feed-soft);
    opacity: .9;
}
.dt1-feed-source-drag:active {
    cursor: grabbing;
}
.dt1-feed-source-node.is-dragging {
    opacity: .45;
}
.dt1-feed-source-group[data-feed-category-drop].is-drop-target {
    border-color: color-mix(in srgb, var(--dt1-primary, #2563eb) 72%, var(--feed-border));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--dt1-primary, #2563eb) 18%, transparent);
}
.dt1-feed-source-group[data-feed-category-drop].is-drop-target > summary {
    background: color-mix(in srgb, var(--dt1-primary, #2563eb) 10%, transparent);
}


/* Product Phase 7F-3: cohesive Ajax Feed source/category manager. */
.dt1-feed-source-tree-head-actions,
.dt1-feed-source-quick-actions,
.dt1-feed-manager-head,
.dt1-feed-manager-section-head,
.dt1-feed-manager-category-row,
.dt1-feed-manager-category-actions,
.dt1-feed-source-row-actions {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.dt1-feed-source-tree-head-actions,
.dt1-feed-source-quick-actions,
.dt1-feed-manager-category-actions,
.dt1-feed-source-row-actions {
    flex-wrap: wrap;
}

.dt1-feed-source-group.is-active {
    border-color: color-mix(in srgb, var(--dt1-primary, #2563eb) 58%, var(--feed-border));
    background: color-mix(in srgb, var(--dt1-primary, #2563eb) 7%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dt1-primary, #2563eb) 15%, transparent);
}

.dt1-feed-source-node.is-active {
    border-radius: .6rem;
    background: color-mix(in srgb, var(--dt1-primary, #2563eb) 10%, transparent);
}

.dt1-feed-category-sources {
    display: grid;
    gap: .25rem;
}

.dt1-feed-source-quick-actions {
    flex: 0 0 auto;
    align-self: center;
}

.dt1-feed-source-manager {
    width: min(72rem, calc(100vw - 2rem));
    max-width: none;
    max-height: 92dvh;
    overflow: auto;
}

.dt1-feed-manager-head {
    justify-content: space-between;
    align-items: flex-start;
    padding-inline-end: 2.75rem;
}

.dt1-feed-manager-head > div,
.dt1-feed-manager-section-head > div,
.dt1-feed-source-row-copy,
.dt1-feed-manager-category-row > div:first-child {
    display: grid;
    gap: .2rem;
    min-width: 0;
}

.dt1-feed-manager-section {
    display: grid;
    gap: .8rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--feed-border);
    border-radius: .9rem;
    background: var(--feed-softer);
}

.dt1-feed-manager-section-head {
    justify-content: space-between;
}

.dt1-feed-manager-section small,
.dt1-feed-source-row-copy small,
.dt1-feed-source-row-copy span {
    color: var(--dt1-muted, #94a3b8);
}

.dt1-feed-manager-category-list,
.dt1-feed-source-list {
    display: grid;
    gap: .55rem;
}

.dt1-feed-manager-category-row,
.dt1-feed-source-row {
    justify-content: space-between;
    gap: .8rem;
    padding: .7rem;
    border: 1px solid var(--feed-border);
    border-radius: .75rem;
    background: var(--feed-surface);
}

.dt1-feed-manager-category-actions,
.dt1-feed-source-row-actions {
    justify-content: flex-end;
}

.dt1-feed-manager-category-actions .select,
.dt1-feed-source-row-actions .select {
    min-width: 10rem;
    max-width: 16rem;
}

@media (max-width: 760px) {
    .dt1-feed-manager-head,
    .dt1-feed-manager-category-row,
    .dt1-feed-source-row {
        align-items: stretch;
        flex-direction: column;
    }

    .dt1-feed-manager-category-actions,
    .dt1-feed-source-row-actions {
        justify-content: flex-start;
    }

    .dt1-feed-manager-category-actions .select,
    .dt1-feed-source-row-actions .select {
        width: 100%;
        max-width: none;
    }

    .dt1-feed-source-quick-actions .btn {
        min-height: 1.85rem;
        padding-inline: .4rem;
    }
}


/* Product Phase 7F-5: sequential Bulk AI title progress. */
.dt1-bulk-title-progress {
    display: grid;
    gap: .35rem;
    margin-top: .55rem;
    padding: .55rem .65rem;
    border: 1px solid var(--feed-border);
    border-radius: .65rem;
    background: var(--feed-soft);
    font-size: .7rem;
}
.dt1-bulk-title-progress[hidden] {
    display: none;
}
.dt1-bulk-title-progress > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.dt1-bulk-title-progress strong {
    max-width: 62%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dt1-bulk-title-progress.is-active {
    border-color: color-mix(in srgb, var(--dt1-primary, #2563eb) 55%, var(--feed-border));
}
.dt1-bulk-title-progress.is-success {
    border-color: color-mix(in srgb, #16a34a 58%, var(--feed-border));
}
.dt1-bulk-title-progress.is-error {
    border-color: color-mix(in srgb, #dc2626 58%, var(--feed-border));
}


/* Product Phase 7G-4: Ajax Feed navigation and presentation. */
.dt1-feed-workspace {
    grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
}

.dt1-feed-reader {
    position: relative;
    min-width: 0;
}

.dt1-feed-scope-loading {
    display: flex;
    position: sticky;
    z-index: 30;
    top: .5rem;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: max-content;
    max-width: calc(100% - 2rem);
    margin: .65rem auto 0;
    padding: .55rem .8rem;
    border: 1px solid var(--feed-border);
    border-radius: 999px;
    background: var(--feed-surface);
    box-shadow: 0 10px 28px color-mix(in srgb, #000 14%, transparent);
    font-size: .76rem;
    font-weight: 800;
}

.dt1-feed-scope-loading[hidden] {
    display: none;
}

.dt1-feed-list,
.dt1-feed-selected-source-slot {
    transition: opacity .16s ease;
}

.dt1-feed-selected-source-slot:empty {
    display: none;
}

.dt1-feed-reader.is-scope-loading .dt1-feed-list,
.dt1-feed-reader.is-scope-loading .dt1-feed-selected-source-slot {
    opacity: .58;
    pointer-events: none;
}

.dt1-feed-selected-source {
    display: grid;
    gap: .75rem;
    margin: .65rem;
    padding: .85rem .95rem;
    border: 1px solid color-mix(in srgb, var(--dt1-primary, #2563eb) 32%, var(--feed-border));
    border-radius: .9rem;
    background: color-mix(in srgb, var(--dt1-primary, #2563eb) 6%, var(--feed-surface));
}

.dt1-feed-selected-source-main,
.dt1-feed-selected-source-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.dt1-feed-selected-source-main > div:first-child {
    min-width: 0;
}

.dt1-feed-selected-source-main span,
.dt1-feed-selected-source-count span {
    color: var(--dt1-muted, #64748b);
    font-size: .7rem;
}

.dt1-feed-selected-source-main h2 {
    margin: .1rem 0 0;
    overflow-wrap: anywhere;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.55;
}

.dt1-feed-selected-source-count {
    display: grid;
    flex: 0 0 auto;
    min-width: 4.5rem;
    gap: .05rem;
    text-align: center;
}

.dt1-feed-selected-source-count strong {
    font-size: 1.2rem;
    line-height: 1;
}

.dt1-feed-selected-source-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.dt1-feed-source-control-popover {
    position: relative;
}

.dt1-feed-source-control-popover > summary {
    list-style: none;
}

.dt1-feed-source-control-popover > summary::-webkit-details-marker {
    display: none;
}

.dt1-feed-source-control-panel {
    display: grid;
    position: absolute;
    z-index: 55;
    inset-inline-start: 0;
    inset-block-start: calc(100% + .4rem);
    gap: .65rem;
    width: min(34rem, calc(100vw - 3rem));
    padding: .8rem;
    border: 1px solid var(--feed-border);
    border-radius: .85rem;
    background: var(--feed-surface);
    box-shadow: 0 16px 44px color-mix(in srgb, #000 22%, transparent);
}

.dt1-feed-source-control-panel label {
    display: grid;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 700;
}

.dt1-feed-source-control-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.dt1-feed-source-recheck-results {
    display: grid;
    gap: .3rem;
    padding: .55rem .65rem;
    border: 1px solid var(--feed-border);
    border-radius: .65rem;
    background: var(--feed-soft);
    font-size: .68rem;
}

.dt1-feed-source-recheck-results[hidden] {
    display: none;
}

.dt1-feed-source-recheck-results a {
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dt1-feed-stale-sources {
    margin-top: .3rem;
    border-top: 1px dashed var(--feed-border);
    padding-top: .3rem;
}

.dt1-feed-stale-sources > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    cursor: pointer;
    list-style: none;
    padding: .45rem .55rem;
    border-radius: .55rem;
    color: var(--dt1-muted, #64748b);
    font-size: .7rem;
    font-weight: 800;
}

.dt1-feed-stale-sources > summary::-webkit-details-marker {
    display: none;
}

.dt1-feed-stale-sources > summary:hover,
.dt1-feed-stale-sources > summary:focus-visible {
    background: var(--feed-soft);
    outline: none;
}

.dt1-feed-stale-sources-body {
    display: grid;
    gap: .25rem;
    padding-top: .25rem;
}

.dt1-feed-inline-title-form {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.dt1-feed-selected-title-field {
    display: grid;
    gap: .3rem;
    min-width: 0;
    font-size: .72rem;
    font-weight: 800;
}

.dt1-feed-selected-title-field input {
    width: 100%;
    min-width: 0;
}

.dt1-feed [dir="auto"] {
    text-align: start;
    unicode-bidi: plaintext;
}

.dt1-feed .dt1-ai-title-candidate {
    text-align: start;
}

@media (981px <= width <= 1180px) {
    .dt1-feed-workspace {
        grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    }
}

@media (width <= 980px) {
    .dt1-feed-workspace {
        grid-template-columns: 1fr;
    }

    .dt1-feed-selected-source {
        margin-inline: .5rem;
    }
}

@media (width <= 640px) {
    .dt1-feed-selected-source-main,
    .dt1-feed-selected-source-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dt1-feed-selected-source-count {
        display: flex;
        align-items: baseline;
        min-width: 0;
        gap: .35rem;
        text-align: start;
    }

    .dt1-feed-selected-source-actions > .btn,
    .dt1-feed-source-control-popover,
    .dt1-feed-source-control-popover > summary {
        width: 100%;
    }

    .dt1-feed-source-control-panel {
        position: static;
        width: 100%;
        margin-top: .4rem;
        box-shadow: none;
    }

    .dt1-feed-scope-loading {
        position: static;
        width: calc(100% - 1rem);
        max-width: none;
        border-radius: .75rem;
    }
}


/* Editorial UI remediation — Feed entity creation, icon picker, inline Memory and AI parity. */
.dt1-feed-entity-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
}
.dt1-feed-entity-actions .btn {
    gap: .35rem;
}
.dt1-feed-entity-actions .dt1-icon,
.dt1-feed-dialog-head .dt1-icon,
.dt1-feed-profile-create-form .dt1-icon,
.dt1-feed-source-form .dt1-icon,
.dt1-feed-category-create .dt1-icon {
    width: 1rem;
    height: 1rem;
}

.dt1-feed-manager-modal {
    width: min(72rem, calc(100vw - 2rem));
    max-width: none;
    max-height: 92dvh;
    overflow: auto;
    padding: 0;
}
.dt1-feed-dialog-head {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border-bottom: 1px solid var(--feed-border);
    background: color-mix(in srgb, var(--feed-surface) 96%, transparent);
    backdrop-filter: blur(12px);
}
.dt1-feed-dialog-head > div {
    min-width: 0;
}
.dt1-feed-dialog-head h3 {
    margin: 0;
    font-size: 1.1rem;
}
.dt1-feed-dialog-head p {
    margin: .25rem 0 0;
    color: var(--dt1-muted, #94a3b8);
    font-size: .76rem;
    line-height: 1.7;
}
.dt1-feed-dialog-head form {
    flex: 0 0 auto;
}
.dt1-feed-dialog-close {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--feed-border);
    border-radius: .85rem;
}
.dt1-feed-dialog-close .dt1-icon {
    width: 1.2rem;
    height: 1.2rem;
}

.dt1-feed-manager-modal > .dt1-feed-manager-section,
.dt1-feed-profile-create-form {
    margin: 1rem 1.2rem;
}
.dt1-feed-manager-section-primary {
    border-color: color-mix(in srgb, var(--dt1-primary, #2563eb) 34%, var(--feed-border));
    background: color-mix(in srgb, var(--dt1-primary, #2563eb) 5%, var(--feed-softer));
}

.dt1-feed-source-form {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(12rem, .7fr) auto;
    align-items: end;
    gap: .75rem;
    margin: 0;
}
.dt1-feed-source-form label,
.dt1-feed-category-create label,
.dt1-feed-profile-create-form label {
    display: grid;
    gap: .35rem;
    min-width: 0;
    font-size: .74rem;
    font-weight: 800;
}
.dt1-feed-source-form .input,
.dt1-feed-source-form .select,
.dt1-feed-profile-create-form .input,
.dt1-feed-profile-create-form .select {
    width: 100%;
}

.dt1-feed-category-create {
    display: grid;
    grid-template-columns: minmax(12rem, .8fr) minmax(18rem, 1.2fr) auto;
    align-items: end;
    gap: .75rem;
    margin: 0;
}
.dt1-feed-icon-field {
    display: grid;
    gap: .35rem;
    min-width: 0;
    font-size: .74rem;
    font-weight: 800;
}
.dt1-feed-icon-field-compact {
    margin-top: .15rem;
}
.dt1-feed-icon-picker {
    position: relative;
    min-width: 0;
}
.dt1-feed-icon-picker > summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    min-height: 2.5rem;
    padding: .45rem .65rem;
    border: 1px solid var(--feed-border);
    border-radius: .75rem;
    background: var(--feed-surface);
    cursor: pointer;
    list-style: none;
}
.dt1-feed-icon-picker > summary::-webkit-details-marker {
    display: none;
}
.dt1-feed-icon-picker > summary > .dt1-icon {
    width: .95rem;
    height: .95rem;
    opacity: .55;
}
.dt1-feed-icon-picker-preview {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    border-radius: .55rem;
    background: var(--feed-soft);
}
.dt1-feed-icon-picker-preview .dt1-icon {
    width: 1rem;
    height: 1rem;
}
.dt1-feed-icon-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .45rem;
    margin-top: .4rem;
    padding: .65rem;
    border: 1px solid var(--feed-border);
    border-radius: .85rem;
    background: var(--feed-surface);
    box-shadow: 0 14px 34px color-mix(in srgb, #000 14%, transparent);
}
.dt1-feed-icon-choice {
    display: grid;
    min-width: 0;
    min-height: 4.2rem;
    place-items: center;
    gap: .25rem;
    padding: .45rem .3rem;
    border: 1px solid transparent;
    border-radius: .7rem;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .66rem;
    cursor: pointer;
}
.dt1-feed-icon-choice:hover,
.dt1-feed-icon-choice:focus-visible {
    border-color: var(--feed-border);
    background: var(--feed-soft);
    outline: none;
}
.dt1-feed-icon-choice.is-selected {
    border-color: color-mix(in srgb, var(--dt1-primary, #2563eb) 65%, var(--feed-border));
    background: color-mix(in srgb, var(--dt1-primary, #2563eb) 10%, transparent);
}
.dt1-feed-icon-choice-graphic {
    display: grid;
    width: 1.7rem;
    height: 1.7rem;
    place-items: center;
}
.dt1-feed-icon-choice-graphic .dt1-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.dt1-feed-profile-create-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    padding: 1rem;
    border: 1px solid var(--feed-border);
    border-radius: .9rem;
    background: var(--feed-softer);
}
.dt1-feed-profile-name-field,
.dt1-feed-profile-create-form .modal-action {
    grid-column: 1 / -1;
}
.dt1-feed-profile-create-form .modal-action {
    margin-top: .25rem;
}

.dt1-feed-memory-check-result {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding-inline: .2rem;
    font-size: .75rem;
    font-weight: 900;
}
.dt1-feed-memory-check-result[hidden] {
    display: none;
}
.dt1-feed-memory-check-result.is-clear {
    color: #16a34a;
}
.dt1-feed-memory-check-result.is-related,
.dt1-feed-memory-check-result.is-related a {
    color: #b45309;
}
.dt1-feed-memory-check-result.is-related a {
    text-decoration: underline;
    text-underline-offset: .2em;
}
html[data-theme="dark"] .dt1-feed .dt1-feed-memory-check-result.is-related,
html[data-theme="dark"] .dt1-feed .dt1-feed-memory-check-result.is-related a {
    color: #fbbf24;
}
.dt1-feed-memory-check-result.is-used,
.dt1-feed-memory-check-result.is-used a {
    color: #dc2626;
}
.dt1-feed-memory-check-result.is-used a {
    text-decoration: underline;
    text-underline-offset: .2em;
}

.dt1-feed-inline-ai {
    display: grid;
    gap: .7rem;
}
.dt1-feed-inline-ai-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}
.dt1-feed-inline-ai .dt1-ai-title-empty-cta {
    width: 100%;
    min-height: 6rem;
    padding: 1rem;
    border: 1px dashed color-mix(in srgb, currentColor 28%, transparent);
    border-radius: .85rem;
    background: var(--feed-softer);
    color: inherit;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}
.dt1-feed-inline-ai .dt1-ai-title-empty-cta:hover,
.dt1-feed-inline-ai .dt1-ai-title-empty-cta:focus-visible {
    border-style: solid;
    background: var(--feed-soft);
    outline: 2px solid color-mix(in srgb, currentColor 24%, transparent);
    outline-offset: 2px;
}
.dt1-feed-inline-ai .dt1-ai-title-progress {
    display: flex;
    min-height: 5rem;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    border-radius: .85rem;
    background: var(--feed-softer);
    font-weight: 800;
}
.dt1-feed-inline-ai .dt1-ai-title-progress[hidden],
.dt1-feed-inline-ai .dt1-ai-title-empty-cta[hidden] {
    display: none;
}
.dt1-feed-inline-ai .dt1-ai-title-candidates {
    display: grid;
    gap: .5rem;
}
.dt1-feed-inline-ai .dt1-ai-title-candidate {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: .65rem;
    width: 100%;
    text-align: start;
}
.dt1-feed-inline-ai .dt1-ai-title-candidate-number {
    display: grid;
    width: 1.6rem;
    height: 1.6rem;
    place-items: center;
    border-radius: 999px;
    background: var(--feed-soft);
    font-size: .72rem;
    font-weight: 900;
}
.dt1-feed-inline-ai .dt1-ai-title-candidate-text {
    min-width: 0;
    line-height: 1.75;
}

@media (max-width: 900px) {
    .dt1-feed-source-form,
    .dt1-feed-category-create,
    .dt1-feed-profile-create-form {
        grid-template-columns: minmax(0, 1fr);
    }
    .dt1-feed-profile-name-field,
    .dt1-feed-profile-create-form .modal-action {
        grid-column: 1;
    }
    .dt1-feed-icon-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dt1-feed-entity-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        gap: .3rem;
    }
    .dt1-feed-entity-actions .btn {
        width: 100%;
        min-width: 0;
        min-height: 2.55rem;
        justify-content: center;
        gap: .3rem;
        padding-inline: .4rem;
        white-space: normal;
        line-height: 1.45;
        text-align: center;
    }
    .dt1-feed-manager-modal {
        width: calc(100vw - .75rem);
        max-height: 94dvh;
    }
    .dt1-feed-dialog-head {
        padding: .9rem;
    }
    .dt1-feed-manager-modal > .dt1-feed-manager-section,
    .dt1-feed-profile-create-form {
        margin: .75rem;
    }
    .dt1-feed-icon-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Connector 15: local Feed profile management (RTL, narrow viewport and themes). */
.dt1-feed-profile-manager-list {
    display: grid;
    gap: .55rem;
    margin: 1rem 1.2rem;
    max-height: 34vh;
    overflow-y: auto;
}
.dt1-feed-profile-manager-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .7rem;
    padding: .75rem;
    border: 1px solid var(--feed-border);
    border-radius: .8rem;
    background: var(--feed-softer);
}
.dt1-feed-profile-manager-row > div:first-child {
    display: grid;
    gap: .25rem;
    min-width: 0;
}
.dt1-feed-profile-manager-row strong { overflow-wrap: anywhere; }
.dt1-feed-profile-manager-row small { color: var(--dt1-text-muted); }
.dt1-feed-profile-manager-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.dt1-feed-profile-create-form [data-feed-profile-form-heading] { font-size: .95rem; font-weight: 800; }
.dt1-feed-translation-notice {
    margin: .75rem 0;
    padding: .65rem .8rem;
    border: 1px solid var(--feed-border);
    border-radius: .7rem;
    color: var(--dt1-text-muted);
}
@media (max-width: 640px) {
    .dt1-feed-profile-manager-list { margin: .7rem; max-height: 26vh; }
    .dt1-feed-profile-manager-row { align-items: flex-start; }
}

/* P59: generated Persian headline replaces translation, never the source headline. */
.dt1-feed-translated-title.is-generated-title { color: #15803d; font-weight: 800; font-size: .95rem; }
.dt1-feed-translated-title.is-generated-title a { color: inherit; text-decoration: none; }
.dt1-feed-translated-title.is-generated-title a:hover { text-decoration: underline; }
.dt1-feed-translated-title[hidden], .dt1-feed-selected-title[hidden] { display: none; }
[data-theme="dark"] .dt1-feed-translated-title.is-generated-title { color: #86efac; }
.dt1-feed-item.is-read .dt1-feed-translated-title.is-generated-title { opacity: 1; }
/* P61: all source languages share a right-side thumbnail, per latest user choice. */
.dt1-feed-item .dt1-feed-item-main { direction: rtl; }
.dt1-feed-item-copy { direction: rtl; }
@media (max-width: 640px) {
    .dt1-feed-item-main { grid-template-columns: 6.75rem minmax(0,1fr); }
    .dt1-feed-item-main:not(:has(.dt1-feed-thumbnail)) { grid-template-columns: 1fr; }
}

/* Text direction preserves readable punctuation; visual alignment is always right. */
.dt1-feed-item .dt1-feed-item-copy h2 { text-align: right; }
.dt1-feed-item.is-source-ltr .dt1-feed-item-copy h2 { direction: ltr; }
.dt1-feed-item.is-source-rtl .dt1-feed-item-copy h2 { direction: rtl; }
.dt1-feed-item-copy h2 [data-feed-title-link] { display: block; text-align: right; }
.dt1-feed-item-copy [data-feed-persian-title] { direction: rtl; text-align: right; }
.dt1-feed-thumbnail[hidden] { display: none; }
.dt1-feed-item-main:has(.dt1-feed-thumbnail[hidden]) { grid-template-columns: 1fr; }
.dt1-feed-thumbnail.is-placeholder {
    background-color: var(--feed-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'%3E%3Crect x='9' y='8' width='46' height='32' rx='4' fill='none' stroke='%2394a3b8' stroke-width='3'/%3E%3Ccircle cx='22' cy='19' r='4' fill='%2394a3b8'/%3E%3Cpath d='M14 35l11-10 8 7 6-5 11 8' fill='none' stroke='%2394a3b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 3rem auto;
}
.dt1-feed-thumbnail.is-placeholder img { display: none; }
.dt1-feed-thumbnail-status { display: block; font-size: .68rem; color: var(--dt1-text-muted); }
.dt1-feed-thumbnail-status[hidden] { display: none; }

/* P68: comfortable Read target, shared by SSR and refreshed Feed actions. */
.dt1-feed-item .dt1-feed-read-action {
    min-height: 44px;
    height: auto;
    min-width: 88px;
    padding: .5rem .9rem;
    font-size: .875rem;
}
.dt1-feed-item[data-feed-state-pending="1"][hidden] { display: none !important; }
