/* DD MARKET design system. Loaded last so every storefront and workspace page
   shares one visual language without changing page structure or behaviour. */
html.direct-theme {
    --site-content-width: 1560px;
    --site-gutter: clamp(24px, 3vw, 52px);
    --ds-bg: #080e17;
    --ds-bg-deep: #060b12;
    --ds-surface: #101b29;
    --ds-surface-raised: #162438;
    --ds-surface-soft: #0c1724;
    --ds-line: #293d54;
    --ds-line-strong: #3d5b79;
    --ds-text: #edf4ff;
    --ds-muted: #9fb1c7;
    --ds-accent: #69c1ff;
    --ds-accent-strong: #1689c5;
    --ds-accent-soft: #163a56;
    --ds-success: #88dfc1;
    --ds-warning: #e7c46d;
    --ds-danger: #ff948a;
    --ds-radius-control: 11px;
    --ds-radius-card: 18px;
    --ds-radius-section: 24px;
    --ds-shadow-card: 0 18px 52px rgb(0 0 0 / .2);
    /* Compatibility aliases for older page styles. */
    --bg: var(--ds-bg);
    --surface: var(--ds-surface);
    --line: var(--ds-line);
    --white: var(--ds-text);
    --muted: var(--ds-muted);
    --coral: var(--ds-accent);
    --mint: var(--ds-accent);
    --yellow: var(--ds-warning);
    --ink: var(--ds-bg-deep);
    color-scheme: dark;
    background: var(--ds-bg);
}

@media (max-width: 760px) {
    html.direct-theme { --site-gutter: 18px; }
}

.direct-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(ellipse 72% 560px at 50% -90px, rgb(31 91 137 / .24), transparent 72%),
        var(--ds-bg);
    color: var(--ds-text);
    font-family: var(--site-font);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.direct-body:not(.direct-workspace) > .direct-main:is(.wrap, .shell) {
    width: min(var(--site-content-width), calc(100% - 2 * var(--site-gutter)));
    margin-inline: auto;
}

.direct-body:not(.direct-workspace) > .direct-main {
    min-height: min(720px, calc(100vh - 176px));
}

.direct-body :where(h1, h2, h3, h4) {
    color: var(--ds-text);
    text-wrap: balance;
}

.direct-body :where(p, li, dd) { text-wrap: pretty; }
.direct-body :where(button, input, select, textarea) { font-family: inherit; }

.direct-body :where(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 3px;
}

.direct-body :where(button, a) {
    -webkit-tap-highlight-color: transparent;
}

.direct-body :where(button, [role="button"], .tg-button, .service-primary, .service-secondary, .cart-checkout) {
    touch-action: manipulation;
}

/* A single navigation rhythm on public, account and operations pages. */
.direct-body > .top {
    height: 78px;
    padding-inline: max(var(--site-gutter), calc((100% - var(--site-content-width)) / 2));
    background: rgb(8 17 29 / .9);
    border-color: rgb(64 91 120 / .62);
    box-shadow: 0 1px 0 rgb(255 255 255 / .025), 0 14px 38px rgb(0 0 0 / .16);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
}

.direct-body > .top .brand img { width: clamp(174px, 14vw, 214px); }

.direct-body > .top .nav a,
.direct-body > .top .account a,
.direct-body > .top .header-search,
.direct-body > .top .header-cart,
.direct-body > .top .menu {
    border-radius: var(--ds-radius-control);
}

.direct-body > .top .nav a {
    color: #b9c9dc;
    font-weight: 650;
}

