:root {
    color-scheme: dark;
    --ui-bg-canvas: #08111f;
    --ui-bg: var(--ui-bg-canvas);
    --ui-surface-1: rgba(12, 19, 34, 0.88);
    --ui-surface-2: rgba(255, 255, 255, 0.04);
    --ui-surface-3: rgba(255, 255, 255, 0.07);
    --ui-surface: var(--ui-surface-1);
    --ui-surface-soft: var(--ui-surface-2);
    --ui-surface-hover: var(--ui-surface-3);
    --ui-line: rgba(148, 163, 184, 0.12);
    --ui-line-strong: rgba(148, 163, 184, 0.20);
    --ui-text: #f8fafc;
    --ui-muted: #94a3b8;
    --ui-soft-text: rgba(248, 250, 252, 0.68);
    --ui-accent: #f59e0b;
    --ui-accent-strong: #f97316;
    --ui-accent-2: #38bdf8;
    --ui-on-accent: #0f172a;
    --ui-good: #22c55e;
    --ui-danger: #ef4444;
    --ui-warning: #f59e0b;
    --ui-control-bg: rgba(2, 6, 23, 0.56);
    --ui-shadow: none;
    --ui-shadow-modal: none;
    --ui-radius-xs: 0.38rem;
    --ui-radius-sm: 0.62rem;
    --ui-radius-md: 0.82rem;
    --ui-radius-lg: 1rem;
    --ui-gap-xs: 0.25rem;
    --ui-gap-sm: 0.38rem;
    --ui-gap-md: 0.58rem;
    --ui-gap-lg: 0.82rem;
    --ui-font-ui: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ui-font-size: 13px;
    --ui-font-small: 12px;
    --ui-font-tiny: 11px;
    --ui-title-size: 17px;
    --ui-section-title-size: 14px;
}

html[data-theme="light"],
html.light {
    color-scheme: light;
    --ui-bg-canvas: #f4f0e8;
    --ui-surface-1: rgba(255, 252, 246, 0.94);
    --ui-surface-2: rgba(50, 38, 24, 0.045);
    --ui-surface-3: rgba(50, 38, 24, 0.075);
    --ui-line: rgba(50, 38, 24, 0.11);
    --ui-line-strong: rgba(50, 38, 24, 0.18);
    --ui-text: #15130f;
    --ui-muted: #665f53;
    --ui-soft-text: rgba(21, 19, 15, 0.68);
    --ui-accent: #d99514;
    --ui-accent-strong: #b86f08;
    --ui-accent-2: #0ea5e9;
    --ui-on-accent: #15130f;
    --ui-good: #168a44;
    --ui-danger: #c53636;
    --ui-control-bg: rgba(255, 252, 246, 0.90);
    --ui-shadow: none;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ui-text);
    background: var(--ui-bg-canvas);
    font-family: var(--ui-font-ui);
}

:where(a) {
    color: inherit;
}

:where(button, input, select, textarea) {
    font: inherit;
}

:where(button, a, input, select, textarea) {
    transition:
        background-color 150ms ease,
        border-color 150ms ease,
        color 150ms ease,
        opacity 150ms ease;
}

:where(input, select, textarea) {
    outline: none;
}

:where(input, select, textarea):focus-visible {
    border-color: color-mix(in srgb, var(--ui-accent) 45%, var(--ui-line));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-accent) 12%, transparent);
}

:where(.btn, .admin-btn, .ui-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.12rem;
    padding: 0 0.72rem;
    border-radius: var(--ui-radius-sm);
    border: 1px solid var(--ui-line);
    background: var(--ui-surface-2);
    color: var(--ui-text);
    font-size: var(--ui-font-size);
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

:where(.btn:hover, .admin-btn:hover, .ui-button:hover) {
    background: var(--ui-surface-3);
}

:where(.btn:focus-visible, .admin-btn:focus-visible, .ui-button:focus-visible) {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-accent) 12%, transparent);
}

:where(.btn.primary, .admin-btn.primary, .ui-button-primary) {
    border-color: color-mix(in srgb, var(--ui-accent) 24%, var(--ui-line));
    background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-strong));
    color: var(--ui-on-accent);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--ui-accent) 12%, transparent);
}

:where(.btn.primary:hover, .admin-btn.primary:hover, .ui-button-primary:hover) {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--ui-accent) 78%, var(--ui-surface-1) 22%),
        color-mix(in srgb, var(--ui-accent-strong) 82%, var(--ui-surface-1) 18%)
    );
}

:where(.btn.secondary, .admin-btn.secondary, .ui-button-secondary) {
    border-color: var(--ui-line);
    background: color-mix(in srgb, var(--ui-surface-2) 78%, transparent);
    color: var(--ui-text);
}

:where(.btn.ghost, .admin-btn.ghost, .ui-button-ghost) {
    border-color: transparent;
    background: transparent;
}

:where(.panel, .admin-panel, .card, .admin-section, .admin-summary-card, .ui-surface) {
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    box-shadow: none;
    backdrop-filter: none;
}

:where(.admin-shell, .cabinet-shell, .shell) {
    font-size: var(--ui-font-size);
    line-height: 1.38;
}

:where(.admin-section-head) {
    border-bottom-color: var(--ui-line-soft);
}

:where(.admin-panel-compact, .ui-panel-compact) {
    padding: 0.85rem;
}

:where(.chip, .ui-badge) {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--ui-line);
    background: var(--ui-surface-2);
    color: var(--ui-text);
}

:where(.field input, .field select, .field textarea, .ui-input, .ui-select, .ui-textarea, .admin-login-input) {
    width: 100%;
    min-height: 2.16rem;
    border-radius: var(--ui-radius-sm);
    border: 1px solid var(--ui-line);
    background: var(--ui-control-bg);
    color: var(--ui-text);
}

