:root {
    color-scheme: dark;
}

.theme-dark {
    --surface: #0a0a0b;
    --panel: #111113;
    --soft-panel: #1a1a1d;
    --base-text: #e7e7ea;
    --muted-text: #9b9ba3;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --accent: #6f7bf7;
    --accent-soft: rgba(111, 123, 247, 0.14);
    --danger: #f0475a;
}

.theme-light {
    color-scheme: light;
    --surface: #f6f7fb;
    --panel: #ffffff;
    --soft-panel: #f0f2f7;
    --base-text: #17181c;
    --muted-text: #626673;
    --border-subtle: rgba(10, 10, 11, 0.1);
    --accent: #4b5cf0;
    --accent-soft: rgba(75, 92, 240, 0.1);
    --danger: #d12f41;
}

* {
    border-color: var(--border-subtle);
}

body {
    background: var(--surface);
    color: var(--base-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.text-danger {
    color: var(--danger);
}

/* Поля ввода и select: единый вид и фокус (см. login, profile, admin) */
.input-control {
    box-sizing: border-box;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--soft-panel);
    color: var(--base-text);
    font-size: 0.875rem;
    line-height: 1.45;
    padding: 0.625rem 0.75rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-control::placeholder {
    color: color-mix(in srgb, var(--muted-text) 72%, transparent);
}

.input-control:hover {
    border-color: color-mix(in srgb, var(--muted-text) 22%, var(--border-subtle));
}

.input-control:focus,
.input-control:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border-subtle));
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Основные кнопки с заливкой accent-soft */
.btn-accent:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: max(12px, env(safe-area-inset-left));
    top: max(12px, env(safe-area-inset-top));
    z-index: 100;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--panel);
    border: 1px solid var(--border-subtle);
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transform: translateY(-140%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skip-link:focus {
    outline: none;
}

.skip-link:focus-visible {
    transform: translateY(0);
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent);
}

.main-shell {
    padding-top: 2rem;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
}

.nav-mobile-inner {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 10px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
    min-height: 48px;
    align-items: center;
}

.nav-mobile-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    min-height: 40px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted-text);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-mobile-link:hover,
.nav-mobile-link.is-active {
    color: var(--base-text);
    background: var(--accent-soft);
}

.nav-mobile-link:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: 2px;
}

.theme-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-icon-sun {
    display: none;
}

.theme-light [data-theme-toggle] [data-theme-icon-moon] {
    display: none;
}

.theme-light [data-theme-toggle] [data-theme-icon-sun] {
    display: inline-flex;
}

.bg-surface { background: var(--surface); }
.bg-panel { background: var(--panel); }

.surface-header {
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.bg-soft-panel { background: var(--soft-panel); }
.text-base-text { color: var(--base-text); }
.text-muted { color: var(--muted-text); }
.border-subtle { border-color: var(--border-subtle); }
.text-accent { color: var(--accent); }

.panel {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--panel);
}

.panel-soft {
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--soft-panel);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--muted-text);
    transition: all 0.15s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--base-text);
    background: var(--accent-soft);
}

.nav-link:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: 2px;
}

.icon-button {
    display: inline-flex;
    height: 40px;
    width: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--muted-text);
    background: var(--panel);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.icon-button:hover {
    color: var(--base-text);
    border-color: color-mix(in srgb, var(--accent) 38%, var(--border-subtle));
}

.icon-button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: 2px;
}

/* Шапка: логотип и слоган */
.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    padding: 4px 6px 4px 4px;
    margin: -4px -6px -4px -4px;
    text-decoration: none;
    outline: none;
    transition: background 0.18s ease;
}

.brand-link:hover {
    background: var(--accent-soft);
}

.brand-link:focus-visible {
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent);
}

.brand-mark {
    position: relative;
    display: flex;
    height: 40px;
    width: 40px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--accent) 92%, #fff) 0%,
        var(--accent) 48%,
        color-mix(in srgb, var(--accent) 45%, #0a0a12) 100%
    );
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent),
        0 1px 2px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-light .brand-mark {
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--accent) 85%, #fff) 0%,
        var(--accent) 50%,
        color-mix(in srgb, var(--accent) 70%, #30345c) 100%
    );
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 4px 12px color-mix(in srgb, var(--accent) 28%, transparent);
}

.brand-link:hover .brand-mark {
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 6px 18px color-mix(in srgb, var(--accent) 42%, transparent),
        0 2px 4px rgba(0, 0, 0, 0.25);
}

.brand-mark-inner {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.06em;
    color: #f4f5ff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.brand-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.2;
    color: var(--base-text);
    transition: color 0.15s ease;
}

