.dt1-editorial-shell{display:grid;gap:.55rem;padding:.7rem .85rem;border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:1rem;background:color-mix(in srgb,currentColor 3%,transparent);box-shadow:0 8px 24px color-mix(in srgb,currentColor 4%,transparent)}.dt1-editorial-shell-main{display:flex;align-items:center;gap:.7rem;min-width:0}.dt1-editorial-shell-brand{display:grid;gap:0;min-width:max-content}.dt1-editorial-shell-brand span{font-size:.62rem;font-weight:800;letter-spacing:.08em;opacity:.48;text-transform:uppercase}.dt1-editorial-shell-brand strong{font-size:1.05rem;font-weight:900}.dt1-editorial-shell-board{display:grid;gap:.12rem;margin-inline-start:auto;min-width:12rem;max-width:22rem;font-size:.68rem;font-weight:700}.dt1-editorial-shell-board>span,.dt1-editorial-shell-board-label>span{opacity:.55}.dt1-editorial-shell-board select{width:100%;min-height:2.2rem}.dt1-editorial-shell-board-label{display:grid;gap:.04rem;margin-inline-start:auto;min-width:0}.dt1-editorial-shell-board-label strong,.dt1-editorial-shell-board-label small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dt1-editorial-shell-board-label small{font-size:.68rem;opacity:.58}.dt1-editorial-shell-actions{display:flex;align-items:center;gap:.4rem}@media(max-width:700px){.dt1-editorial-shell{gap:.4rem;padding:.55rem .65rem}.dt1-editorial-shell-main{gap:.5rem;flex-wrap:wrap}.dt1-editorial-shell-brand{order:1}.dt1-editorial-shell-board{order:2;margin-inline-start:auto;min-width:0;max-width:58%;flex:1}.dt1-editorial-shell-board>span{display:none}.dt1-editorial-shell-actions{order:3;width:100%;justify-content:flex-end}.dt1-editorial-shell-actions:empty{display:none}}@media(prefers-reduced-motion:reduce){.dt1-editorial-shell *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}


/* Phase 7A — shared Editorial modal contract */
dialog.dt1-editorial-dialog,
dialog.dt1-feed-dialog {
    border: 0;
    padding: 0;
    color: var(--dt1-text, currentColor);
    background: transparent;
}
dialog.dt1-editorial-dialog[open],
dialog.dt1-feed-dialog[open] {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    overflow: hidden;
}
dialog.dt1-editorial-dialog::backdrop,
dialog.dt1-feed-dialog::backdrop {
    background: rgb(15 23 42 / .58);
    backdrop-filter: blur(7px) saturate(.85);
}
.dt1-editorial-dialog .modal-box,
.dt1-feed-dialog .modal-box {
    position: relative;
    width: min(44rem, calc(100vw - 2rem));
    max-width: none;
    max-height: min(88dvh, 58rem);
    overflow: auto;
    padding: 1.35rem;
    border: 1px solid color-mix(in srgb, var(--dt1-text, currentColor) 13%, transparent);
    border-radius: 1.15rem;
    background: var(--dt1-surface, oklch(var(--b1)));
    color: var(--dt1-text, oklch(var(--bc)));
    box-shadow: 0 28px 80px rgb(2 6 23 / .28), 0 8px 28px rgb(2 6 23 / .14);
}

.dt1-editorial-dialog .modal-box > h3,
.dt1-feed-dialog .modal-box > h3 {
    margin: .1rem 2.5rem .35rem 0;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.55;
}
.dt1-editorial-dialog .modal-box > p,
.dt1-feed-dialog .modal-box > p {
    margin: 0 0 1rem;
    color: color-mix(in srgb, var(--dt1-text, currentColor) 68%, transparent);
    font-size: .82rem;
    line-height: 1.8;
}
.dt1-editorial-dialog .dt1-editorial-form,
.dt1-feed-dialog .dt1-feed-source-form {
    display: grid;
    gap: .9rem;
    margin-top: 1rem;
}
.dt1-editorial-dialog .dt1-editorial-form > label,
.dt1-feed-dialog .dt1-feed-source-form > label {
    display: grid;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 800;
}
.dt1-editorial-dialog .input,
.dt1-editorial-dialog .textarea,
.dt1-editorial-dialog .select,
.dt1-feed-dialog .input,
.dt1-feed-dialog .textarea,
.dt1-feed-dialog .select {
    width: 100%;
    background: color-mix(in srgb, var(--dt1-surface, white) 94%, var(--dt1-text, black) 6%);
    border-color: color-mix(in srgb, var(--dt1-text, currentColor) 16%, transparent);
}
.dt1-editorial-dialog .modal-action,
.dt1-feed-dialog .modal-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid color-mix(in srgb, var(--dt1-text, currentColor) 10%, transparent);
}