:where(.field textarea, .ui-textarea) {
    min-height: 7rem;
    resize: vertical;
}

:where(.field input, .field select, .field textarea, .ui-input, .ui-select, .ui-textarea, .admin-login-input) {
    padding: 0.46rem 0.62rem;
}

:where(.field input::placeholder, .field textarea::placeholder, .ui-input::placeholder, .ui-textarea::placeholder, .admin-login-input::placeholder) {
    color: color-mix(in srgb, var(--ui-muted) 80%, transparent);
}

:where(.admin-form-head, .ui-form-head) {
    display: flex;
    flex-direction: column;
    gap: 0.58rem;
}

@media (min-width: 1024px) {
    :where(.admin-form-head, .ui-form-head) {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

:where(.admin-form-title, .ui-form-title) {
    min-width: 0;
}

:where(.admin-table-heading, .ui-table-heading) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:where(.admin-form-title h1, .ui-form-title h1) {
    overflow: hidden;
    color: var(--ui-text);
    font-size: var(--ui-title-size);
    font-weight: 720;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:where(.admin-form-title p, .ui-form-title p) {
    max-width: 48rem;
    margin-top: 0.35rem;
    color: var(--ui-muted);
    font-size: var(--ui-font-tiny);
    line-height: 1.45;
}

:where(.admin-field, .ui-field) {
    display: block;
    color: var(--ui-soft-text);
    font-size: var(--ui-font-size);
}

:where(.admin-field-label, .ui-field-label) {
    display: block;
    margin-bottom: 0.38rem;
    color: var(--ui-muted);
    font-size: var(--ui-font-tiny);
    font-weight: 680;
    letter-spacing: 0.12em;
    line-height: 1.15;
    text-transform: uppercase;
}

:where(.admin-control, .ui-control) {
    width: 100%;
    min-height: 2.16rem;
    border: 1px solid color-mix(in srgb, var(--ui-line) 68%, transparent);
    border-radius: var(--ui-radius-sm);
    background: var(--ui-control-bg);
    color: var(--ui-text);
    padding: 0.5rem 0.65rem;
    outline: none;
}

:where(.admin-control:focus-visible, .ui-control:focus-visible) {
    border-color: color-mix(in srgb, var(--ui-accent) 45%, var(--ui-line));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-accent) 12%, transparent);
}

:where(.admin-control-sm, .ui-control-sm) {
    min-height: 2rem;
    padding: 0.38rem 0.55rem;
    font-size: var(--ui-font-tiny);
}

.admin-checkbox {
    width: 0.95rem;
    height: 0.95rem;
    flex: none;
    border-radius: 0.28rem;
    border: 1px solid color-mix(in srgb, var(--ui-line-strong) 72%, transparent);
    background: var(--ui-control-bg);
    color: var(--ui-accent);
}

.admin-checkbox:focus-visible {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-accent) 12%, transparent);
}

.admin-checkline {
    display: flex;
    min-height: 2.16rem;
    align-items: center;
    gap: 0.58rem;
    border-radius: var(--ui-radius-sm);
    background: var(--ui-control-bg);
    color: var(--ui-text);
    padding: 0.5rem 0.65rem;
}

.admin-color-control {
    min-height: 2rem;
    padding: 0.18rem;
}

.admin-color-swatch {
    flex: 0 0 3.2rem;
    width: 3.2rem;
    min-height: 2rem;
    padding: 0.18rem;
}

:where(.admin-form-actions, .ui-form-actions) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.58rem;
    justify-content: space-between;
    margin-top: 0.85rem;
}

:where(.admin-form-actions, .ui-form-actions) :where(.admin-btn.primary, .ui-button-primary, .btn.primary) {
    order: 2;
    margin-left: auto;
}

:where(.admin-form-actions, .ui-form-actions) :where(.admin-btn.secondary, .ui-button-secondary, .btn.secondary) {
    order: 1;
}

:where(.admin-notice, .ui-notice) {
    border: 1px solid color-mix(in srgb, var(--ui-accent) 20%, var(--ui-line));
    border-radius: var(--ui-radius-md);
    background: color-mix(in srgb, var(--ui-accent) 8%, var(--ui-surface-2));
    color: color-mix(in srgb, var(--ui-accent) 62%, var(--ui-text));
    padding: 0.65rem 0.75rem;
    font-size: var(--ui-font-tiny);
    line-height: 1.45;
}

.comment-workflow-summary {
    display: block;
    margin-top: 0.22rem;
    color: var(--ui-soft-text);
    font-size: var(--ui-font-tiny);
    line-height: 1.35;
    font-weight: 400;
    filter: saturate(0.35);
}

.comment-workflow-summary :where(a, b, strong) {
    color: inherit;
    font-weight: 500;
}

.admin-notice-success {
    border-color: color-mix(in srgb, var(--ui-good) 20%, transparent);
    background: color-mix(in srgb, var(--ui-good) 10%, transparent);
    color: color-mix(in srgb, var(--ui-good) 58%, var(--ui-text));
}

.admin-notice-danger {
    border-color: color-mix(in srgb, var(--ui-danger) 22%, transparent);
    background: color-mix(in srgb, var(--ui-danger) 10%, transparent);
    color: color-mix(in srgb, var(--ui-danger) 56%, var(--ui-text));
}

.admin-filter-form {
    margin-top: 0.75rem;
    padding: 0.65rem;
    background: var(--ui-surface-2);
}