.direct-body > .top .nav a:hover,
.direct-body > .top .nav a[aria-current] {
    border-color: #315271;
    background: #142b41;
    color: var(--ds-text);
}
.direct-body > .top > .language-switcher {
    display: flex;
    align-items: center;
    flex: none;
    margin: 0;
}
.direct-body > .top > .language-switcher button {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-width: 68px;
    min-height: 44px;
    padding: 5px;
    gap: 3px;
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-radius-control);
    background: #0f1e30;
    color: var(--ds-muted);
    font: 800 10px/1 var(--site-font);
    letter-spacing: .04em;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, transform .12s ease;
}
.direct-body > .top > .language-switcher button span {
    display: grid;
    min-width: 24px;
    min-height: 30px;
    place-items: center;
    border-radius: 7px;
}
.direct-body > .top > .language-switcher button span.is-current {
    background: var(--ds-accent-strong);
    color: #fff;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .18);
}
.direct-body > .top > .language-switcher button i {
    color: #63778d;
    font-style: normal;
}
.direct-body > .top > .language-switcher button:hover {
    border-color: var(--ds-accent);
    background: color-mix(in srgb, var(--ds-accent) 10%, var(--ds-bg-deep));
}
.direct-body > .top > .language-switcher button:active { transform: translateY(1px); }

.direct-body > .top .account a,
.direct-body > .top .header-search,
.direct-body > .top .header-cart,
.direct-body > .top .menu {
    border-color: var(--ds-line);
    background: #0f1e30;
    color: #d7e5f5;
}

.direct-body > .top .account .solid {
    border-color: #4ab8ec;
    background: var(--ds-accent-strong);
    color: #fff;
    box-shadow: 0 2px 0 #07527c;
}

.direct-body > .top .header-search {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    flex: none;
    place-items: center;
    padding: 0;
    cursor: pointer;
}

.direct-body > .top .header-search .market-icon { width: 21px; height: 21px; }
.direct-body > .top .header-search kbd { display: none; }
.direct-body > .top .header-search:hover { border-color: #6792b8; background: #18324b; }

.direct-route-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: 3px;
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0;
    background: var(--ds-accent);
    pointer-events: none;
}

html.direct-navigating .direct-route-progress {
    animation: direct-route-progress 1.1s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes direct-route-progress {
    0% { transform: scaleX(.04); opacity: 1; }
    70% { transform: scaleX(.78); opacity: 1; }
    100% { transform: scaleX(.94); opacity: 1; }
}

.direct-search-dialog {
    width: min(720px, calc(100% - 32px));
    max-width: none;
    max-height: min(620px, calc(100dvh - 40px));
    margin: min(14vh, 120px) auto auto;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--ds-line-strong);
    border-radius: var(--ds-radius-section);
    background: var(--ds-surface);
    color: var(--ds-text);
    box-shadow: 0 28px 90px rgb(0 0 0 / .48);
}