.brand-link:hover .brand-name {
    color: var(--base-text);
}

.brand-tagline {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-text);
    line-height: 1.3;
    opacity: 0.92;
}

/* Пагинация таблицы проектов */
.pagination-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-subtle);
    background: color-mix(in srgb, var(--soft-panel) 40%, transparent);
}

.pagination-bar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
}

.pagination-meta {
    margin: 0;
    font-size: 13px;
}

.pagination-goto {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pagination-goto-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.pagination-goto-text {
    color: var(--muted-text);
}

.pagination-goto-input {
    width: 4.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--panel);
    color: var(--base-text);
    padding: 6px 8px;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    text-align: center;
}

.pagination-goto-input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border-subtle));
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.pagination-goto-input:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: 2px;
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border-subtle));
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.pagination-goto-of {
    font-size: 12px;
    white-space: nowrap;
}

.pagination-goto-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--soft-panel);
    color: var(--base-text);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.pagination-goto-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: 2px;
}

.pagination-goto-btn:hover {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border-subtle));
}

.pagination-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pagination-nav-pages {
    justify-content: center;
}

.pagination-pages {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pagination-page {
    display: inline-flex;
    min-width: 2.75rem;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--accent);
    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.pagination-page:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: 2px;
}

.pagination-page:hover {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 25%, transparent);
    text-decoration: none;
}

.pagination-page.is-current {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    color: var(--base-text);
    font-weight: 600;
    cursor: default;
}

.pagination-ellipsis {
    display: inline-flex;
    min-width: 1.5rem;
    align-items: center;
    justify-content: center;
    color: var(--muted-text);
    font-size: 13px;
    user-select: none;
}

.pagination-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.pagination-link-edge {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    padding: 6px 10px;
}

.pagination-link:hover:not(.is-disabled) {
    opacity: 0.85;
    text-decoration: underline;
}

.pagination-link.is-disabled {
    color: var(--muted-text);
    cursor: not-allowed;
    opacity: 0.65;
}

/* Сортировка заголовков таблицы проектов */
.th-sort {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.th-sort:hover {
    color: var(--accent);
}

.th-sort:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: 3px;
    border-radius: 4px;
}

.th-sort-indicator {
    font-size: 12px;
    line-height: 1;
    color: var(--accent);
    font-weight: 700;
}

.th-sort-placeholder {
    font-size: 10px;
    line-height: 1;
    opacity: 0.28;
    font-weight: 400;
}

.th-sort:hover .th-sort-placeholder {
    opacity: 0.55;
}

/* Список проектов: таблица */
.projects-table-wrap {
    width: 100%;
}

.projects-table {
    min-width: 920px;
}

.projects-table-row:hover {
    background: rgba(111, 123, 247, 0.06);
}

/* Страница одного проекта */
.pd-page {
    max-width: 720px;
}

.pd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}

.pd-sheet {
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    background: var(--panel);
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.pd-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 28px 22px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--soft-panel) 70%, transparent) 0%,
        var(--panel) 48%
    );
}

.pd-title {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.pd-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--muted-text);
    font-weight: 450;
}

.pd-hero-actions {
    flex-shrink: 0;
}

.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    border: 1px solid transparent;
}

.pd-btn-primary {
    background: var(--accent);
    color: #f4f5ff;
    border-color: color-mix(in srgb, var(--accent) 80%, #000);
    box-shadow: 0 2px 12px color-mix(in srgb, var(--accent) 35%, transparent);
}

.pd-btn-primary:hover {
    filter: brightness(1.06);
}

.pd-btn-ghost {
    border-color: var(--border-subtle);
    background: var(--soft-panel);
    color: var(--base-text);
}

.pd-btn-ghost:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border-subtle));
    color: var(--accent);
}

.pd-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 75%, #fff);
    outline-offset: 3px;
}

.pd-trust-strip {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: stretch;
    gap: 0;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 640px) {
    .pd-hero {
        padding: 22px 18px 18px;
    }

    .pd-trust-strip {
        grid-template-columns: 1fr;
        padding: 18px 16px;
    }

    .pd-trust-divider {
        display: none;
    }

    .pd-section {
        padding: 22px 18px 8px;
    }
}

.pd-trust-block {
    padding: 8px 12px;
    text-align: center;
}

.pd-trust-divider {
    width: 1px;
    background: var(--border-subtle);
    align-self: stretch;
    min-height: 56px;
}

.pd-kicker {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-text);
    margin-bottom: 8px;
}