.admin-filter-head {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.admin-filter-search {
    flex: 1 1 auto;
}

.admin-filter-actions {
    position: relative;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.admin-filter-popover {
    position: absolute;
    right: 0;
    z-index: 30;
    width: min(48rem, calc(100vw - 2rem));
    margin-top: 0.65rem;
    border: 0;
    border-radius: var(--ui-radius-md);
    background: var(--ui-surface-1);
    padding: 0.75rem;
    box-shadow: var(--ui-shadow-modal);
}

.admin-filter-drawer {
    margin-top: 0.6rem;
    overflow: hidden;
    border: 0;
    border-radius: var(--ui-radius-md);
    background: var(--ui-surface-1);
    transition: max-height 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.admin-filter-drawer-inner {
    padding: 0.75rem;
}

.admin-filter-submit-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.admin-data-scroll {
    max-width: calc(100vw - var(--admin-content-offset, 0px) - 2.5rem);
    overflow: auto;
    border-radius: var(--ui-radius-md);
    background: color-mix(in srgb, var(--ui-bg-canvas) 94%, var(--ui-text) 6%);
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--ui-accent) 72%, transparent) color-mix(in srgb, var(--ui-bg-canvas) 92%, var(--ui-text) 8%);
}

.admin-data-scroll::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.admin-data-scroll::-webkit-scrollbar-track {
    background: color-mix(in srgb, var(--ui-bg-canvas) 92%, var(--ui-text) 8%);
}

.admin-data-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--ui-accent) 72%, transparent);
}

.admin-stat-grid {
    display: grid;
    gap: 0.5rem;
}

.admin-stat-tile {
    border-radius: var(--ui-radius-sm);
    background: var(--ui-surface-2);
    padding: 0.62rem 0.7rem;
}

.admin-stat-label {
    color: var(--ui-muted);
    font-size: var(--ui-font-tiny);
    font-weight: 680;
    letter-spacing: 0.12em;
    line-height: 1.15;
    text-transform: uppercase;
}

.admin-stat-value {
    margin-top: 0.35rem;
    color: var(--ui-text);
    font-size: var(--ui-section-title-size);
    font-weight: 720;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.admin-note-panel {
    border-radius: var(--ui-radius-sm);
    background: color-mix(in srgb, var(--ui-accent-2) 9%, var(--ui-surface-2));
    color: var(--ui-soft-text);
    padding: 0.62rem 0.7rem;
    font-size: var(--ui-font-tiny);
    line-height: 1.45;
}

.admin-subtle-panel {
    border-radius: var(--ui-radius-md);
    background: var(--ui-surface-2);
    color: var(--ui-soft-text);
    padding: 0.75rem;
}

.admin-floating-panel {
    border-radius: var(--ui-radius-md);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-modal);
}

.admin-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    overflow-y: auto;
    background: color-mix(in srgb, var(--ui-bg-canvas) 72%, transparent);
    backdrop-filter: blur(10px);
}

.admin-modal-panel {
    width: min(100%, 42rem);
    max-height: calc(100vh - 1.5rem);
    overflow: auto;
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-modal);
}

.admin-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ui-gap-md);
    padding: 0.72rem 0.85rem;
}

.admin-modal-body {
    padding: 0.85rem;
}

.admin-pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 999px;
    background: var(--ui-surface-2);
    padding: 0.25rem;
}

.admin-page-link,
.admin-page-current,
.admin-page-disabled {
    display: inline-flex;
    min-width: 2rem;
    min-height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 0.58rem;
    font-size: var(--ui-font-tiny);
    line-height: 1;
    text-decoration: none;
}

.admin-page-link {
    color: var(--ui-text);
}

.admin-page-link:hover {
    background: var(--ui-surface-3);
}

.admin-page-current {
    background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-strong));
    color: var(--ui-on-accent, #0f172a);
    font-weight: 780;
}

.admin-page-disabled {
    color: color-mix(in srgb, var(--ui-muted) 52%, transparent);
}

@media (min-width: 1024px) {
    .admin-filter-head {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .admin-filter-actions {
        padding-top: 1.55rem;
    }
}

@media (max-width: 640px) {
    :where(.admin-actions, .admin-filter-actions) {
        flex-wrap: wrap;
        overflow: visible;
        white-space: normal;
    }

    :where(.admin-actions, .admin-filter-actions) :where(.admin-btn, .ui-button) {
        flex: 1 1 auto;
        min-width: max-content;
    }

    :where(.admin-form-actions, .ui-form-actions) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
    }

    :where(.admin-form-actions, .ui-form-actions) :where(.admin-btn, .ui-button, .btn) {
        width: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-filter-drawer {
        transition: none;
    }
}

/* D1 compatibility layer for older Tailwind-heavy templates. */
:where(
    [class~="border-white/10"],
    [class~="border-white/15"],
    [class~="border-slate-700"],
    [class~="border-slate-800"],
    [class~="border-slate-900/10"]
) {
    border-color: var(--ui-line) !important;
}

:where(
    [class~="bg-white/5"],
    [class~="bg-white/10"],
    [class~="bg-slate-950/60"],
    [class~="bg-slate-950/70"],
    [class~="bg-slate-950/80"],
    [class~="bg-slate-950/90"],
    [class~="bg-slate-900/60"],
    [class~="bg-slate-900/80"]
) {
    background-color: var(--ui-surface-2) !important;
}

:where(
    [class~="rounded-3xl"],
    [class~="rounded-[2rem]"]
) {
    border-radius: var(--ui-radius-lg) !important;
}

:where(
    [class~="rounded-2xl"],
    [class~="rounded-xl"]
) {
    border-radius: var(--ui-radius-md) !important;
}

:where(
    [class~="shadow-2xl"],
    [class~="shadow-xl"],
    [class~="shadow-lg"],
    [class~="shadow-md"],
    [class~="shadow-sm"]
) {
    box-shadow: none !important;
}

:where(
    .admin-content,
    .cabinet-shell,
    .shell,
    .app-shell,
    .mini-shell
) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    min-height: 2.12rem;
    border-color: var(--ui-line) !important;
    border-radius: var(--ui-radius-sm) !important;
    background: var(--ui-control-bg) !important;
    color: var(--ui-text) !important;
}

