/*
 * DigiForensics Dark New — palette layer only.
 *
 * Layout, typography, spacing and responsive rules are inherited from the
 * shared public theme system. Keep this file token-only so a theme switch
 * cannot change page geometry or DOM reading order.
 */

body.theme-dark-new.theme-dark[data-theme-area="frontend"] {
    color-scheme: dark;

    --new-bg: #0b0f17;
    --new-surface: #141a26;
    --new-surface-raised: #1b2331;
    --new-surface-muted: #0f141e;
    --new-surface-sunken: #080b12;
    --new-ink: #e7edf6;
    --new-muted: #93a1b8;
    --new-line: #293548;
    --new-line-strong: #3a4960;
    --new-accent: #4f8cff;
    --new-accent-strong: #80adff;
    --new-accent-soft: rgb(79 140 255 / 16%);
    --new-warm: #62c6e6;
    --new-positive: #45d6a0;
    --new-focus: #80adff;

    --ink: #e7edf6;
    --ink-2: #cdd7e6;
    --ink-3: #aab6c9;
    --ink-muted: #93a1b8;
    --ink-faint: #6c7890;
    --canvas: #0b0f17;
    --surface: #141a26;
    --surface-alt: #1b2331;
    --surface-raised: #1b2331;
    --surface-sunken: #080b12;
    --surface-glass: rgb(11 15 23 / 86%);
    --border: #293548;
    --border-strong: #3a4960;
    --border-focus: #80adff;
    --accent: #4f8cff;
    --accent-hover: #80adff;
    --accent-soft: rgb(79 140 255 / 16%);
    --accent-2: #62c6e6;
    --accent-2-soft: rgb(98 198 230 / 15%);
    --primary: #4f8cff;
    --df-system-primary: #4f8cff;
    --md-accent: #4f8cff;
    --md-accent-2: #62c6e6;
    --df-md-accent: #4f8cff;
    --positive: #45d6a0;
    --positive-soft: rgb(69 214 160 / 14%);
    --warning: #f1be61;
    --warning-soft: rgb(241 190 97 / 14%);
    --negative: #ff7e8b;
    --negative-soft: rgb(255 126 139 / 14%);

    background-color: var(--canvas);
    color: var(--ink);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .dfb-shell,
    .dfb-page,
    .dfb-shell-bg,
    main,
    .page-wrap,
    .surface,
    .surface-muted,
    .surface-plain,
    .df-panel,
    .workspace-panel,
    .auth-panel,
    .quick-link-card,
    .timeline-item,
    .package-line,
    .feature-band,
    .info-rail-section,
    .stat-card,
    .catalog-line,
    .writeup-card,
    .notice-bar,
    .empty-state,
    .query-bar,
    .compact-query-bar
) {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--ink);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .surface-muted,
    .surface-sunken,
    .query-grid,
    .query-grid-compact,
    .dfb-footer,
    .dfb-user-menu-popover,
    .dfb-theme-switcher-menu,
    .dropdown-menu,
    .modal-content
) {
    background-color: var(--surface-muted);
    border-color: var(--border);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    h1, h2, h3, h4, h5, h6,
    .df-title,
    .page-title,
    .section-title,
    .catalog-title,
    .panel-head h2,
    .panel-head h3,
    .dfb-brand-text strong
) {
    color: var(--ink);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    p,
    .page-lead,
    .section-summary,
    .catalog-summary,
    .text-muted,
    .df-meta,
    .page-meta,
    .dfb-brand-text span
) {
    color: var(--ink-muted);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(a, .section-link) {
    color: var(--accent-hover);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(a, .section-link):hover {
    color: var(--accent-hover);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .form-control,
    .form-select,
    .query-control,
    textarea,
    input,
    select
) {
    background-color: var(--surface-sunken);
    border-color: var(--border-strong);
    color: var(--ink);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .form-control,
    .form-select,
    .query-control,
    textarea,
    input,
    select
)::placeholder {
    color: var(--ink-faint);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .form-control,
    .form-select,
    .query-control,
    textarea,
    input,
    select
):focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgb(128 173 255 / 18%);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .btn-primary,
    .df-button-primary,
    .df26-search-button,
    .dfb-nav-link.is-active,
    .df-pagination .page-item.active .page-link
) {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #07111f;
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .btn-outline,
    .btn-outline-secondary,
    .btn-ghost
) {
    background-color: transparent;
    border-color: var(--border-strong);
    color: var(--ink-2);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .btn-outline,
    .btn-outline-secondary,
    .btn-ghost
):hover {
    background-color: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-hover);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .catalog-line,
    .package-line,
    .writeup-card,
    .timeline-item,
    .quick-link-card
):hover {
    background-color: var(--surface-raised);
    border-color: var(--border-strong);
    box-shadow: 0 6px 18px rgb(0 0 0 / 18%);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .df-md-reading,
    .prose,
    .prose-reading
) {
    color: var(--ink-2);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .df-md-reading blockquote,
    .prose blockquote,
    .prose-reading blockquote
) {
    background-color: var(--accent-soft);
    border-color: var(--border);
    border-left-color: var(--accent);
    color: var(--ink-2);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    .df-md-reading code:not(pre code),
    .prose code:not(pre code),
    .prose-reading code:not(pre code)
) {
    background-color: var(--accent-soft);
    border-color: var(--border);
    color: var(--accent-hover);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(pre, .df-vditor-shell .vditor-reset pre) {
    background-color: var(--surface-sunken);
    border-color: var(--border);
    color: var(--ink-2);
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] ::selection {
    background-color: rgb(79 140 255 / 34%);
    color: #f5f8ff;
}

body.theme-dark-new.theme-dark[data-theme-area="frontend"] :is(
    a,
    button,
    input,
    select,
    textarea,
    [tabindex]
):focus-visible {
    outline: 2px solid var(--new-focus);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    body.theme-dark-new.theme-dark[data-theme-area="frontend"] * {
        scroll-behavior: auto;
        transition-duration: 0.01ms;
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
    }
}