.dt1-editorial-shell-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding-top: .55rem;
    border-top: 1px solid color-mix(in srgb, currentColor 9%, transparent);
}
.dt1-editorial-shell-nav a {
    min-height: 2rem;
    padding: .36rem .72rem;
    border-radius: .6rem;
    color: inherit;
    font-size: .74rem;
    font-weight: 800;
    text-decoration: none;
    opacity: .64;
}
.dt1-editorial-shell-nav a:hover,
.dt1-editorial-shell-nav a:focus-visible {
    background: color-mix(in srgb, currentColor 6%, transparent);
    opacity: 1;
}
.dt1-editorial-shell-nav a.is-active {
    background: color-mix(in srgb, currentColor 10%, transparent);
    opacity: 1;
}
@media (max-width:700px) {
    .dt1-editorial-shell-nav {
        overflow-x: auto;
        scrollbar-width: thin;
    }
    .dt1-editorial-shell-nav a {
        flex: 0 0 auto;
    }
}

/* P58: history and Memory share accessible server-side pagination. */
.dt1-editorial-pagination { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.7rem; padding:.8rem 0; margin-block:.6rem; font-size:.85rem; }
.dt1-editorial-pagination form,.dt1-editorial-pagination label,.dt1-editorial-page-links { display:flex; align-items:center; flex-wrap:wrap; gap:.4rem; }
.dt1-editorial-pagination [aria-current="page"] { cursor:default; }
.dt1-editorial-pagination select { min-width:4.5rem; }
@media (max-width:640px) { .dt1-editorial-pagination { align-items:flex-start; } .dt1-editorial-page-links { max-width:100%; } }

.dt1-editorial-pagination { color:var(--dt1-text); }
.dt1-editorial-pagination .btn-ghost { color:var(--dt1-text); background:var(--dt1-surface); }

/* P59: one compact shared header, navigation on the RTL right. */
.dt1-editorial-shell-main > .dt1-editorial-shell-nav { margin: 0; padding: .25rem; border: 1px solid var(--editorial-border, #94a3b8); border-radius: .9rem; align-self: center; flex: 0 0 auto; }
.dt1-editorial-shell-main > .dt1-editorial-shell-nav a { padding: .5rem 1rem; border-radius: .65rem; font-weight: 750; }
.dt1-editorial-shell-main > .dt1-editorial-shell-nav a.is-active { color: #fff; background: #2563eb; }
.dt1-editorial-shell-main > .dt1-editorial-shell-nav a:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
@media (max-width: 640px) {
    .dt1-editorial-shell-main { flex-wrap: wrap; gap: .6rem; }
    .dt1-editorial-shell-main > .dt1-editorial-shell-nav { order: -1; width: auto; margin-inline: 0 auto; }
}

/* P60: primary navigation occupies the RTL start of the existing header row. */
.dt1-editorial-shell-main { justify-content: flex-start; }
.dt1-editorial-shell-main > .dt1-editorial-shell-nav { margin-inline-start: 0; margin-inline-end: auto; flex-shrink: 0; }
.dt1-editorial-shell-main > .dt1-editorial-shell-nav a { min-height: 2.75rem; padding: .6rem 1.05rem; font-size: .92rem; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 700px) {
 .dt1-editorial-shell-main > .dt1-editorial-shell-nav { order: 0; margin-inline-start: 0; }
 .dt1-editorial-shell-main > .dt1-editorial-shell-nav a { padding-inline: .7rem; }
}
.dt1-editorial-dialog-notice { position: sticky; inset-block-start: 0; z-index: 5; border: 1px solid currentColor; border-radius: .7rem; margin: .5rem 0; padding: .75rem; background: var(--dt1-surface, #fff); color: #b91c1c; font-weight: 700; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-theme="dark"] .dt1-editorial-dialog-notice { color: #fca5a5; }
.dt1-editorial-dialog-notice[data-type="success"] { color: #15803d; }