:where(
    .admin-content,
    .cabinet-shell,
    .shell,
    .app-shell,
    .mini-shell
) :where(label > span:first-child) {
    color: var(--ui-muted);
}

:where(
    .admin-content,
    .cabinet-shell,
    .shell,
    .app-shell,
    .mini-shell
) :where(.text-slate-400, .text-slate-500, .text-slate-300) {
    color: var(--ui-muted) !important;
}

:where(.admin-table, .ui-table) {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

:where(.admin-table thead th, .ui-table thead th) {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ui-muted);
}

:where(.admin-table tbody tr, .ui-table tbody tr) {
    transition: background-color 150ms ease;
}

:where(.admin-table tbody tr:hover, .ui-table tbody tr:hover) {
    background: var(--ui-surface-2);
}

:where(.empty-state, .ui-empty) {
    border: 1px dashed color-mix(in srgb, var(--ui-muted) 24%, var(--ui-line));
    border-radius: 1.5rem;
    background: var(--ui-surface-2);
    color: var(--ui-muted);
    text-align: center;
}

:where(.alert, .ui-alert) {
    border-radius: 1.25rem;
    border: 1px solid color-mix(in srgb, var(--ui-accent) 22%, var(--ui-line));
    background: color-mix(in srgb, var(--ui-accent) 8%, var(--ui-surface-2));
    color: color-mix(in srgb, var(--ui-accent) 62%, var(--ui-text));
}

:where(.is-loading) {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

:where(.is-loading)::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ui-text) 8%, transparent), transparent);
    animation: ui-shimmer 1.15s linear infinite;
}

@keyframes ui-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

body.cabinet-body {
    min-height: 100vh;
    color: var(--ui-text);
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--ui-accent) 13%, transparent), transparent 24rem),
        radial-gradient(circle at top right, color-mix(in srgb, var(--ui-accent-2) 10%, transparent), transparent 22rem),
        linear-gradient(135deg, var(--ui-bg-canvas), color-mix(in srgb, var(--ui-bg-canvas) 88%, var(--ui-text) 12%));
    font: var(--ui-font-size)/1.42 var(--ui-font-ui);
}

.cabinet-shell {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
}

.cabinet-shell-mobile,
.cabinet-shell-telegram {
    max-width: 1100px;
    padding: 8px;
}

.cabinet-shell a {
    color: inherit;
    text-decoration: none;
}

.cabinet-shell :where(.topbar, .panel, .card) {
    border: 0;
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface-1);
    box-shadow: none;
}

.cabinet-shell .topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px 10px;
}

.cabinet-shell-mobile .topbar,
.cabinet-shell-telegram .topbar {
    padding: 8px 9px;
}