.direct-search-dialog::backdrop {
    background: rgb(3 8 14 / .76);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.direct-search-panel { display: grid; gap: 14px; padding: clamp(22px, 4vw, 34px); }
.direct-search-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.direct-search-panel > header div { min-width: 0; }
.direct-search-panel > header span { color: var(--ds-accent); font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.direct-search-panel h2 { margin: 7px 0 0; font-size: clamp(23px, 3.5vw, 34px); line-height: 1.2; letter-spacing: -.035em; }
.direct-search-panel > header button { min-height: 42px; padding: 9px 13px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-control); background: var(--ds-surface-raised); color: var(--ds-muted); font: 650 12px/1 var(--site-font); cursor: pointer; }
.direct-search-panel > label { margin-top: 8px; color: #c7d6e8; font-size: 12px; font-weight: 650; }
.direct-search-control { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 6px 7px 6px 16px; border: 1px solid var(--ds-line-strong); border-radius: 14px; background: var(--ds-bg-deep); }
.direct-search-control:focus-within { border-color: var(--ds-accent); box-shadow: 0 0 0 3px rgb(105 193 255 / .13); }
.direct-search-control > .market-icon { color: var(--ds-accent); }
.direct-search-control input { width: 100%; min-width: 0; height: 44px; padding: 0; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; color: var(--ds-text); font-size: 16px; }
.direct-search-control input[aria-invalid="true"] { color: var(--ds-danger); }
.direct-search-control button { min-height: 44px; padding: 10px 17px; border: 1px solid #46afe4; border-radius: 9px; background: var(--ds-accent-strong); color: #fff; font: 700 12px/1.2 var(--site-font); cursor: pointer; box-shadow: 0 2px 0 #064d74; }
.direct-search-control button:active { transform: translateY(1px); box-shadow: none; }
.direct-search-panel > p { margin: 0; color: var(--ds-muted); font-size: 11px; line-height: 1.6; }
.direct-search-panel kbd { display: inline-flex; min-width: 24px; min-height: 22px; align-items: center; justify-content: center; padding: 2px 6px; border: 1px solid var(--ds-line-strong); border-radius: 6px; background: var(--ds-bg-deep); color: #dbe8f7; font: 650 10px/1 var(--site-font); }
.direct-search-panel nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--ds-line); }
.direct-search-panel nav a { display: inline-flex; min-height: 42px; align-items: center; padding: 9px 12px; border: 1px solid var(--ds-line); border-radius: 9px; background: var(--ds-surface-soft); color: #bed0e4; font-size: 12px; font-weight: 650; }
.direct-search-panel nav a:hover { border-color: var(--ds-accent); color: var(--ds-accent); }
.direct-search-recent { display: grid; gap: 10px; margin-top: 2px; padding-top: 16px; border-top: 1px solid var(--ds-line); }
.direct-search-recent[hidden] { display: none; }
.direct-search-recent > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.direct-search-recent h3 { margin: 0; color: #dce9f8; font-size: 13px; }
.direct-search-recent > header button { padding: 7px 0; border: 0; background: transparent; color: var(--ds-muted); font: 650 11px/1.2 var(--site-font); cursor: pointer; }
.direct-search-recent > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.direct-search-recent > div > a { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 11px; min-height: 68px; padding: 8px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-control); background: var(--ds-surface-soft); color: var(--ds-text); }
.direct-search-recent > div > a:hover { border-color: var(--ds-accent); background: var(--ds-surface-raised); }
.direct-search-recent > div > a > span:first-child { display: grid; width: 52px; height: 52px; overflow: hidden; place-items: center; border-radius: 8px; background: var(--ds-accent-soft); color: var(--ds-accent); font-weight: 800; }
.direct-search-recent img { width: 100%; height: 100%; object-fit: cover; }
.direct-search-recent > div > a > span:last-child { display: grid; gap: 4px; min-width: 0; }
.direct-search-recent strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.direct-search-recent small { color: var(--ds-muted); font-size: 11px; }

/* Shared panel language across storefront sections. */
.direct-body:not(.direct-workspace) :is(
    .panel,
    .filter-panel,
    .cart-summary,
    .blog-card,
    .blog-article,
    .blog-toc,
    .blog-related,
    .info-card-grid article,
    .boost-calculator,
    .tg-configurator,
    .tg-faq,
    .service-package,
    .service-benefits,
    .product-content,
    .product-rating,
    .product-review
) {
    border-color: var(--ds-line);
    border-radius: var(--ds-radius-card);
}

.direct-body:not(.direct-workspace) :is(
    .cart-summary,
    .blog-card,
    .blog-article,
    .blog-toc,
    .blog-related,
    .info-card-grid article,
    .tg-configurator,
    .service-package,
    .service-benefits,
    .product-rating
) {
    background-color: var(--ds-surface);
}

.direct-body:not(.direct-workspace) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    border-color: var(--ds-line-strong);
    border-radius: var(--ds-radius-control);
    background-color: var(--ds-bg-deep);
    color: var(--ds-text);
}

.direct-body:not(.direct-workspace) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea)::placeholder {
    color: #7489a2;
    opacity: 1;
}

.direct-body:not(.direct-workspace) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):hover {
    border-color: #4d6d8e;
}

.direct-body:not(.direct-workspace) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
    border-color: var(--ds-accent);
    box-shadow: 0 0 0 3px rgb(105 193 255 / .13);
}