.pd-rating-big {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.pd-rating-num {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
}

.pd-rating-max {
    font-size: 14px;
    color: var(--muted-text);
    font-weight: 500;
}

.pd-stars {
    margin-top: 6px;
    font-size: 13px;
    letter-spacing: 0.12em;
    color: color-mix(in srgb, #e8b84a 85%, var(--muted-text));
}

.pd-stat-num {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.pd-muted {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted-text);
}

.pd-trust-hint {
    font-size: 12px;
    margin-top: 4px;
}

.pd-alert {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 0 24px 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(240, 71, 90, 0.35);
    background: rgba(240, 71, 90, 0.08);
    color: var(--base-text);
}

.pd-alert-title {
    margin: 0 0 4px;
    font-weight: 600;
    font-size: 14px;
}

.pd-alert-text {
    margin: 0;
    font-size: 13px;
    color: var(--muted-text);
    line-height: 1.45;
}

.pd-section {
    padding: 26px 28px 8px;
}

.pd-section-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-text);
}

.pd-section-lead {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted-text);
    max-width: 52ch;
}

.pd-price-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 560px) {
    .pd-price-row {
        grid-template-columns: 1fr;
    }
}

.pd-price-cell {
    position: relative;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    background: var(--soft-panel);
    padding: 18px 16px 16px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pd-price-cell--best {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border-subtle));
    background: color-mix(in srgb, var(--accent-soft) 55%, var(--soft-panel));
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.pd-price-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-text);
    margin-bottom: 8px;
}

.pd-price-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.pd-price-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
}

.pd-spread-hint {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.45;
}

.pd-metrics {
    padding-top: 8px;
}

.pd-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px 24px;
    margin: 0;
}

.pd-metric {
    margin: 0;
}

.pd-metric dt {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-text);
}

.pd-metric dd {
    margin: 0;
    font-size: 15px;
}

.pd-spark {
    width: 120px;
    height: 24px;
}

.pd-complaint-section {
    padding-bottom: 28px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 8px;
    background: color-mix(in srgb, var(--soft-panel) 40%, transparent);
}

.pd-complaint-form {
    max-width: 100%;
}

.pd-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-text);
    margin-bottom: 8px;
}

.pd-textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: var(--panel);
    color: var(--base-text);
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.45;
    resize: vertical;
    min-height: 112px;
    font-family: inherit;
}

.pd-textarea::placeholder {
    color: color-mix(in srgb, var(--muted-text) 85%, transparent);
}

.pd-textarea:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border-subtle));
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.pd-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.hero-grid {
    background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px), linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 24px 24px;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    position: relative;
}

.chip-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--soft-panel);
    color: var(--base-text);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.chip-button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: 2px;
}

.chip-button span {
    color: var(--muted-text);
}

.chip-menu {
    position: absolute;
    top: 44px;
    left: 0;
    min-width: 210px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--panel);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.32);
    padding: 8px;
    display: none;
    z-index: 40;
}

.chip-menu.is-open { display: block; }

.chip-option {
    width: 100%;
    border-radius: 8px;
    color: var(--muted-text);
    text-align: left;
    font-size: 12px;
    padding: 7px 8px;
}

a.chip-option {
    display: block;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.chip-option:hover {
    color: var(--base-text);
    background: var(--soft-panel);
}

.chip-option:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: -1px;
}

.dense-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.dense-table thead th {
    text-align: left;
    padding: 8px 10px;
    color: var(--muted-text);
    font-weight: 500;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.dense-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-subtle);
    height: 34px;
    white-space: nowrap;
}

.dense-table tbody tr:hover { background: rgba(111, 123, 247, 0.08); }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tag-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    border: 1px solid color-mix(in srgb, var(--danger) 42%, transparent);
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.sparkline {
    width: 96px;
    height: 20px;
}

.command-palette {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.command-palette-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.command-palette-panel {
    position: absolute;
    left: 50%;
    top: 12%;
    transform: translateX(-50%);
    width: min(640px, calc(100vw - 32px));
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--panel);
    overflow: hidden;
}

.command-palette-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px;
}

.command-palette-header input {
    flex: 1;
    min-width: 0;
    outline: none;
    background: transparent;
    color: var(--base-text);
    font-size: 0.9375rem;
}

.command-palette-header input:focus-visible {
    border-radius: 6px;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent);
}

.command-palette-header span {
    color: var(--muted-text);
    font-size: 12px;
}

.command-palette-list {
    max-height: 340px;
    overflow: auto;
    padding: 8px;
}

.command-item {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    color: var(--base-text);
    padding: 10px;
    font-size: 13px;
}

.command-item:hover {
    background: var(--soft-panel);
}

.command-item kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    color: var(--muted-text);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 2px 6px;
}

.command-item:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .skip-link {
        transition: none;
    }
}