.cabinet-shell .title {
    font-size: var(--ui-title-size);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cabinet-shell-mobile .title,
.cabinet-shell-telegram .title {
    font-size: 16px;
}

.cabinet-shell .subtitle {
    margin-top: 2px;
    color: var(--ui-muted);
    font-size: var(--ui-font-tiny);
}

.cabinet-shell .chip {
    display: inline-flex;
    align-items: center;
    border: 0;
    border-radius: 999px;
    padding: 3px 8px;
    background: var(--ui-surface-2);
    color: var(--ui-muted);
    font-size: var(--ui-font-tiny);
    transition: background-color 150ms ease, color 150ms ease;
}

.cabinet-shell .chip:hover,
.cabinet-shell .chip.is-active {
    background: color-mix(in srgb, var(--ui-accent) 18%, var(--ui-surface-3));
    color: color-mix(in srgb, var(--ui-accent) 82%, var(--ui-text));
}

.cabinet-shell-mobile .chip,
.cabinet-shell-telegram .chip {
    font-size: 10px;
}

.cabinet-shell .summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.cabinet-shell .card {
    min-width: 0;
    padding: 8px 9px;
}

.cabinet-shell .label {
    color: var(--ui-muted);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cabinet-shell .value {
    margin-top: 3px;
    color: var(--ui-text);
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.cabinet-shell .note {
    margin-top: 4px;
    color: var(--ui-muted);
    font-size: var(--ui-font-tiny);
}

.cabinet-shell .content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.cabinet-shell .company-meta {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 8px;
    margin-bottom: 8px;
}

.cabinet-shell .content > *,
.cabinet-shell .company-meta > *,
.cabinet-shell .summary > * {
    min-width: 0;
}

.cabinet-shell .meta-list {
    display: grid;
    gap: 5px;
}

.cabinet-shell .meta-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border: 0;
    border-radius: var(--ui-radius-sm);
    background: var(--ui-surface-2);
}

.cabinet-shell .meta-row b {
    color: var(--ui-text);
    font-weight: 700;
}

.cabinet-shell .meta-row span {
    color: var(--ui-muted);
    overflow-wrap: anywhere;
    text-align: right;
}

.cabinet-shell .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border-bottom: 1px solid var(--ui-line);
}

.cabinet-shell .panel-body {
    max-width: 100%;
    overflow: auto;
    padding: 8px 10px;
}

.cabinet-shell .section-title {
    font-size: var(--ui-section-title-size);
    font-weight: 800;
    line-height: 1.2;
}

.cabinet-shell table {
    width: 100%;
    border-collapse: collapse;
}

.cabinet-shell th,
.cabinet-shell td {
    padding: 5px 7px;
    border-bottom: 1px solid var(--ui-line);
    text-align: left;
    vertical-align: top;
}

.cabinet-shell th {
    color: var(--ui-muted);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.cabinet-shell td {
    color: color-mix(in srgb, var(--ui-text) 88%, var(--ui-muted));
}

.cabinet-shell tbody tr {
    transition: background-color 150ms ease;
}

.cabinet-shell tbody tr:hover {
    background: var(--ui-surface-2);
}

.cabinet-shell .stack {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.cabinet-shell .list {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.cabinet-shell .asset {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 7px 8px;
    border: 0;
    border-radius: var(--ui-radius-sm);
    background: var(--ui-surface-2);
}

.cabinet-shell .asset strong {
    display: block;
}

.cabinet-shell .asset-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.cabinet-shell .asset-title {
    min-width: 0;
    color: var(--ui-text);
    font-weight: 750;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.cabinet-shell .asset-badge {
    flex: 0 0 auto;
    max-width: 46%;
    border-radius: 999px;
    padding: 2px 7px;
    background: var(--ui-surface-3);
    color: var(--ui-muted);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cabinet-shell .cabinet-kv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px 10px;
}

.cabinet-shell .cabinet-kv {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding-top: 3px;
    border-top: 1px solid color-mix(in srgb, var(--ui-line) 64%, transparent);
}

.cabinet-shell .cabinet-kv span {
    min-width: 0;
    color: var(--ui-muted);
    font-size: var(--ui-font-tiny);
}

.cabinet-shell .cabinet-kv b {
    min-width: 0;
    color: color-mix(in srgb, var(--ui-text) 88%, var(--ui-muted));
    font-size: var(--ui-font-tiny);
    font-weight: 650;
    text-align: right;
    overflow-wrap: anywhere;
}

.cabinet-shell .cabinet-amount {
    font-variant-numeric: tabular-nums;
}

.cabinet-shell .cabinet-amount.is-positive {
    color: color-mix(in srgb, var(--ui-good) 72%, var(--ui-text));
}

.cabinet-shell .cabinet-amount.is-negative {
    color: color-mix(in srgb, var(--ui-danger) 66%, var(--ui-text));
}

.cabinet-shell .cabinet-price-list {
    display: grid;
    gap: 5px;
    margin-top: 2px;
}

.cabinet-shell .cabinet-subhead {
    margin-top: 2px;
    color: var(--ui-muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.cabinet-shell .cabinet-risk {
    margin-top: 10px;
    padding: 9px 10px;
    border: 0;
    border-radius: var(--ui-radius-md);
    background: color-mix(in srgb, var(--ui-danger) 14%, var(--ui-surface-2));
    color: color-mix(in srgb, var(--ui-danger) 42%, var(--ui-text));
}

.cabinet-shell .panel.cabinet-risk {
    margin-bottom: 16px;
}

.cabinet-shell .cabinet-muted-danger {
    color: color-mix(in srgb, var(--ui-danger) 48%, var(--ui-text));
}

.cabinet-shell .cabinet-pagination {
    margin-top: 12px;
}

.cabinet-shell .cabinet-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cabinet-shell .cabinet-inline-form {
    display: inline;
}

.cabinet-shell .cabinet-payment-panel {
    margin-bottom: 8px;
}

.cabinet-shell .cabinet-payment-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.cabinet-shell .cabinet-full {
    grid-column: 1 / -1;
}

.cabinet-shell .cabinet-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.cabinet-shell .cabinet-submit-chip {
    border-color: color-mix(in srgb, var(--ui-accent) 24%, transparent);
    background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-strong));
    color: var(--ui-on-accent);
    cursor: pointer;
    font-weight: 750;
}

.cabinet-shell .cabinet-offset-sm {
    margin-top: 8px;
}

.cabinet-shell .cabinet-tight-stack {
    gap: 4px;
}

.cabinet-shell .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cabinet-shell .btn {
    min-height: 30px;
    padding: 0 10px;
}

.cabinet-shell :where(select, textarea, input:not([type="checkbox"]):not([type="radio"])) {
    width: 100%;
    padding: 6px 8px !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius-sm) !important;
    background: var(--ui-control-bg) !important;
    color: var(--ui-text) !important;
}

.cabinet-shell textarea {
    resize: vertical;
}

@media (max-width: 1100px) {
    .cabinet-shell .content,
    .cabinet-shell .company-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .cabinet-shell {
        padding: 6px;
    }

    .cabinet-shell .actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
    }

    .cabinet-shell .topbar .actions {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .cabinet-shell .topbar .actions::-webkit-scrollbar {
        display: none;
    }

    .cabinet-shell .actions .chip {
        justify-content: center;
        min-width: 0;
        min-height: 28px;
        padding: 3px 6px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cabinet-shell .topbar .actions .chip {
        flex: 0 0 auto;
    }

    .cabinet-shell .panel-body {
        padding: 7px;
    }

    .cabinet-shell .asset-head {
        gap: 6px;
    }

    .cabinet-shell .asset-badge {
        max-width: 42%;
    }

    .cabinet-shell .cabinet-kv-grid {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .cabinet-shell .cabinet-responsive-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 4px;
    }

    .cabinet-shell .cabinet-responsive-table thead {
        display: none;
    }

    .cabinet-shell .cabinet-responsive-table tbody {
        display: grid;
        gap: 4px;
    }

    .cabinet-shell .cabinet-responsive-table tr {
        display: grid;
        gap: 2px;
        padding: 6px;
        border-radius: var(--ui-radius-sm);
        background: var(--ui-surface-2);
    }

    .cabinet-shell .cabinet-responsive-table td {
        display: grid;
        grid-template-columns: minmax(72px, 30%) minmax(0, 1fr);
        gap: 6px;
        min-width: 0;
        padding: 0;
        border-bottom: 0;
        align-items: baseline;
        font-size: var(--ui-font-small);
        line-height: 1.22;
    }

    .cabinet-shell .cabinet-responsive-table td::before {
        content: attr(data-label);
        min-width: 0;
        color: var(--ui-muted);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .cabinet-shell .cabinet-responsive-table td[data-label=""] {
        grid-template-columns: 1fr;
    }

    .cabinet-shell .cabinet-responsive-table td[data-label=""]::before {
        display: none;
    }

    .cabinet-shell table:not(.cabinet-responsive-table) {
        min-width: 620px;
    }
}

/* D1 landing pages, scoped so the public home page and app shells are untouched. */
body.landing-d1 {
    --landing-bg: var(--ui-bg-canvas);
    --landing-surface: var(--ui-surface-1);
    --landing-surface-2: var(--ui-surface-2);
    --landing-surface-3: var(--ui-surface-3);
    --landing-text: var(--ui-text);
    --landing-muted: var(--ui-muted);
    --landing-soft: var(--ui-soft-text);
    --landing-line: var(--ui-line);
    --landing-accent: var(--ui-accent);
    --landing-accent-strong: var(--ui-accent-strong);
    --landing-good: var(--ui-good);
    --landing-danger: var(--ui-danger);
    overflow-x: hidden;
    color: var(--landing-text);
    background:
        radial-gradient(circle at 0 0, color-mix(in srgb, var(--landing-accent) 13%, transparent), transparent 27rem),
        radial-gradient(circle at 100% 8%, color-mix(in srgb, var(--landing-accent-2) 8%, transparent), transparent 24rem),
        linear-gradient(135deg, var(--landing-bg), color-mix(in srgb, var(--landing-bg) 86%, var(--landing-text) 14%));
    font-size: var(--ui-font-size);
    line-height: 1.45;
}

body.landing-d1 * {
    box-sizing: border-box;
}

body.landing-d1 :where(a) {
    color: inherit;
    text-decoration: none;
}

body.landing-d1 :where(button) {
    font: inherit;
}

body.landing-d1 :where(.wrap) {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

body.landing-d1 :where(.topbar, .bar) {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--landing-line);
    background: color-mix(in srgb, var(--landing-bg) 92%, transparent);
    backdrop-filter: blur(16px);
}

body.landing-d1 :where(.nav) {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 14px;
}

body.landing-d1 :where(.logo, .brand) {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex: none;
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

body.landing-d1 :where(.logo img, .brand img) {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

body.landing-d1 :where(.brand-sub) {
    max-width: 240px;
    padding-left: 12px;
    border-left: 1px solid var(--landing-line);
    color: var(--landing-muted);
    font-size: var(--ui-font-small);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.landing-d1 :where(.links, .nav-links) {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    color: var(--landing-muted);
    font-size: var(--ui-font-small);
}

body.landing-d1 :where(.links a, .nav-links a) {
    padding: 6px 0;
}

body.landing-d1 :where(.links a:hover, .nav-links a:hover) {
    color: var(--landing-text);
}

body.landing-d1 :where(.nav-cta, .btn, .button) {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid var(--landing-line);
    border-radius: var(--ui-radius-sm);
    background: var(--landing-surface-2);
    color: var(--landing-text);
    font-size: var(--ui-font-size);
    font-weight: 760;
    line-height: 1.1;
    box-shadow: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

body.landing-d1 :where(.nav-cta, .btn.primary, .btn-primary, .button.primary) {
    border-color: color-mix(in srgb, var(--landing-accent) 34%, var(--landing-line));
    background: linear-gradient(135deg, var(--landing-accent), var(--landing-accent-strong));
    color: var(--ui-on-accent);
}

body.landing-d1 :where(.btn.ghost, .btn-secondary, .button.ghost) {
    background: var(--landing-surface-2);
    color: var(--landing-text);
}

body.landing-d1 :where(.nav-cta:hover, .btn:hover, .button:hover) {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--landing-accent) 24%, var(--landing-line));
}

body.landing-d1 :where(.menu, .theme-toggle) {
    min-height: 36px;
    border: 1px solid var(--landing-line);
    border-radius: var(--ui-radius-sm);
    background: var(--landing-surface-2);
    color: var(--landing-text);
    cursor: pointer;
}

body.landing-d1 :where(.menu) {
    display: none;
    padding: 0 10px;
    font-size: var(--ui-font-small);
    font-weight: 760;
}

body.landing-d1 :where(.theme-toggle) {
    min-width: 68px;
    padding: 0 10px;
    font-weight: 760;
}

body.landing-d1 :where(.hero) {
    padding: 24px 0 18px;
}

body.landing-d1 :where(.hero-grid) {
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(300px, 0.97fr);
    gap: 18px;
    align-items: center;
}

body.landing-d1 :where(h1) {
    margin: 10px 0;
    max-width: 760px;
    font-size: clamp(25px, 3.2vw, 36px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

body.landing-d1 :where(h2) {
    margin: 6px 0 9px;
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.14;
    letter-spacing: -0.03em;
}

body.landing-d1 :where(h3) {
    margin: 0 0 8px;
    font-size: 1.02rem;
    line-height: 1.2;
}

body.landing-d1 :where(p) {
    margin: 0;
}

body.landing-d1 :where(.lead) {
    max-width: 650px;
    color: var(--landing-muted);
    font-size: 15px;
    line-height: 1.55;
}

body.landing-d1 :where(.grad, .gradient) {
    background: linear-gradient(95deg, var(--landing-accent), var(--landing-accent-strong));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.landing-d1 :where(.eyebrow, .chip, .overline, .pill, .kicker, .label, .plan-label, .ribbon) {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    padding: 5px 9px;
    border: 1px solid color-mix(in srgb, var(--landing-accent) 28%, var(--landing-line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--landing-accent) 8%, transparent);
    color: var(--landing-accent);
    font-size: var(--ui-font-tiny);
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.landing-d1 :where(.label, .plan-label, .ribbon) {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 7px;
}

body.landing-d1 :where(.dot, .pulse) {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 999px;
    background: var(--landing-good);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--landing-good) 15%, transparent);
}

body.landing-d1 :where(.actions, .hero-actions) {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 14px 0 10px;
}

body.landing-d1 :where(.note, .micro, .hero-proof) {
    color: var(--landing-muted);
    font-size: var(--ui-font-small);
}

body.landing-d1 :where(.hero-proof) {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

body.landing-d1 :where(.hero-proof span)::before,
body.landing-d1 :where(.check)::before,
body.landing-d1 :where(.list li)::before {
    content: "✓";
    color: var(--landing-good);
    font-weight: 900;
}

body.landing-d1 :where(.hero-proof span)::before {
    margin-right: 6px;
}

body.landing-d1 :where(.hero-card, .task-card, .card, .ticket, .channel, .mini, .strip-grid, .trust-grid, .step, .price-line, .cost-box, .example, .quality-level, .partner, .compare-card, .faq details, .final-box, .usecase, .price-main, .prv-explain, .notice, .sample-row, .mini-total) {
    border: 1px solid var(--landing-line);
    border-radius: var(--ui-radius-lg);
    background: var(--landing-surface);
    box-shadow: none;
}

body.landing-d1 :where(.hero-card, .task-card) {
    position: relative;
    overflow: hidden;
    padding: 16px;
}

body.landing-d1 :where(.hero-card, .task-card, .final-box)::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--landing-accent) 9%, transparent);
    filter: blur(26px);
    pointer-events: none;
}

body.landing-d1 :where(.hero-card, .task-card, .final-box) > * {
    position: relative;
}

body.landing-d1 :where(.card) {
    position: relative;
    padding: 15px;
}

body.landing-d1 :where(.card-head, .task-top, .service-top) {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

body.landing-d1 :where(.card-head-title) {
    display: block;
    margin-top: 2px;
    font-size: var(--ui-section-title-size);
    line-height: 1.2;
}

body.landing-d1 :where(.card-head small, .task-top small, .channel span, .mini span, .strip-item span, .trust-item span, .step span, .card p, .head p, .section-head p, .price-line span, .sub, .plan-sub, .faq p, .quote p, .cost-row, .quality-level span, .usecase span, .timeline-row span, .flow-row span, .price-mini span) {
    color: var(--landing-muted);
}

body.landing-d1 :where(.status, .done, .yes, .risk.low) {
    color: var(--landing-good);
}

body.landing-d1 :where(.no, .risk.high) {
    color: var(--landing-danger);
}

body.landing-d1 :where(.ticket, .flow, .timeline, .mini-list, .sample, .examples, .checklist, .quality-side, .faq, .list) {
    display: grid;
    gap: 8px;
}

body.landing-d1 :where(.ticket, .price-main, .quality-main, .concierge-main) {
    padding: 15px;
}

body.landing-d1 :where(.flow-row, .timeline-row) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    padding: 8px;
    border-radius: var(--ui-radius-md);
    background: var(--landing-surface-2);
}

body.landing-d1 :where(.flow-row, .timeline-row) > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

body.landing-d1 :where(.flow-icon, .num, .card-icon, .icon),
body.landing-d1 .step > :first-child {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: none;
    border-radius: var(--ui-radius-sm);
    background: color-mix(in srgb, var(--landing-accent) 14%, var(--landing-surface-2));
    color: var(--landing-accent);
    font-size: var(--ui-font-small);
    font-style: normal;
    font-weight: 850;
}

body.landing-d1 .step > :not(:first-child) {
    display: block;
}

body.landing-d1 :where(.price-panel, .channels, .grid-2, .grid-3, .grid-4, .plans, .steps, .process, .sla, .cost, .not-for, .quality, .rules, .price-layout, .concierge, .prv-intro, .usecases, .compare:not(table)) {
    display: grid;
    gap: 12px;
}

body.landing-d1 :where(.price-panel, .grid-2, .cost, .not-for, .quality, .rules, .price-layout, .concierge, .prv-intro, .usecases, .compare:not(table)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.landing-d1 :where(.channels, .grid-3, .plans, .sla) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.landing-d1 :where(.grid-4) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.landing-d1 :where(.steps, .process) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.landing-d1 :where(.grid-4.plans) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.landing-d1 :where(.price-mini, .mini, .channel, .strip-item, .trust-item, .step, .price-line, .quality-level, .usecase, .sample-row, .mini-total, .prv-explain, .notice, .partner) {
    padding: 12px;
}

body.landing-d1 :where(.strip, .trust) {
    padding: 0 0 24px;
}

body.landing-d1 :where(.strip-grid, .trust-grid) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    gap: 0;
}

body.landing-d1 :where(.strip-item, .trust-item) {
    border: 0;
    border-right: 1px solid var(--landing-line);
    border-radius: 0;
    background: transparent;
}

body.landing-d1 :where(.strip-item:last-child, .trust-item:last-child) {
    border-right: 0;
}

body.landing-d1 :where(.section) {
    padding: 30px 0;
}

body.landing-d1 :where(.section.alt) {
    background: color-mix(in srgb, var(--landing-surface-2) 38%, transparent);
}

body.landing-d1 :where(.head, .section-head) {
    max-width: 780px;
    margin-bottom: 13px;
}

body.landing-d1 :where(.plan) {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

body.landing-d1 :where(.plan.featured, .checks .card.recommended) {
    border-color: color-mix(in srgb, var(--landing-accent) 42%, var(--landing-line));
    background: color-mix(in srgb, var(--landing-accent) 7%, var(--landing-surface));
}

body.landing-d1 :where(.plan-price) {
    margin: 11px 0 2px;
    color: var(--landing-text);
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 900;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

body.landing-d1 :where(.plan-price small) {
    color: var(--landing-muted);
    font-size: var(--ui-font-small);
    font-weight: 650;
}

body.landing-d1 :where(.plan-prv, .price, .price-tag, .price-line strong, .example b, .estimate b, .sla .card strong, .check-price) {
    color: var(--landing-accent);
    font-weight: 850;
}

body.landing-d1 :where(.list) {
    margin: 14px 0 18px;
    padding: 0;
    list-style: none;
}

body.landing-d1 :where(.list li, .check) {
    position: relative;
    padding-left: 20px;
    color: var(--landing-soft);
}

body.landing-d1 :where(.list li)::before,
body.landing-d1 :where(.check)::before {
    position: absolute;
    left: 0;
}

body.landing-d1 :where(.cross li)::before {
    content: "×";
    color: var(--landing-danger);
}

body.landing-d1 :where(.plan .btn, .plan .button) {
    margin-top: auto;
}

body.landing-d1 :where(.quote) {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.landing-d1 :where(.quote blockquote) {
    margin: 0;
    font-size: clamp(20px, 2.6vw, 27px);
    line-height: 1.28;
    letter-spacing: -0.02em;
}

body.landing-d1 :where(.compare-wrap) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.landing-d1 :where(table.compare) {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: var(--ui-radius-lg);
    background: var(--landing-surface);
}

body.landing-d1 :where(.compare th, .compare td) {
    padding: 11px 12px;
    border-bottom: 1px solid var(--landing-line);
    text-align: left;
    vertical-align: top;
}

body.landing-d1 :where(.compare th) {
    color: var(--landing-muted);
    font-size: var(--ui-font-tiny);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.landing-d1 :where(.compare tr:last-child td) {
    border-bottom: 0;
}

body.landing-d1 :where(.compare-row) {
    padding: 9px 0;
    border-top: 1px solid var(--landing-line);
    color: var(--landing-muted);
}

body.landing-d1 :where(.compare-row b) {
    color: var(--landing-text);
}

body.landing-d1 :where(.faq details) {
    padding: 0 14px;
}

body.landing-d1 :where(.faq summary) {
    position: relative;
    padding: 13px 28px 13px 0;
    cursor: pointer;
    list-style: none;
    font-weight: 760;
}

body.landing-d1 .faq summary::-webkit-details-marker {
    display: none;
}

body.landing-d1 :where(.faq summary)::after {
    content: "+";
    position: absolute;
    right: 0;
    color: var(--landing-accent);
    font-size: 20px;
    line-height: 1;
}

body.landing-d1 :where(.faq details[open] summary)::after {
    content: "-";
}

body.landing-d1 :where(.faq p) {
    margin: 0 0 13px;
    line-height: 1.55;
}

body.landing-d1 :where(.final) {
    padding: 6px 0 30px;
}

body.landing-d1 :where(.final-box) {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
}

body.landing-d1 :where(.footer) {
    border-top: 1px solid var(--landing-line);
    padding: 14px 0;
    color: var(--landing-muted);
    font-size: var(--ui-font-small);
}

body.landing-d1 :where(.footer-row) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

@media (max-width: 1050px) {
    body.landing-d1 :where(.links, .nav-links) {
        display: none;
    }

    body.landing-d1 :where(.menu) {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    body.landing-d1 :where(.nav > .nav-cta, .nav > .button.primary, .nav > .btn.primary) {
        display: none;
    }

    body.landing-d1 :where(.links.open, .nav-links.open) {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 62px;
        display: grid;
        gap: 8px;
        padding: 12px;
        border: 1px solid var(--landing-line);
        border-radius: var(--ui-radius-lg);
        background: var(--landing-surface);
    }

    body.landing-d1 :where(.hero-grid, .grid-2, .cost, .not-for, .quality, .rules, .price-layout, .concierge, .prv-intro, .usecases, .compare:not(table)) {
        grid-template-columns: 1fr;
    }

    body.landing-d1 :where(.grid-4, .grid-4.plans, .channels, .grid-3, .plans, .steps, .process, .sla) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    body.landing-d1 :where(.wrap) {
        width: min(100% - 24px, 1160px);
    }

    body.landing-d1 :where(.nav) {
        min-height: 56px;
    }

    body.landing-d1 :where(.logo img, .brand img) {
        width: 34px;
        height: 34px;
    }

    body.landing-d1 :where(.brand-sub) {
        display: none;
    }

    body.landing-d1 :where(.hero) {
        padding: 18px 0 14px;
    }

    body.landing-d1 :where(h1) {
        font-size: 25px;
    }

    body.landing-d1 :where(.lead) {
        font-size: 14px;
    }

    body.landing-d1 :where(.actions, .hero-actions) {
        display: grid;
    }

    body.landing-d1 :where(.btn, .button, .nav-cta) {
        width: 100%;
        min-height: 42px;
    }

    body.landing-d1 :where(.theme-toggle, .menu) {
        width: auto;
        min-height: 36px;
    }

    body.landing-d1 :where(.grid-4, .grid-4.plans, .channels, .price-panel, .grid-3, .plans, .steps, .process, .sla, .strip-grid, .trust-grid) {
        grid-template-columns: 1fr;
    }

    body.landing-d1 :where(.strip-item, .trust-item) {
        border-right: 0;
        border-bottom: 1px solid var(--landing-line);
    }

    body.landing-d1 :where(.strip-item:last-child, .trust-item:last-child) {
        border-bottom: 0;
    }

    body.landing-d1 :where(.section) {
        padding: 24px 0;
    }

    body.landing-d1 :where(.final-box, .footer-row) {
        display: grid;
    }
}