/* Consistent actions: quiet secondary controls, blue primary controls. */
.direct-body:not(.direct-workspace) :is(
    .tg-button,
    .service-primary,
    .service-secondary,
    .cart-checkout,
    .info-cta > a,
    .boost-calc-action,
    .blog-read,
    .blog-publish
) {
    min-height: 46px;
    border-radius: var(--ds-radius-control);
    font-weight: 700;
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.direct-body:not(.direct-workspace) :is(.tg-button-primary, .service-primary, .cart-checkout, .boost-calc-action, .blog-publish) {
    border-color: #46afe4;
    background: var(--ds-accent-strong);
    color: #fff;
    box-shadow: 0 2px 0 #064d74;
}

@media (hover: hover) {
    .direct-body:not(.direct-workspace) :is(.store-product, .blog-card, .info-card-grid article, .service-package) {
        transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
    }

    .direct-body:not(.direct-workspace) :is(.store-product, .blog-card, .info-card-grid article, .service-package):hover {
        transform: translateY(-2px);
        border-color: #46698d;
        box-shadow: var(--ds-shadow-card);
    }

    .direct-body:not(.direct-workspace) :is(.tg-button, .service-primary, .service-secondary, .cart-checkout, .info-cta > a, .boost-calc-action, .blog-read, .blog-publish):hover {
        transform: translateY(-1px);
    }
}

.direct-body:not(.direct-workspace) :is(.tg-button, .service-primary, .service-secondary, .cart-checkout, .info-cta > a, .boost-calc-action, .blog-read, .blog-publish):active {
    transform: translateY(1px);
    box-shadow: none;
}

/* Legacy public pages keep their structure while adopting the Telegram palette. */
.direct-body[data-direct-page="blog"] :is(
    .blog-kicker,
    .blog-hero h1 span,
    .blog-search-result a,
    .blog-read,
    .blog-article-end,
    .blog-related article > a,
    .blog-prose a,
    .blog-toc summary span
),
.direct-body[data-direct-page="information"] :is(
    .info-hero > p,
    .info-hero h1 em,
    .info-hero > div a,
    .info-card-grid article > span,
    .info-card-grid a,
    .info-details li span,
    .info-updated,
    .info-faq summary span,
    .info-faq summary i,
    .info-faq details a
),
.direct-body[data-direct-page="cart"] :is(.cart-title p, .cart-empty > span) {
    color: var(--ds-accent);
}

.direct-body[data-direct-page="blog"] :is(
    .blog-topics a[aria-current],
    .store-pagination [aria-current],
    .blog-progress
) {
    border-color: var(--ds-accent);
    background: var(--ds-accent-strong);
    color: #fff;
}

.direct-body[data-direct-page="blog"] .blog-hero-art {
    border-color: var(--ds-line-strong);
    background: linear-gradient(145deg, #1b4d70, #11263b);
    color: var(--ds-text);
}

.direct-body[data-direct-page="blog"] .blog-hero-art::after { border-color: var(--ds-accent); }
.direct-body[data-direct-page="blog"] .blog-hero-art i { border-color: var(--ds-text); }
.direct-body[data-direct-page="blog"] .blog-card-art { background: #176c9f; color: #fff; }
.direct-body[data-direct-page="blog"] .blog-card:nth-child(3n + 2) .blog-card-art { background: #24566f; color: #fff; }
.direct-body[data-direct-page="blog"] .blog-card:nth-child(3n) .blog-card-art { background: #5b4f2f; color: #fff; }
.direct-body[data-direct-page="blog"] :is(.blog-prose h2::before, .blog-prose li::marker, .blog-meta span::before) { color: var(--ds-accent); }
.direct-body[data-direct-page="blog"] .blog-meta span::before { background: var(--ds-accent); }
.direct-body[data-direct-page="blog"] :is(.blog-prose blockquote, .blog-editor-note) { border-color: var(--ds-accent); }
.direct-body[data-direct-page="blog"] .blog-editor-note > span { background: var(--ds-accent-soft); color: var(--ds-accent); }

.direct-body[data-direct-page="information"] .info-tabs {
    border-color: var(--ds-line);
    border-radius: 14px;
    background: var(--ds-surface);
}

.direct-body[data-direct-page="information"] .info-tabs a { border-radius: 9px; }
.direct-body[data-direct-page="information"] .info-tabs a.is-active { background: var(--ds-accent-soft); color: #dff3ff; }
.direct-body[data-direct-page="information"] .info-faq details { border-color: var(--ds-line); background: var(--ds-surface); }
.direct-body[data-direct-page="information"] .info-cta {
    border: 1px solid var(--ds-line-strong);
    border-radius: var(--ds-radius-section);
    background: radial-gradient(circle at 88% 20%, rgb(105 193 255 / .2), transparent 32%), var(--ds-surface-raised);
    color: var(--ds-text);
    box-shadow: var(--ds-shadow-card);
}

.direct-body[data-direct-page="information"] .info-cta > a {
    border: 1px solid #46afe4;
    background: var(--ds-accent-strong);
    color: #fff;
    box-shadow: 0 2px 0 #064d74;
}

.direct-body[data-direct-page="cart"] .cart-page { padding-block: clamp(28px, 4vw, 56px) 72px; }
.direct-body[data-direct-page="cart"] .cart-title { margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--ds-line); }
.direct-body[data-direct-page="cart"] .cart-title p { margin: 0 0 8px; color: var(--ds-accent); font-size: 11px; letter-spacing: .08em; }
.direct-body[data-direct-page="cart"] .cart-title h1 { font-size: clamp(34px, 4vw, 52px); letter-spacing: -.04em; }
.direct-body[data-direct-page="cart"] .cart-title > a { padding: 10px 13px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-control); color: #c9d9eb; font-weight: 650; }
.direct-body[data-direct-page="cart"] .cart-title > a:hover { border-color: var(--ds-accent); color: var(--ds-accent); }
.direct-body[data-direct-page="cart"] .cart-layout { grid-template-columns: minmax(0, 1fr) minmax(310px, 360px); gap: clamp(20px, 3vw, 36px); }
.direct-body[data-direct-page="cart"] .cart-items { display: grid; gap: 12px; }
.direct-body[data-direct-page="cart"] .cart-row { gap: 18px; padding: 18px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-card); background: var(--ds-surface-soft); }
.direct-body[data-direct-page="cart"] .cart-row:hover { border-color: var(--ds-line-strong); }
.direct-body[data-direct-page="cart"] .cart-image { background: var(--ds-accent-soft); color: var(--ds-accent); }
.direct-body[data-direct-page="cart"] .cart-info h2 { color: var(--ds-text); font-size: 17px; }
.direct-body[data-direct-page="cart"] .cart-info p { margin-block: 6px; color: var(--ds-muted); }
.direct-body[data-direct-page="cart"] .cart-stepper { overflow: hidden; border-color: var(--ds-line-strong); border-radius: var(--ds-radius-control); background: var(--ds-bg-deep); }
.direct-body[data-direct-page="cart"] .cart-stepper button:hover:not(:disabled) { background: var(--ds-accent-soft); color: var(--ds-accent); }
.direct-body[data-direct-page="cart"] .cart-row-actions > strong { color: var(--ds-text); font-size: 17px; }
.direct-body[data-direct-page="cart"] .cart-checkout { min-height: 44px; border: 1px solid #46afe4; border-radius: var(--ds-radius-control); background: var(--ds-accent-strong); color: #fff; box-shadow: 0 2px 0 #064d74; }
.direct-body[data-direct-page="cart"] .cart-checkout:active { transform: translateY(1px); box-shadow: none; }
.direct-body[data-direct-page="cart"] .cart-row-actions button:not(.cart-checkout) { min-height: 38px; padding-inline: 10px; border: 1px solid transparent; border-radius: 8px; color: var(--ds-muted); text-decoration: none; }
.direct-body[data-direct-page="cart"] .cart-row-actions button:not(.cart-checkout):hover { border-color: var(--ds-line); color: var(--ds-danger); }
.direct-body[data-direct-page="cart"] .cart-summary { position: sticky; top: 98px; padding: 24px; border-color: var(--ds-line-strong); background: var(--ds-surface); box-shadow: var(--ds-shadow-card); }
.direct-body[data-direct-page="cart"] .cart-summary h2 { color: #c9d9eb; font-size: 14px; }
.direct-body[data-direct-page="cart"] .cart-summary > strong { display: block; margin-bottom: 18px; color: var(--ds-text); font-size: clamp(30px, 3vw, 40px); letter-spacing: -.04em; }
.direct-body[data-direct-page="cart"] .cart-summary p { margin: 0; padding-top: 14px; border-top: 1px solid var(--ds-line); color: var(--ds-muted); }
.direct-body[data-direct-page="cart"] .cart-summary p + p { margin-top: 14px; }
.direct-body[data-direct-page="cart"] .cart-saving { border-color: var(--ds-line-strong); border-radius: var(--ds-radius-control); background: var(--ds-surface); box-shadow: var(--ds-shadow-card); }
.direct-body[data-direct-page="cart"] .cart-empty { max-width: 720px; margin-inline: auto; padding: clamp(50px, 8vw, 84px) 24px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-section); background: var(--ds-surface-soft); }
.direct-body[data-direct-page="cart"] .cart-empty > span { color: var(--ds-accent); }
.direct-body[data-direct-page="cart"] .cart-undo { position: fixed; right: max(20px, var(--site-gutter)); bottom: 22px; z-index: 80; display: grid; grid-template-columns: minmax(0, 1fr) auto 38px; align-items: center; gap: 14px; width: min(440px, calc(100% - 40px)); padding: 12px; border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-card); background: var(--ds-surface-raised); box-shadow: 0 18px 52px rgb(0 0 0 / .38); }
.direct-body[data-direct-page="cart"] .cart-undo > div { display: grid; gap: 3px; min-width: 0; }
.direct-body[data-direct-page="cart"] .cart-undo strong { font-size: 13px; }
.direct-body[data-direct-page="cart"] .cart-undo span { overflow: hidden; color: var(--ds-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.direct-body[data-direct-page="cart"] .cart-undo > button { min-height: 38px; padding: 8px 12px; border: 1px solid var(--ds-accent); border-radius: 9px; background: var(--ds-accent-soft); color: #dff3ff; font: 700 12px/1 var(--site-font); cursor: pointer; }
.direct-body[data-direct-page="cart"] .cart-undo > .cart-undo-close { width: 38px; padding: 0; border-color: transparent; background: transparent; color: var(--ds-muted); font-size: 20px; }

/* Account and admin stay dense, but now use the same DD MARKET tokens. */
html.direct-theme {
    --app-bg: var(--ds-bg);
    --app-surface: var(--ds-surface);
    --app-surface-2: var(--ds-surface-raised);
    --app-fg: var(--ds-text);
    --app-muted: var(--ds-muted);
    --app-border: var(--ds-line);
    --app-border-strong: var(--ds-line-strong);
    --app-accent: var(--ds-accent);
    --app-accent-hover: #91d3ff;
    --app-accent-ink: #a7ddff;
    --app-accent-soft: var(--ds-accent-soft);
    --app-accent-soft-2: #1d4a6b;
    --app-success: var(--ds-success);
    --app-danger: var(--ds-danger);
    --app-warning: var(--ds-warning);
    --app-text: var(--ds-text);
    --app-text-muted: var(--ds-muted);
    --app-line: var(--ds-line);
}

.direct-workspace {
    background:
        radial-gradient(ellipse 72% 480px at 50% -120px, rgb(31 91 137 / .2), transparent 72%),
        var(--ds-bg);
}

.direct-workspace > .direct-main {
    width: min(var(--site-content-width), calc(100% - 2 * var(--site-gutter)));
    margin-inline: auto;
}

.direct-workspace :is(
    .od-account-nav,
    .account-section,
    .account-security-card,
    .account-session-card,
    .orders-index-list,
    .order-summary-card,
    .order-support-chat,
    .settings-console-nav,
    .manage-panel,
    .admin-home-section,
    .admin-ops-list,
    .admin-catalog-list,
    .admin-catalog-editor,
    .telegram-service-card,
    .tg-admin-panel
) {
    border-color: var(--ds-line) !important;
    border-radius: var(--ds-radius-card);
    background-color: var(--ds-surface);
}

.direct-workspace :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
.direct-workspace [data-flux-input] input,
.direct-workspace [data-flux-control]:not([data-flux-button], ui-checkbox, ui-switch, ui-radio) {
    border-color: var(--ds-line-strong) !important;
    border-radius: var(--ds-radius-control) !important;
    background: var(--ds-bg-deep) !important;
    color: var(--ds-text) !important;
}

.direct-workspace :is(
    .od-account-nav a.is-active,
    .settings-console-nav > a.is-active,
    .security-settings-tabs a.is-active,
    .orders-status-tabs button.is-active,
    .admin-console-tabs a[aria-current="page"]
) {
    border-color: var(--ds-accent) !important;
    background: var(--ds-accent-soft) !important;
    color: #dff3ff !important;
}

.direct-workspace :is(.manage-primary, .settings-button-primary, [data-flux-button][type="submit"]) {
    border-color: #46afe4 !important;
    border-radius: var(--ds-radius-control) !important;
    background: var(--ds-accent-strong) !important;
    color: #fff !important;
    font-weight: 750;
}

.direct-workspace :is(.manage-secondary, [data-flux-button]:not([type="submit"])) {
    border-radius: var(--ds-radius-control) !important;
}

.direct-workspace :is(.account-hero, .profile-settings-hero, .security-settings-hero, .wallet-balance-card, .withdraw-summary-card) {
    border-color: var(--ds-line-strong) !important;
    background: radial-gradient(circle at 92% 10%, rgb(105 193 255 / .12), transparent 34%), var(--ds-surface-raised) !important;
}

.direct-workspace :is(.account-avatar, .profile-settings-avatar, .security-settings-icon, .account-action-icon) {
    border-color: #3f7194;
    background: var(--ds-accent-soft);
    color: var(--ds-accent);
}

.direct-workspace :is(.account-identity > p, .direct-kicker, .direct-auth-title span, [data-flux-link]) {
    color: var(--ds-accent) !important;
}

.direct-workspace .direct-auth-card {
    border-color: var(--ds-line-strong);
    background: var(--ds-surface);
    box-shadow: 8px 8px 0 #0b1420;
}

.direct-workspace :is(.admin-console-tabs a[aria-current="page"], .admin-console-summary a:hover) {
    border-color: var(--ds-accent);
}

.direct-workspace .admin-console-tabs a[aria-current="page"] {
    background: var(--ds-accent-soft);
    color: #dff3ff;
}

.direct-footer {
    border-color: var(--ds-line);
    color: var(--ds-text);
}

.direct-footer :is(p, nav > a) { color: var(--ds-muted); }
.direct-footer a:hover { color: var(--ds-accent); }
.direct-footer-bottom { border-color: var(--ds-line); }

@media (max-width: 1200px) {
    .direct-body > .top .nav.open {
        inset-inline: var(--site-gutter);
        border-color: var(--ds-line-strong);
        background: rgb(12 25 40 / .98);
        border-radius: var(--ds-radius-card);
    }
}

@media (max-width: 760px) {
    .direct-body > .top {
        height: 72px;
        padding-inline: var(--site-gutter);
    }

    .direct-body > .top .brand img { width: 162px; }
    .direct-body:not(.direct-workspace) > .direct-main { min-height: 0; }
    .direct-search-dialog { margin-top: 82px; }
    .direct-search-control { grid-template-columns: 20px minmax(0, 1fr); padding: 8px 13px; }
    .direct-search-control button { grid-column: 1 / -1; width: 100%; }
    .direct-search-panel > p { display: none; }
    .direct-search-recent > div { grid-template-columns: 1fr; }
    .direct-body[data-direct-page="cart"] .cart-layout { grid-template-columns: 1fr; }
    .direct-body[data-direct-page="cart"] .cart-summary { position: static; }
    .direct-body[data-direct-page="cart"] .cart-undo { right: 16px; bottom: 16px; width: calc(100% - 32px); }
}

@media (max-width: 420px) {
    .direct-body > .top .header-search { display: none; }
    .direct-body > .top > .language-switcher button { min-width: 62px; }
}

@media (max-width: 390px) {
    .direct-body > .top { gap: 7px; }
    .direct-body > .top .brand img { width: 134px; }
    .direct-body > .top :is(.header-search, .header-cart, .menu) { width: 40px; height: 40px; }
    .direct-search-panel { padding: 20px 16px; }
    .direct-search-panel h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .direct-body *,
    .direct-body *::before,
    .direct-body *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    html.direct-navigating .direct-route-progress { animation: none; transform: scaleX(1); opacity: 1; }
}
