:root {
    --bg: #f3f6f9;
    --panel: #ffffff;
    --panel-soft: #f8f9fb;
    --text: #212529;
    --muted: #6c757d;
    --line: #dfe3e8;
    --brand: #3e60d5;
    --brand-dark: #2f4fb3;
    --brand-soft: #eef2ff;
    --accent: #f0ad4e;
    --accent-soft: #fff3dd;
    --success: #dff7ea;
    --warning: #fff4d6;
    --danger: #fde7e7;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.04);
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI Variable", "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

.guest-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background:
        radial-gradient(circle at top left, rgba(15, 108, 189, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.14), transparent 26%),
        var(--bg);
}

.guest-shell {
    width: min(100%, 520px);
}

.login-card {
    background: var(--panel);
    border: 1px solid rgba(221, 227, 239, 0.8);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 34px;
}

.login-eyebrow {
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
}

.login-card h1,
.topbar h1,
.info-panel h3,
.feature-card h3,
.empty-state h3,
.tool-card h3,
.metric-card h3 {
    margin: 10px 0 0;
}

.hero-card h2,
.section-card h2 {
    margin: 0;
}

.login-description,
.feature-card p,
.hero-card p,
.section-card p,
.empty-state p,
.placeholder-panel p,
.info-panel li,
.metric-card p,
.tool-card p {
    color: var(--muted);
    line-height: 1.6;
}

.notice,
.flash {
    border-radius: 16px;
    padding: 14px 16px;
    margin-top: 18px;
    font-size: 14px;
}

.notice-error,
.flash-error {
    background: var(--danger);
}

.notice-warning,
.flash-warning {
    background: var(--warning);
}

.notice-success,
.flash-success {
    background: var(--success);
    border: 1px solid rgba(28, 122, 72, 0.18);
    color: #14532d;
    box-shadow: 0 1px 2px rgba(20, 83, 45, 0.06);
}

.login-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 14px;
    font-weight: 600;
}

.field input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
    border-color: rgba(15, 108, 189, 0.5);
    box-shadow: 0 0 0 4px rgba(15, 108, 189, 0.1);
}

.primary-button,
.secondary-button,
.logout-link,
.meta-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-button {
    min-height: 52px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(62, 96, 213, 0.22);
}

.secondary-button {
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 18px;
    background: #fff;
    color: var(--text);
    font-weight: 700;
    font-size: 15px;
}

.app-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: #313a46;
    border-right: 0;
    padding: 28px 22px;
}

.brand {
    display: grid;
    gap: 8px;
    margin-bottom: 28px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-home-link {
    display: inline-flex;
    align-items: center;
}

.brand-mark {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
}

.brand-badge,
.status-pill,
.status-badge,
.ghost-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-badge {
    min-height: 28px;
    padding: 0 10px;
    background: var(--accent-soft);
    color: #8a5700;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    line-height: 1.5;
}

.sidebar-nav {
    display: grid;
    gap: 20px;
}

.nav-group {
    display: grid;
    gap: 12px;
}

.nav-group-title {
    margin: 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-list {
    display: grid;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    border-radius: 10px;
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(62, 96, 213, 0.2);
    color: #fff;
}

.nav-link-copy {
    display: grid;
    gap: 4px;
}

.nav-link-title {
    font-size: 14px;
}

.nav-link-hint {
    color: rgba(255, 255, 255, 0.52);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}

.nav-link-badge {
    min-height: 20px;
    padding: 0 7px;
    white-space: nowrap;
    font-size: 10px;
}

.nav-link-badge-default,
.status-badge-default,
.status-badge-planned,
.ghost-pill {
    background: #edf2f9;
    color: #47556e;
}

.nav-link-badge-priority,
.status-badge-priority {
    background: var(--accent-soft);
    color: #8a5700;
}

.nav-link-badge-queued,
.status-badge-queued {
    background: #efe8ff;
    color: #5c46a5;
}

.status-badge-warning {
    background: rgba(241, 140, 38, 0.14);
    color: #9a5a13;
}

.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.topbar-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.page-summary {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-pill {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.user-pill-label {
    color: var(--muted);
    font-size: 12px;
}

.logout-link {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    font-weight: 700;
}

.page-content {
    padding: 24px 24px 32px;
}

.stack {
    display: grid;
    gap: 22px;
}

.hero-card,
.section-card,
.feature-card,
.info-panel,
.placeholder-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card {
    display: grid;
    gap: 20px;
    padding: 28px;
}

.hero-card-split {
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
    align-items: stretch;
}

.hero-side {
    display: grid;
    align-content: space-between;
    gap: 18px;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(230, 242, 255, 0.88) 0%, rgba(255, 244, 218, 0.72) 100%);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-chip {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.action-row-centered {
    justify-content: center;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid,
.tool-grid,
.two-column-grid {
    display: grid;
    gap: 18px;
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-grid-compact {
    margin-bottom: 18px;
}

.metric-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 253, 0.96) 100%);
    border: 1px solid rgba(221, 227, 239, 0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}

.metric-label {
    display: inline-flex;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    display: block;
    margin-top: 16px;
    font-size: 36px;
    line-height: 1;
}

.metric-value-small {
    font-size: 24px;
}

.metric-card p {
    margin: 12px 0 0;
}

.tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-card {
    display: grid;
    gap: 16px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid rgba(221, 227, 239, 0.92);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tool-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.kb-card-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.status-badge {
    min-height: 30px;
    padding: 0 12px;
}

.tool-type {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.detail-list {
    display: grid;
    gap: 10px;
    padding-left: 20px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.two-column-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ghost-pill {
    min-height: 34px;
    padding: 0 12px;
}

.ghost-pill-active {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font-weight: 700;
}

.feature-card,
.section-card,
.info-panel,
.placeholder-panel {
    padding: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 220px;
    text-align: center;
    background: var(--panel-soft);
    border: 1px dashed var(--line);
    border-radius: 20px;
    padding: 18px;
}

.empty-state-large {
    gap: 14px;
    min-height: 280px;
}

.simple-list {
    display: grid;
    gap: 12px;
    padding-left: 20px;
    margin: 18px 0 0;
}

@media (max-width: 1180px) {
    .card-grid,
    .metric-grid,
    .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-card-split,
    .two-column-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .topbar,
    .page-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .topbar,
    .topbar-actions {
        align-items: flex-start;
    }

    .status-strip {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .guest-body {
        padding: 18px;
    }

    .login-card,
    .feature-card,
    .section-card,
    .hero-card,
    .info-panel,
    .placeholder-panel,
    .metric-card,
    .tool-card {
        padding: 20px;
    }

    .card-grid,
    .metric-grid,
    .tool-grid,
    .card-grid-wide,
    .two-column-grid {
        grid-template-columns: 1fr;
    }

    .competitor-structure-hero-grid,
    .competitor-structure-form-grid,
    .competitor-structure-preview-grid {
        grid-template-columns: 1fr;
    }

    .competitor-structure-mode-tabs,
    .competitor-structure-mode-tab {
        width: 100%;
    }

    .competitor-structure-history-item,
    .competitor-structure-result-head,
    .competitor-structure-status-head {
        align-items: flex-start;
    }

    .competitor-structure-result-meta {
        grid-template-columns: 1fr;
    }

    .competitor-structure-results-list {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .action-row,
    .topbar-user {
        width: 100%;
    }

    .primary-button,
    .secondary-button,
    .logout-link {
        width: 100%;
    }
}

.is-hidden,
[hidden] {
    display: none !important;
}

.keyword-tool-page {
    display: grid;
    gap: 22px;
}

.competitor-structure-page {
    display: grid;
    gap: 22px;
}

.competitor-structure-hero {
    display: grid;
    gap: 18px;
}

.competitor-structure-hero-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.competitor-structure-hidden-selects {
    display: none !important;
}

.competitor-structure-mode-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(31, 31, 33, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.competitor-structure-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.competitor-structure-mode-tab {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid rgba(36, 99, 235, 0.16);
    border-radius: 999px;
    background: #fff;
    color: #2e405c;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
}

.competitor-structure-mode-tab:hover,
.competitor-structure-mode-tab:focus-visible {
    border-color: rgba(36, 99, 235, 0.32);
    color: #1c57d6;
    outline: none;
}

.competitor-structure-mode-tab.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #2463eb 0%, #34a0ff 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(36, 99, 235, 0.18);
}

.competitor-structure-mode-panel {
    display: grid;
    gap: 16px;
}

.competitor-structure-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.competitor-structure-hero-panel {
    height: 100%;
}

.competitor-structure-form {
    display: grid;
    gap: 18px;
}

.competitor-structure-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.competitor-structure-field {
    display: grid;
    gap: 8px;
}

.competitor-structure-field-help {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.competitor-structure-field-full {
    grid-column: 1 / -1;
}

.competitor-structure-stoplist-input {
    min-height: 132px;
    resize: vertical;
    font-family: var(--bs-font-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace);
    line-height: 1.45;
}

.competitor-structure-manual-urls-input {
    min-height: 190px;
    resize: vertical;
    font-family: var(--bs-font-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace);
    line-height: 1.45;
}

.competitor-structure-inline-note {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px dashed rgba(31, 31, 33, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.competitor-structure-actions {
    justify-content: flex-start;
}

.competitor-structure-preview-card[hidden] {
    display: none !important;
}

.competitor-structure-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.competitor-structure-preview-item {
    min-height: 100%;
}

.competitor-structure-status-card[hidden] {
    display: none !important;
}

.competitor-structure-outline-status-card {
    margin-bottom: 16px;
}

.competitor-structure-status-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.competitor-structure-status-head p,
.competitor-structure-status-meta {
    margin: 0;
}

.competitor-structure-status-head p {
    flex: 1 1 320px;
    line-height: 1.45;
}

.competitor-structure-progress-bar {
    position: relative;
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(31, 31, 33, 0.08);
}

.competitor-structure-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2463eb 0%, #34a0ff 100%);
    transition: width 0.24s ease;
}

.competitor-structure-status-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.competitor-structure-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.competitor-structure-toolbar h2 {
    margin: 0 0 6px;
}

.competitor-structure-toolbar p {
    margin: 0;
}

.competitor-structure-section-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.competitor-structure-section-toggle-title {
    font-size: 14px;
    line-height: 1.2;
}

.competitor-structure-section-toggle::before {
    content: "▾";
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.competitor-structure-section-toggle:focus-visible {
    outline: 2px solid rgba(36, 99, 235, 0.35);
    outline-offset: 4px;
    border-radius: 10px;
}

.competitor-structure-results-card.is-collapsed .competitor-structure-section-toggle::before {
    transform: rotate(-90deg);
}

.competitor-structure-outline-card.is-collapsed .competitor-structure-section-toggle::before {
    transform: rotate(-90deg);
}

.competitor-structure-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.competitor-structure-results-content {
    display: grid;
    gap: 18px;
}

.competitor-structure-results-list,
.competitor-structure-excluded-list,
.competitor-structure-failed-list,
.competitor-structure-history-list {
    display: grid;
    gap: 14px;
}

.competitor-structure-results-list {
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    align-items: start;
}

.competitor-structure-result-card,
.competitor-structure-excluded-item,
.competitor-structure-failed-item,
.competitor-structure-history-item {
    border: 1px solid rgba(31, 31, 33, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.competitor-structure-result-card {
    padding: 14px 16px;
}

.competitor-structure-result-head {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.competitor-structure-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.competitor-structure-result-head h3,
.competitor-structure-failed-head h3,
.competitor-structure-failed-item-main h3,
.competitor-structure-history-main h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
}

.competitor-structure-host-link {
    color: inherit;
    text-decoration: none;
}

.competitor-structure-host-link:hover {
    color: var(--brand);
    text-decoration: underline;
}

.competitor-structure-result-url,
.competitor-structure-failed-head p,
.competitor-structure-history-main p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    word-break: break-word;
}

.competitor-structure-result-url {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.competitor-structure-result-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.competitor-structure-result-flags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.competitor-structure-result-flags.is-hidden {
    display: none;
}

.competitor-structure-result-meta-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(31, 31, 33, 0.04);
}

.competitor-structure-result-meta-row > span:last-child {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.competitor-structure-result-meta-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.competitor-structure-tree-wrap {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px dashed rgba(31, 31, 33, 0.14);
    background: rgba(255, 255, 255, 0.72);
}

.competitor-structure-tree {
    min-height: 0;
    font-size: 14px;
}

.competitor-structure-tree-list {
    margin: 0;
    padding-left: 16px;
    display: grid;
    gap: 6px;
}

.competitor-structure-tree-item {
    margin: 0;
}

.competitor-structure-tree-node summary,
.competitor-structure-tree-leaf {
    cursor: pointer;
    color: var(--bs-heading-color, #1f1f21);
    line-height: 1.3;
}

.competitor-structure-tree-node summary {
    font-weight: 700;
}

.competitor-structure-tree-node[open] > summary {
    margin-bottom: 8px;
}

.competitor-structure-tree-leaf,
.competitor-structure-tree-error {
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(31, 31, 33, 0.04);
}

.competitor-structure-tree-error {
    color: #b4232f;
}

.competitor-structure-excluded-card,
.competitor-structure-failed-card {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(31, 31, 33, 0.08);
}

.competitor-structure-failed-head {
    margin-bottom: 14px;
}

.competitor-structure-excluded-item,
.competitor-structure-failed-item {
    display: grid;
    grid-template-columns: auto minmax(220px, 300px) minmax(0, 1fr);
    gap: 16px;
    align-items: flex-start;
    padding: 16px 18px;
}

.competitor-structure-item-position .status-badge,
.competitor-structure-failed-item-main .status-badge {
    width: fit-content;
}

.competitor-structure-failed-item-main {
    display: grid;
    gap: 4px;
}

.competitor-structure-failed-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.competitor-structure-failed-error {
    margin: 0;
    color: #b4232f;
    line-height: 1.55;
    align-self: center;
}

.competitor-structure-excluded-reason {
    margin: 0;
    color: #8a5700;
    line-height: 1.55;
    align-self: center;
}

@media (max-width: 820px) {
    .competitor-structure-excluded-item,
    .competitor-structure-failed-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .competitor-structure-failed-error,
    .competitor-structure-excluded-reason {
        grid-column: 1 / -1;
    }
}

.competitor-structure-outline-wrap {
    display: grid;
    gap: 16px;
}

.competitor-structure-outline-content {
    display: grid;
    gap: 16px;
}

.competitor-structure-outline-head,
.competitor-structure-outline-node,
.competitor-structure-outline-prototype,
.competitor-structure-outline-dedup,
.competitor-structure-outline-missed {
    border: 1px solid rgba(31, 31, 33, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.competitor-structure-outline-head {
    padding: 18px 20px;
}

.competitor-structure-outline-source,
.competitor-structure-outline-strategy {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.competitor-structure-outline-source {
    margin-bottom: 10px;
    font-size: 13px;
}

.competitor-structure-outline-h1 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.2;
}

.competitor-structure-compare-controls,
.competitor-structure-compare-wrap {
    display: grid;
    gap: 16px;
}

.competitor-structure-compare-actions {
    justify-content: flex-start;
}

.competitor-structure-compare-status-card {
    margin-top: 16px;
}

.competitor-structure-compare-status-card.is-awaiting-ai .competitor-structure-progress-bar span {
    background-size: 200% 100%;
    animation: competitor-structure-ai-progress 1.2s linear infinite;
}

.competitor-structure-compare-status-card.is-long-running {
    border-color: rgba(217, 119, 6, 0.28);
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.08);
}

@keyframes competitor-structure-ai-progress {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

.competitor-structure-compare-summary,
.competitor-structure-compare-panel {
    border: 1px solid rgba(31, 31, 33, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.competitor-structure-compare-summary {
    padding: 18px 20px;
    display: grid;
    gap: 12px;
}

.competitor-structure-compare-summary-head,
.competitor-structure-compare-panel-head,
.competitor-structure-compare-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.competitor-structure-compare-target,
.competitor-structure-compare-summary-text {
    margin: 0;
}

.competitor-structure-compare-target {
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
}

.competitor-structure-compare-score {
    margin: 6px 0 0;
    font-size: 26px;
    line-height: 1.1;
}

.competitor-structure-compare-summary-text,
.competitor-structure-compare-item-text {
    line-height: 1.6;
    color: var(--text);
}

.competitor-structure-compare-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
}

.competitor-structure-compare-panel {
    padding: 16px;
    display: grid;
    gap: 14px;
    align-content: start;
    align-items: start;
}

.competitor-structure-compare-panel-list {
    display: grid;
    gap: 12px;
    align-content: start;
    align-items: start;
}

.competitor-structure-compare-panel-count {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(36, 99, 235, 0.08);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
}

.competitor-structure-compare-panel-secondary {
    margin-top: 4px;
}

.competitor-structure-compare-item {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(31, 31, 33, 0.03);
}

.competitor-structure-compare-item-compact {
    gap: 8px;
}

.competitor-structure-compare-item-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
}

.competitor-structure-compare-item-row {
    display: grid;
    gap: 4px;
}

.competitor-structure-compare-item-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.competitor-structure-compare-item-text {
    margin: 0;
}

.competitor-structure-compare-sources {
    display: grid;
    gap: 8px;
}

.competitor-structure-compare-source {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(31, 31, 33, 0.08);
    background: #fff;
    color: var(--text);
    text-decoration: none;
}

.competitor-structure-compare-source:hover {
    border-color: rgba(36, 99, 235, 0.22);
    background: rgba(36, 99, 235, 0.03);
}

.competitor-structure-outline-tree,
.competitor-structure-outline-node-children {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.competitor-structure-outline-node {
    padding: 14px 16px;
}

.competitor-structure-outline-node-head {
    display: grid;
    gap: 10px;
}

.competitor-structure-outline-node-body {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.competitor-structure-outline-node-note,
.competitor-structure-outline-node-list-wrap,
.competitor-structure-outline-node-model,
.competitor-structure-outline-node-draft {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(31, 31, 33, 0.03);
}

[data-outline-node-elements-wrap] {
    display: none !important;
}

.competitor-structure-outline-node-model,
.competitor-structure-outline-node-draft {
    grid-column: 1 / -1;
}

.competitor-structure-outline-node-note p {
    margin: 0;
    line-height: 1.6;
    color: var(--text);
}

.competitor-structure-outline-node-note-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.competitor-structure-outline-node-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.competitor-structure-outline-node-list li {
    line-height: 1.55;
}

@media (max-width: 1100px) {
    .competitor-structure-outline-node-body {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .competitor-structure-outline-node-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

.competitor-structure-outline-node-draft-text {
    display: grid;
    gap: 10px;
}

.competitor-structure-outline-node-draft-text p {
    margin: 0;
    line-height: 1.68;
}

.competitor-structure-outline-node-model-content {
    display: grid;
    gap: 12px;
}

.competitor-structure-outline-model-section {
    display: grid;
    gap: 10px;
}

.competitor-structure-outline-model-section-title {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--muted);
}

.competitor-structure-outline-model-text {
    display: grid;
    gap: 8px;
}

.competitor-structure-outline-model-text p,
.competitor-structure-outline-model-step p,
.competitor-structure-outline-model-card-text {
    margin: 0;
    line-height: 1.65;
}

.competitor-structure-outline-model-grid,
.competitor-structure-outline-model-faq,
.competitor-structure-outline-model-cta {
    display: grid;
    gap: 10px;
}

.competitor-structure-outline-model-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.competitor-structure-outline-model-card,
.competitor-structure-outline-model-pill {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(31, 31, 33, 0.08);
    background: #fff;
}

.competitor-structure-outline-model-card {
    display: grid;
    gap: 8px;
}

.competitor-structure-outline-model-card-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}

.competitor-structure-outline-model-list,
.competitor-structure-outline-model-steps {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.competitor-structure-outline-model-step {
    display: grid;
    gap: 6px;
}

.competitor-structure-outline-model-step strong {
    line-height: 1.45;
}

.competitor-structure-outline-model-table-wrap {
    overflow-x: auto;
}

.competitor-structure-outline-model-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 320px;
    font-size: 13px;
}

.competitor-structure-outline-model-table th,
.competitor-structure-outline-model-table td {
    padding: 10px 12px;
    border: 1px solid rgba(31, 31, 33, 0.09);
    text-align: left;
    vertical-align: top;
}

.competitor-structure-outline-model-table th {
    background: rgba(36, 99, 235, 0.06);
    font-weight: 700;
}

.competitor-structure-outline-model-pill {
    font-weight: 600;
    line-height: 1.5;
}

.competitor-structure-outline-node-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.competitor-structure-outline-node[data-level="H2"] .competitor-structure-outline-node-title-row.is-collapsible,
.competitor-structure-outline-node[data-level="H3"] .competitor-structure-outline-node-title-row.is-collapsible {
    cursor: pointer;
    user-select: none;
}

.competitor-structure-outline-node[data-level="H2"] .competitor-structure-outline-node-title-row.is-collapsible:focus-visible,
.competitor-structure-outline-node[data-level="H3"] .competitor-structure-outline-node-title-row.is-collapsible:focus-visible {
    outline: 2px solid rgba(36, 99, 235, 0.35);
    outline-offset: 4px;
    border-radius: 10px;
}

.competitor-structure-outline-node[data-level="H2"] .competitor-structure-outline-node-title-row.is-collapsible::after,
.competitor-structure-outline-node[data-level="H3"] .competitor-structure-outline-node-title-row.is-collapsible::after {
    content: "▾";
    margin-left: auto;
    padding-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.competitor-structure-outline-node[data-level="H2"].is-collapsed .competitor-structure-outline-node-title-row.is-collapsible::after,
.competitor-structure-outline-node[data-level="H3"].is-collapsed .competitor-structure-outline-node-title-row.is-collapsible::after {
    transform: rotate(-90deg);
}

.competitor-structure-outline-node-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(36, 99, 235, 0.12);
    color: #1c57d6;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.competitor-structure-outline-node-heading,
.competitor-structure-outline-dedup h3,
.competitor-structure-outline-missed h3 {
    margin: 0;
    font-size: 19px;
    line-height: 1.35;
}

.competitor-structure-outline-node[data-level="H3"] .competitor-structure-outline-node-heading {
    font-size: 17px;
}

.competitor-structure-outline-node[data-level="H4"] .competitor-structure-outline-node-heading,
.competitor-structure-outline-node[data-level="H5"] .competitor-structure-outline-node-heading {
    font-size: 15px;
}

.competitor-structure-outline-node-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.competitor-structure-outline-source-link {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(31, 31, 33, 0.05);
    color: inherit;
    text-decoration: none;
    line-height: 1.4;
}

.competitor-structure-outline-source-link:hover {
    background: rgba(36, 99, 235, 0.08);
    color: #1c57d6;
}

.competitor-structure-outline-source-host {
    font-weight: 700;
    white-space: nowrap;
}

.competitor-structure-outline-source-heading {
    color: var(--muted);
}

.competitor-structure-outline-node-children {
    margin-top: 12px;
    padding-left: 22px;
    border-left: 2px solid rgba(36, 99, 235, 0.14);
}

.competitor-structure-outline-dedup {
    padding: 16px 18px;
    border-style: dashed;
}

.competitor-structure-outline-prototype {
    padding: 16px 18px;
}

.competitor-structure-outline-prototype-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.competitor-structure-outline-prototype.is-collapsed .competitor-structure-outline-prototype-head {
    margin-bottom: 0;
}

.competitor-structure-outline-prototype-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.competitor-structure-outline-prototype-head h3 {
    margin: 0;
    font-size: 19px;
    line-height: 1.35;
}

.competitor-structure-outline-prototype-body {
    width: 100%;
}

.competitor-structure-outline-prototype-text {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(31, 31, 33, 0.08);
    background: rgba(31, 31, 33, 0.04);
    color: var(--text);
    font: 500 14px/1.7 "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    min-height: 168px;
    max-height: 280px;
    resize: vertical;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.competitor-structure-outline-missed {
    padding: 16px 18px;
    border-style: dashed;
}

.competitor-structure-outline-dedup-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.competitor-structure-outline-dedup-item {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(246, 178, 24, 0.14);
    color: #8a5700;
    font-size: 13px;
    line-height: 1.35;
}

.competitor-structure-outline-missed-list {
    display: grid;
    gap: 10px;
}

.competitor-structure-outline-missed-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(31, 31, 33, 0.04);
}

.competitor-structure-outline-missed-meaning {
    color: var(--text);
    line-height: 1.45;
}

.competitor-structure-outline-missed-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(36, 99, 235, 0.12);
    color: #1c57d6;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.competitor-structure-history-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    flex-wrap: wrap;
}

.competitor-structure-history-side {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.competitor-structure-history-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.keyword-inline-error {
    margin-top: 0;
}

.keyword-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.keyword-section-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    min-height: 40px;
    line-height: 1.15;
}

.tool-add-menu {
    position: relative;
}

.tool-add-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 15;
    display: grid;
    gap: 8px;
    min-width: 240px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.tool-add-menu-panel[hidden] {
    display: none !important;
}

.tool-add-menu-option {
    display: flex;
    align-items: center;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.tool-add-menu-option:hover,
.tool-add-menu-option:focus {
    border-color: rgba(62, 96, 213, 0.32);
    background: rgba(62, 96, 213, 0.06);
    color: var(--brand);
    outline: none;
}

.register-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 16px;
    align-items: end;
}

.register-select-wrap {
    display: grid;
    gap: 8px;
}

.register-select-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
}

.register-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
    box-shadow: var(--shadow);
}

.register-select:focus {
    border-color: rgba(62, 96, 213, 0.45);
    box-shadow: 0 0 0 3px rgba(62, 96, 213, 0.12);
}

.register-main-button {
    width: 100%;
}

.translit-block-head {
    align-items: center;
}

.translit-source-input,
.translit-result-output {
    min-height: 220px;
}

.translit-compose-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.translit-input-wrap {
    display: grid;
    gap: 8px;
}

.translit-text-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
    box-shadow: var(--shadow);
}

.translit-text-input:focus {
    border-color: rgba(62, 96, 213, 0.45);
    box-shadow: 0 0 0 3px rgba(62, 96, 213, 0.12);
}

.translit-checkbox-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding-bottom: 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.translit-checkbox-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.translit-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.translit-setting-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
}

.translit-setting-card legend {
    padding: 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.translit-setting-card-wide {
    grid-column: span 2;
}

.translit-radio-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
    color: var(--text);
    font-size: 14px;
}

.translit-radio-option input {
    margin: 2px 0 0;
    accent-color: var(--brand);
}

.translit-radio-option code {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(62, 96, 213, 0.08);
    color: var(--brand-dark);
}

.translit-settings-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.keyword-round-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 0;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    color: var(--brand);
}

.keyword-round-button:disabled {
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
}

.keyword-round-button-small {
    width: 36px;
    height: 36px;
}

.keyword-round-button-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 400;
}

.keyword-round-button-small .keyword-round-button-glyph {
    font-size: 1.5rem;
}

.keyword-list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.keyword-list-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.keyword-list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.keyword-list-card-header h3 {
    margin: 0;
    font-size: 17px;
}

.keyword-textarea,
.keyword-result-output,
.keyword-buffer-output {
    width: 100%;
    min-height: 320px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 14px 12px;
    font: inherit;
    line-height: 1.45;
    color: var(--text);
    background: #fff;
    resize: vertical;
    outline: none;
}

.keyword-textarea:focus,
.keyword-result-output:focus,
.keyword-buffer-output:focus {
    border-color: rgba(62, 96, 213, 0.45);
    box-shadow: 0 0 0 3px rgba(62, 96, 213, 0.12);
}

.keyword-list-card-footer {
    display: flex;
    justify-content: flex-end;
}

.keyword-card-count {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
}

.keyword-options-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 30px;
}

.keyword-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
    box-shadow: var(--shadow);
}

.keyword-option input {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: #1c4bf0;
}

.keyword-main-button,
.keyword-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 18px;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 10px rgba(62, 96, 213, 0.18);
}

.keyword-action-button-light {
    background: #fff;
    border-color: var(--line);
    color: var(--text);
    box-shadow: none;
}

.keyword-button-row-compact {
    justify-content: flex-end;
}

.keyword-main-button {
    width: 100%;
}

.keyword-action-button:disabled {
    opacity: 0.45;
    cursor: default;
}

.keyword-output-block {
    display: grid;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.keyword-result-output {
    background: #fff;
}

.keyword-output-block-secondary {
    margin-top: -2px;
}

.keyword-buffer-output::placeholder {
    color: #7a8190;
}

.keyword-output-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.keyword-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-output-counter {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--muted);
}

.keyword-copy-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    max-width: 320px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #0f294d;
    color: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.keyword-copy-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1180px) {
    .keyword-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .keyword-options-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .keyword-list-grid,
    .keyword-options-grid {
        grid-template-columns: 1fr;
    }

    .keyword-output-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .keyword-section-head {
        align-items: flex-start;
    }

    .tool-add-menu-panel {
        left: 0;
        right: auto;
        min-width: 220px;
    }

    .register-controls {
        grid-template-columns: 1fr;
    }

    .translit-settings-grid {
        grid-template-columns: 1fr;
    }

    .translit-compose-grid {
        grid-template-columns: 1fr;
    }

    .translit-setting-card-wide {
        grid-column: auto;
    }

    .keyword-textarea,
    .keyword-result-output,
    .keyword-buffer-output {
        min-height: 240px;
    }

    .keyword-button-row {
        width: 100%;
        flex-direction: column;
    }

    .keyword-action-button,
    .keyword-main-button {
        width: 100%;
    }

    .keyword-copy-toast {
        right: 16px;
        left: 16px;
        bottom: 16px;
        max-width: none;
    }
}

:root {
    --refo-surface: var(--bs-card-bg, #ffffff);
    --refo-surface-muted: #f8f8fb;
    --refo-line: rgba(31, 31, 33, 0.08);
    --refo-line-strong: rgba(31, 31, 33, 0.14);
    --refo-shadow: 0 14px 36px rgba(31, 31, 33, 0.06);
    --refo-shadow-soft: 0 8px 24px rgba(31, 31, 33, 0.04);
    --refo-radius: 24px;
    --refo-radius-sm: 18px;
}

body.app-conca-body,
body.app-conca-guest {
    background: #f6f6f9;
    color: var(--bs-body-color, #2d2c34);
}

.app-conca-body .app-main {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(var(--bs-primary-rgb), 0.08), transparent 26%),
        linear-gradient(180deg, #f6f6f9 0%, #f1f4fb 100%);
}

.app-conca-body .app-content {
    flex: 1 1 auto;
}

.app-conca-body .page-content {
    padding: 0;
}

.refo-page-content {
    display: grid;
    gap: 1.5rem;
}

.refo-flash {
    border: 0;
    border-radius: 1rem;
    box-shadow: var(--refo-shadow-soft);
}

.refo-sidebar-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.refo-sidebar-brand {
    color: #1f1f21;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.app-sidebar-menu .menu-link {
    gap: 0.75rem;
    min-height: auto;
    padding: 11px 16px;
    border-radius: 6px;
    margin-bottom: 4px;
}

.app-sidebar-menu .menu-link:hover,
.app-sidebar-menu .menu-link.active:not(.menu-current),
.app-sidebar-menu .menu-link.menu-current {
    border-radius: 6px;
}

.app-sidebar-menu .menu-link:hover,
.app-sidebar-menu .menu-link.active:not(.menu-current) {
    background: var(--app-sidebar-menu-hover-bg);
    color: var(--app-sidebar-menu-color);
    box-shadow: none;
}

.app-sidebar-menu .menu-link.menu-current {
    background: var(--bs-primary);
    color: var(--bs-white) !important;
    box-shadow: 0 1px 2px 0 rgba(55, 17, 184, 0.25), 0 0 1px 0 #3e18be;
}

.app-sidebar-menu .menu-link.active .refo-menu-dot,
.app-sidebar-menu .menu-link.menu-current .refo-menu-dot {
    opacity: 1;
}

.refo-menu-icon {
    width: 1rem;
    display: inline-flex;
    justify-content: center;
}

.refo-menu-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 1.5px solid currentColor;
    background: transparent;
    opacity: 0.72;
}

.refo-menu-copy {
    display: block;
    min-width: 0;
}

.refo-menu-group-item {
    margin-bottom: 0.3rem;
}

.refo-group-link {
    font-weight: 600;
}

.refo-group-folder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-sidebar-menu .refo-group-link .menu-icon {
    width: 20px;
    margin-inline-end: 5px;
    transform: translateY(-1px);
}

.refo-submenu-link {
    position: relative;
    padding-left: 18px;
}

.refo-submenu-link .menu-title {
    font-weight: 500;
}

.app-sidebar-menu .refo-menu-group-item > .app-sidebar-submenu {
    display: block;
    padding-inline-start: 20px;
    margin-top: 0.15rem;
    margin-bottom: 0.45rem;
}

.refo-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 0.45rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.refo-menu-badge-warning {
    background: rgba(255, 193, 7, 0.14);
    color: #f7cf5c;
}

.refo-menu-badge-muted {
    background: rgba(255, 255, 255, 0.09);
    color: #d6d5df;
}

.refo-menu-badge-info {
    background: rgba(var(--bs-primary-rgb), 0.18);
    color: #cad6ff;
}

.refo-sidebar-footer {
    display: none;
}

.refo-sidebar-footer h6 {
    color: var(--bs-white);
}

.refo-sidebar-avatar {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--bs-primary-rgb), 0.18);
    color: var(--bs-white);
    font-weight: 700;
}

.refo-sidebar-logout {
    color: var(--bs-white);
    opacity: 0.74;
    transition: opacity 0.2s ease;
}

.refo-sidebar-logout:hover {
    opacity: 1;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
}

.refo-page-heading h1 {
    margin: 0;
    font-size: clamp(1.2rem, 1.08rem + 0.5vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.refo-page-heading-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.refo-page-summary {
    max-width: 780px;
    font-size: 0.95rem;
    line-height: 1.65;
}

.refo-help-link,
.kb-question-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.14);
    border-radius: 999px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.refo-help-link:hover,
.kb-question-link:hover {
    transform: translateY(-1px);
    background: rgba(var(--bs-primary-rgb), 0.16);
    box-shadow: 0 12px 24px rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
}

.kb-question-link-compact {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.9rem;
}

.refo-user-card {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--refo-line);
    border-radius: 999px;
    background: var(--refo-surface);
    box-shadow: var(--refo-shadow-soft);
}

.refo-user-card strong {
    display: block;
    line-height: 1.2;
}

.refo-user-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-gray-600, #7a7984);
}

.refo-topbar-logout {
    min-width: 112px;
    border-radius: 999px;
}

.refo-header-user-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.refo-header-avatar {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(var(--bs-primary-rgb), 0.14);
}

.refo-header-user-dropdown {
    min-width: 18rem;
}

.refo-user-dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    color: #6f6d78;
}

.app-conca-guest {
    background:
        radial-gradient(circle at top left, rgba(var(--bs-primary-rgb), 0.14), transparent 30%),
        linear-gradient(180deg, #f6f6f9 0%, #eef2ff 100%);
}

.app-conca-guest .guest-shell {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.refo-auth-card {
    width: min(100%, 34rem);
}

.refo-brand-chip {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.refo-auth-alert {
    border: 0;
    border-radius: 1rem;
}

.refo-auth-form .form-control {
    min-height: 3rem;
    border-radius: 0.95rem;
    border-color: var(--refo-line-strong);
}

.refo-auth-form .form-control:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.36);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.12);
}

.refo-auth-form .btn {
    min-height: 3rem;
    border-radius: 0.95rem;
    font-weight: 600;
}

.hero-card,
.section-card,
.feature-card,
.info-panel,
.placeholder-panel,
.metric-card,
.tool-card,
.keyword-output-block,
.keyword-list-card,
.translit-setting-card {
    background: var(--refo-surface);
    border: 1px solid var(--refo-line);
    border-radius: var(--refo-radius-sm);
    box-shadow: var(--refo-shadow);
}

.hero-card,
.section-card,
.feature-card,
.info-panel,
.placeholder-panel,
.metric-card,
.tool-card {
    box-shadow: var(--refo-shadow-soft);
}

.hero-card {
    padding: 2rem;
}

.hero-side {
    border: 1px solid rgba(var(--bs-primary-rgb), 0.08);
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.1), rgba(255, 255, 255, 0.98));
}

.metric-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 253, 0.98) 100%);
}

.metric-value,
.tool-card h3,
.hero-card h2,
.section-card h2,
.info-panel h3,
.feature-card h3,
.empty-state h3 {
    color: var(--bs-heading-color, #1f1f21);
}

.meta-chip,
.ghost-pill,
.status-badge {
    border-radius: 999px;
}

.meta-chip {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.status-badge-default,
.status-badge-planned,
.ghost-pill {
    background: #f1f2f6;
    color: #53515d;
}

.ghost-pill-active {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.status-badge-priority {
    background: rgba(255, 193, 7, 0.16);
    color: #9f7a00;
}

.status-badge-queued {
    background: rgba(111, 66, 193, 0.12);
    color: #6943b0;
}

.status-badge-success {
    background: rgba(25, 135, 84, 0.12);
    color: #17784b;
}

.status-badge-warning {
    background: rgba(241, 140, 38, 0.14);
    color: #9a5a13;
}

.primary-button,
.keyword-main-button,
.keyword-action-button:not(.keyword-action-button-light) {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    box-shadow: 0 10px 24px rgba(var(--bs-primary-rgb), 0.22);
}

.secondary-button,
.keyword-action-button-light {
    background: var(--refo-surface);
    border-color: var(--refo-line-strong);
    color: var(--bs-body-color, #2d2c34);
    box-shadow: none;
}

.primary-button,
.secondary-button,
.keyword-main-button,
.keyword-action-button {
    border-radius: 0.9rem;
}

.keyword-round-button {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.16);
    border-radius: 10px;
    background: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
}

.keyword-round-button-small {
    width: 38px;
    height: 38px;
}

.keyword-textarea,
.keyword-result-output,
.keyword-buffer-output,
.translit-text-input,
.register-select {
    border-color: var(--refo-line-strong);
    border-radius: 1rem;
    box-shadow: none;
}

.keyword-textarea:focus,
.keyword-result-output:focus,
.keyword-buffer-output:focus,
.translit-text-input:focus,
.register-select:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.36);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.12);
}

.keyword-option {
    background: var(--refo-surface-muted);
    border-color: transparent;
    box-shadow: none;
}

.keyword-option input,
.translit-checkbox-option input,
.translit-radio-option input {
    accent-color: var(--bs-primary);
}

.keyword-copy-toast {
    background: #1f1f21;
    border-radius: 1rem;
}

.field input,
.translit-text-input,
.register-select,
.keyword-textarea,
.keyword-result-output,
.keyword-buffer-output {
    display: block;
    width: 100%;
    min-height: calc(1.5em + 1.25rem + calc(var(--bs-border-width, 1px) * 2));
    padding: 0.625rem 1.375rem;
    font-family: var(--bs-font-sans-serif, inherit);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-heading-color, #2d2d33);
    appearance: none;
    background-color: var(--bs-input-bg, #fff);
    background-clip: padding-box;
    border: var(--bs-border-width, 1px) solid var(--bs-input-border-color, #d6d8db);
    border-radius: var(--bs-border-radius, 0.5rem);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-shadow: none;
}

.field input::placeholder,
.translit-text-input::placeholder,
.register-select::placeholder,
.keyword-textarea::placeholder,
.keyword-result-output::placeholder,
.keyword-buffer-output::placeholder {
    color: var(--bs-secondary-color, #8f8f97);
    opacity: 1;
}

.field input:focus,
.translit-text-input:focus,
.register-select:focus,
.keyword-textarea:focus,
.keyword-result-output:focus,
.keyword-buffer-output:focus {
    color: var(--bs-heading-color, #2d2d33);
    background-color: var(--bs-card-bg, #fff);
    border-color: #5F4AFE;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(95, 74, 254, 0.25);
}

.register-select {
    padding: 0.625rem 4.125rem 0.625rem 1.375rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23222f36' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.375rem center;
    background-size: 16px 12px;
}

.keyword-option,
.translit-checkbox-option,
.translit-radio-option {
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 400;
    color: var(--bs-check-label-color, #53515d);
}

.keyword-option input,
.translit-checkbox-option input,
.translit-radio-option input {
    --bs-form-check-bg-image: none;
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0.1875rem 0 0;
    vertical-align: top;
    appearance: none;
    background-color: var(--bs-input-check-bg, #fff);
    background-image: var(--bs-form-check-bg-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: var(--bs-border-width, 1px) solid var(--bs-input-border-color, #d6d8db);
    box-shadow: none;
    print-color-adjust: exact;
}

.keyword-option input[type="checkbox"],
.translit-checkbox-option input[type="checkbox"] {
    border-radius: 0.188rem;
}

.translit-radio-option input[type="radio"] {
    border-radius: 50%;
}

.keyword-option input:active,
.translit-checkbox-option input:active,
.translit-radio-option input:active {
    filter: brightness(90%);
}

.keyword-option input:focus,
.translit-checkbox-option input:focus,
.translit-radio-option input:focus {
    border-color: #5F4AFE;
    outline: 0;
    box-shadow: 0 1px 3px 0 rgba(45, 45, 51, 0.2), 0 0 0 4px rgba(95, 74, 254, 0.12);
}

.keyword-option input:checked,
.translit-checkbox-option input:checked,
.translit-radio-option input:checked {
    background-color: #5F4AFE;
    border-color: #5F4AFE;
}

.keyword-option input[type="checkbox"]:checked,
.translit-checkbox-option input[type="checkbox"]:checked {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9 1L3.5 6.5L1 4' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
}

.translit-radio-option input[type="radio"]:checked {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg viewBox='-4 -4 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle r='1.7' fill='%23fff'/%3e%3c/svg%3e");
}

.keyword-option input:disabled,
.translit-checkbox-option input:disabled,
.translit-radio-option input:disabled {
    pointer-events: none;
    filter: none;
    opacity: 0.5;
}

.keyword-option input:disabled + span,
.translit-checkbox-option input:disabled + span,
.translit-radio-option input:disabled + span {
    opacity: 0.5;
}

.primary-button,
.secondary-button,
.keyword-main-button,
.keyword-action-button {
    font-size: 13px;
}

.keyword-textarea,
.keyword-result-output,
.keyword-buffer-output {
    min-height: 256px;
}

.translit-source-input,
.translit-result-output {
    min-height: 176px;
}

.register-controls-card {
    padding: 18px;
}

.keyword-options-card {
    padding: 18px;
}

.keyword-options-card .keyword-options-grid {
    gap: 14px 28px;
}

.keyword-options-card .keyword-option {
    min-height: 32px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.meta-workspace-grid,
.meta-editor-grid,
.meta-toolbar-head,
.meta-settings-stack,
.meta-settings-options,
.meta-editor-column,
.meta-editor-zone {
    display: grid;
    gap: 18px;
}

.meta-workspace-grid {
    grid-template-columns: minmax(280px, 0.95fr) minmax(260px, 0.92fr) minmax(420px, 1.45fr);
    align-items: start;
}

.meta-toolbar-block {
    display: block;
    margin-bottom: 2px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.meta-toolbar-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.meta-toolbar-spacer {
    min-height: 1px;
}

.meta-tags-settings-block[hidden] {
    display: none !important;
}

.meta-settings-section {
    display: grid;
    gap: 12px;
}

.meta-settings-section h3,
.meta-field-label {
    margin: 0;
}

.meta-settings-section h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--bs-heading-color, #2d2d33);
}

.meta-limit-table {
    width: 100%;
    border-collapse: collapse;
}

.meta-limit-table th,
.meta-limit-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(31, 31, 33, 0.08);
    font-size: 14px;
    text-align: left;
}

.meta-limit-table th {
    color: var(--muted);
    font-weight: 700;
}

.meta-limit-table tr:last-child td {
    border-bottom: 0;
}

.meta-limit-input {
    min-height: 40px;
    padding-inline: 14px;
    text-align: center;
}

.meta-settings-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.meta-generator-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.meta-ai-prompts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.meta-ai-prompt-wrap {
    gap: 8px;
}

.meta-ai-prompt-input {
    min-height: 148px;
}

.meta-ai-prompt-actions {
    margin-top: 14px;
}

.meta-tags-phrases-input {
    height: 520px;
    min-height: 520px;
    max-height: 520px;
    overflow-y: auto;
    resize: none;
}

.meta-stop-words-input {
    min-height: 150px;
}

.meta-helper-block {
    display: grid;
    gap: 16px;
}

.meta-helper-list {
    display: grid;
    align-content: start;
    gap: 6px;
    height: 520px;
    min-height: 520px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.meta-helper-empty {
    display: flex;
    align-items: center;
    min-height: 520px;
    padding: 18px;
    border: 1px dashed rgba(31, 31, 33, 0.14);
    border-radius: 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.7);
}

.meta-helper-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px 96px;
    align-items: stretch;
    gap: 0;
}

.meta-helper-word,
.meta-helper-total,
.meta-helper-usage {
    min-height: 42px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(31, 31, 33, 0.08);
    background: rgba(31, 31, 33, 0.035);
}

.meta-helper-word {
    padding: 0 12px;
    border-radius: 12px 0 0 12px;
    border-right: 0;
    color: var(--bs-heading-color, #2d2d33);
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta-helper-total {
    justify-content: center;
    color: var(--bs-heading-color, #2d2d33);
    font-size: 13px;
    font-weight: 700;
    border-right: 0;
}

.meta-helper-usage {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-items: center;
    gap: 0;
    padding: 0 6px;
    border-radius: 0 12px 12px 0;
}

.meta-helper-usage-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    min-height: 16px;
    color: var(--bs-heading-color, #2d2d33);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.meta-helper-usage-badge.is-empty {
    visibility: hidden;
}

.meta-editor-zone {
    align-items: start;
}

.meta-field-card {
    display: grid;
    gap: 12px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.meta-field-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-field-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--bs-heading-color, #2d2d33);
}

.meta-count-line {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: var(--muted);
}

.meta-count-line-inline {
    margin-left: auto;
    justify-content: flex-end;
    text-align: right;
}

.meta-count-line strong {
    color: var(--bs-heading-color, #2d2d33);
}

.meta-count-line .meta-limit-over {
    color: #d92d20;
}

.meta-editor-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
}

.meta-editor-column-secondary {
    grid-template-rows: minmax(0, 1fr) auto;
}

.meta-field-title {
    min-height: 86px;
}

.meta-field-h1,
.meta-field-link {
    min-height: 86px;
}

.meta-field-description {
    min-height: 232px;
}

.meta-field-card-text {
    margin-top: 16px;
}

.meta-field-text {
    min-height: 208px;
}

.meta-h1-warning {
    display: none;
    align-items: center;
    justify-content: flex-start;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 193, 7, 0.16);
    color: #8a5700;
    font-size: 13px;
    font-weight: 700;
}

.meta-h1-warning.is-visible {
    display: inline-flex;
}

.meta-editor-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
}

.meta-editor-actions .keyword-action-button {
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
}

.meta-editor-actions .keyword-action-button:not([data-clear-button]) {
    background: #6f42f5;
    border-color: #6f42f5;
    color: #fff;
    box-shadow: 0 6px 14px rgba(111, 66, 245, 0.22);
}

.meta-editor-actions [data-generate-button].is-loading,
.meta-editor-actions [data-ai-generate-button].is-loading,
.meta-editor-actions [data-competitor-generate-button].is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.meta-competitor-engine-wrap {
    min-width: 220px;
    margin: 0;
}

.meta-competitor-engine-wrap .register-select-label {
    margin-bottom: 6px;
}

.meta-competitor-summary {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(111, 66, 245, 0.18);
    border-radius: 14px;
    background: rgba(111, 66, 245, 0.06);
}

.meta-competitor-summary.is-hidden {
    display: none;
}

.meta-competitor-summary-line {
    font-size: 14px;
    line-height: 1.55;
    color: #3e3a53;
}

.meta-competitor-sources {
    display: grid;
    gap: 10px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(111, 66, 245, 0.16);
}

.meta-competitor-sources-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--bs-heading-color, #2d2d33);
}

.meta-competitor-source {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(111, 66, 245, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.74);
}

.meta-competitor-source-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.meta-competitor-source-rank {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 800;
    color: var(--bs-heading-color, #2d2d33);
}

.meta-competitor-source-host {
    font-size: 13px;
    font-weight: 700;
    color: var(--bs-heading-color, #2d2d33);
}

.meta-competitor-source-meta {
    display: grid;
    gap: 4px;
}

.meta-competitor-source-row {
    font-size: 13px;
    line-height: 1.45;
    color: #4b4761;
}

.meta-competitor-source-label {
    font-weight: 700;
    color: var(--bs-heading-color, #2d2d33);
}

.review-topic-grid {
    display: grid;
    gap: 18px;
}

.review-topic-card {
    gap: 18px;
}

.review-topic-form {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 230px 170px 220px 140px;
}

.review-topic-field {
    display: grid;
    gap: 8px;
}

.review-topic-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(75, 71, 97, 0.78);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.review-topic-input {
    width: 100%;
    min-height: 48px;
    border-radius: 0.9rem;
    border: 1px solid rgba(41, 31, 74, 0.12);
    background: #fff;
    color: #2d2d33;
    padding: 12px 14px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-topic-input:focus {
    outline: none;
    border-color: rgba(84, 62, 150, 0.45);
    box-shadow: 0 0 0 4px rgba(84, 62, 150, 0.12);
}

.review-topic-input-count {
    text-align: center;
}

.review-note-card {
    gap: 0;
}

.review-note-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-note-grid strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--bs-heading-color, #2d2d33);
}

.review-note-grid p {
    margin: 0;
    color: #4b4761;
    line-height: 1.6;
}

.review-topic-select {
    appearance: auto;
}

.review-results-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.review-result-list {
    display: grid;
    gap: 14px;
}

.review-result-card {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(41, 31, 74, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
}

.review-result-card-head {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.review-result-number {
    font-size: 14px;
    font-weight: 700;
    color: rgba(75, 71, 97, 0.78);
    line-height: 1.5;
}

.review-result-meta {
    display: grid;
    gap: 6px;
}

.review-result-line {
    font-size: 14px;
    line-height: 1.55;
    color: #2d2d33;
}

.review-result-line strong {
    color: var(--bs-heading-color, #2d2d33);
}

.review-result-text {
    font-size: 14px;
    line-height: 1.7;
    color: #2d2d33;
    white-space: pre-wrap;
}

.review-result-profiles {
    display: grid;
    gap: 10px;
    padding-top: 4px;
}

.review-result-profiles-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(75, 71, 97, 0.78);
}

.review-result-profiles-list {
    display: grid;
    gap: 10px;
}

.review-result-profile-card {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 0.9rem;
    border: 1px solid rgba(41, 31, 74, 0.08);
    background: rgba(84, 62, 150, 0.05);
}

.review-result-profile-heading {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--bs-heading-color, #2d2d33);
}

.review-result-profile-meta {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(75, 71, 97, 0.82);
}

.review-result-profile-line {
    font-size: 13px;
    line-height: 1.55;
    color: #2d2d33;
}

.review-result-profile-line strong {
    color: var(--bs-heading-color, #2d2d33);
}

.review-result-original {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 0.95rem;
    border: 1px dashed rgba(41, 31, 74, 0.18);
    background: rgba(255, 252, 245, 0.88);
}

.review-result-original-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(75, 71, 97, 0.78);
}

.review-result-original-headline {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--bs-heading-color, #2d2d33);
}

.review-result-original-text {
    font-size: 14px;
    line-height: 1.65;
    color: #2d2d33;
    white-space: pre-wrap;
}

.status-badge-danger {
    background: rgba(220, 53, 69, 0.14);
    color: #b4232f;
}

.review-corpus-page {
    display: grid;
    gap: 18px;
}

.review-corpus-metric-grid {
    margin-bottom: 0;
}

.review-corpus-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    align-items: start;
}

.review-corpus-config-card,
.review-corpus-status-card {
    display: grid;
    gap: 18px;
}

.review-corpus-note {
    margin: 0;
    color: #4b4761;
    line-height: 1.65;
}

.review-corpus-import-block {
    display: grid;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 1rem;
    background: rgba(248, 246, 255, 0.75);
    border: 1px solid rgba(84, 62, 150, 0.12);
}

.review-corpus-subheading {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.3;
    color: var(--bs-heading-color, #2d2d33);
}

.review-corpus-preset-grid {
    display: grid;
    gap: 10px;
}

.review-corpus-preset-button {
    display: grid;
    justify-items: start;
    gap: 4px;
    text-align: left;
}

.review-corpus-preset-title {
    font-weight: 700;
    line-height: 1.35;
}

.review-corpus-preset-hint {
    font-size: 13px;
    line-height: 1.5;
    color: #4b4761;
}

.review-corpus-form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-corpus-field {
    display: grid;
    gap: 8px;
}

.review-corpus-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(75, 71, 97, 0.78);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.review-corpus-input,
.review-corpus-select {
    width: 100%;
    min-height: 48px;
    border-radius: 0.9rem;
    border: 1px solid rgba(41, 31, 74, 0.12);
    background: #fff;
    color: #2d2d33;
    padding: 12px 14px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-corpus-input:focus,
.review-corpus-select:focus {
    outline: none;
    border-color: rgba(84, 62, 150, 0.45);
    box-shadow: 0 0 0 4px rgba(84, 62, 150, 0.12);
}

.review-corpus-checkbox {
    display: flex;
    align-items: start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.55;
    color: #403b53;
}

.review-corpus-checkbox input {
    margin-top: 2px;
}

.review-corpus-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.review-corpus-action-row .keyword-main-button,
.review-corpus-action-row .keyword-action-button {
    width: auto;
    flex: 0 0 auto;
}

.review-corpus-mini-stats {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 1rem;
    background: rgba(84, 62, 150, 0.05);
    border: 1px solid rgba(84, 62, 150, 0.08);
    font-size: 14px;
    line-height: 1.55;
    color: #403b53;
}

.review-corpus-mini-stats strong {
    color: var(--bs-heading-color, #2d2d33);
}

.review-corpus-status-stack {
    display: grid;
    gap: 10px;
}

.review-corpus-status-line {
    font-size: 14px;
    line-height: 1.6;
    color: #403b53;
}

.review-corpus-status-line strong {
    color: var(--bs-heading-color, #2d2d33);
}

.review-corpus-summary-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-corpus-summary-box {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 1rem;
    border: 1px solid rgba(41, 31, 74, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.review-corpus-summary-box span {
    font-size: 12px;
    font-weight: 700;
    color: rgba(75, 71, 97, 0.78);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.review-corpus-summary-box strong {
    font-size: 24px;
    line-height: 1;
    color: var(--bs-heading-color, #2d2d33);
}

.review-corpus-last-batch {
    display: grid;
    gap: 12px;
    padding-top: 4px;
}

.review-corpus-last-batch strong {
    color: var(--bs-heading-color, #2d2d33);
}

.review-corpus-last-batch-meta {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(75, 71, 97, 0.82);
}

.review-corpus-last-batch-list {
    display: grid;
    gap: 10px;
}

.review-corpus-last-batch-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 12px 14px;
    border-radius: 0.95rem;
    border: 1px solid rgba(41, 31, 74, 0.08);
    background: rgba(255, 255, 255, 0.78);
}

.review-corpus-last-batch-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.review-corpus-last-batch-pill-profiled {
    background: rgba(25, 135, 84, 0.14);
    color: #1d7f52;
}

.review-corpus-last-batch-pill-rejected {
    background: rgba(255, 193, 7, 0.18);
    color: #9f7a00;
}

.review-corpus-last-batch-pill-failed,
.review-corpus-last-batch-pill-unknown {
    background: rgba(220, 53, 69, 0.14);
    color: #b4232f;
}

.review-corpus-last-batch-copy {
    display: grid;
    gap: 4px;
}

.review-corpus-last-batch-copy strong {
    font-size: 14px;
    line-height: 1.3;
}

.review-corpus-last-batch-copy span {
    font-size: 13px;
    line-height: 1.55;
    color: #4b4761;
    word-break: break-word;
}

.review-corpus-job-list {
    display: grid;
    gap: 12px;
}

.review-corpus-job-card {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 1rem;
    border: 1px solid rgba(41, 31, 74, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.review-corpus-job-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.review-corpus-job-card-copy {
    display: grid;
    gap: 4px;
}

.review-corpus-job-card-copy strong {
    font-size: 15px;
    color: var(--bs-heading-color, #2d2d33);
}

.review-corpus-job-card-copy span,
.review-corpus-job-card-meta span {
    font-size: 13px;
    line-height: 1.55;
    color: #4b4761;
}

.review-corpus-job-card-meta {
    display: grid;
    gap: 6px;
}

.review-corpus-job-card-actions .keyword-action-button {
    width: auto;
}

.service-stage-grid {
    align-items: start;
}

.service-stage-card {
    display: grid;
    gap: 22px;
}

.service-stage-feedback {
    margin-bottom: 18px;
}

.service-stage-feedback.is-loading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-stage-feedback.is-loading::before {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(37, 99, 235, 0.22);
    border-top-color: #2563eb;
    animation: service-stage-spin 0.8s linear infinite;
    flex: 0 0 auto;
}

@keyframes service-stage-spin {
    to {
        transform: rotate(360deg);
    }
}

.service-stage-header {
    margin-bottom: 0;
}

.service-stage-form {
    display: grid;
    gap: 12px;
}

.service-stage-upload-row {
    display: grid;
    gap: 12px;
}

.service-stage-upload-top {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: center;
    justify-content: space-between;
}

.service-stage-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.service-stage-upload-meta {
    display: grid;
    gap: 4px;
    min-width: min(100%, 320px);
    justify-items: end;
    text-align: right;
}

.service-stage-file-hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.service-stage-template-link {
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
}

.service-stage-template-link:hover,
.service-stage-template-link:focus-visible {
    color: var(--brand-dark);
    text-decoration: underline;
}

.service-stage-process-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.service-stage-clear-button {
    min-height: 52px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.service-stage-process-button {
    min-height: 52px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.18);
    background: linear-gradient(180deg, var(--bs-purple) 0%, var(--bs-primary) 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(var(--bs-primary-rgb), 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.service-stage-process-button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(var(--bs-primary-rgb), 0.24);
    filter: saturate(1.02);
}

.service-stage-process-button[disabled] {
    opacity: 0.58;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: none;
}

.service-stage-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 30px;
    border-radius: 8px;
    background: #2298d6;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.service-stage-upload-button:hover {
    background: #1b86bf;
}

.service-stage-upload-input {
    display: none;
}

.service-stage-file-name {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.service-stage-progress {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 197, 94, 0.18);
    border-radius: 14px;
    background:
        linear-gradient(
            90deg,
            rgba(34, 197, 94, 0.2) 0%,
            rgba(34, 197, 94, 0.2) var(--service-stage-progress, 0%),
            #edf8ef var(--service-stage-progress, 0%),
            #edf8ef 100%
        );
}

.service-stage-progress::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: var(--service-stage-progress, 0%);
    height: 4px;
    background: linear-gradient(90deg, #1d9b4e 0%, #33c36c 100%);
}

.service-stage-progress-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    padding: 14px 18px;
}

.service-stage-progress-copy strong {
    font-size: 16px;
    color: #14532d;
}

.service-stage-progress-copy span {
    color: #1f6a3e;
    font-size: 14px;
    line-height: 1.45;
}

.service-stage-submit {
    width: fit-content;
}

.service-stage-stats {
    display: grid;
    gap: 6px;
}

.service-stage-stats p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.service-stage-account-panel {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 16px 20px;
    align-items: start;
    padding: 18px 20px;
    border: 1px solid rgba(var(--bs-purple-rgb), 0.12);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(var(--bs-purple-rgb), 0.05) 0%, rgba(var(--bs-purple-rgb), 0.02) 100%);
}

.service-stage-account-field {
    display: grid;
    gap: 8px;
}

.service-stage-account-select {
    min-height: 46px;
    border-radius: 12px;
}

.refo-enhanced-select {
    width: 100%;
}

.refo-enhanced-select .select2-container {
    width: 100% !important;
}

.refo-enhanced-select .select2-container--default .select2-selection--single {
    display: flex;
    align-items: center;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(123, 97, 255, 0.18);
    background: #fff;
    box-shadow: 0 8px 20px rgba(34, 47, 54, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.refo-enhanced-select .select2-container--default .select2-selection--single .select2-selection__rendered {
    width: 100%;
    padding-left: 1rem;
    padding-right: 3.25rem;
    color: #222f36;
    line-height: 1.5;
}

.refo-enhanced-select .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--bs-secondary-color, #8f8f97);
}

.refo-enhanced-select .select2-container--default .select2-selection--single .select2-selection__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    right: 1rem;
    width: 16px;
    height: 100%;
    pointer-events: none;
}

.refo-enhanced-select .select2-container--default .select2-selection--single .select2-selection__arrow b {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 12px;
    margin: 0;
    border: 0;
    transform: translate(-50%, -50%);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23222f36' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 12px;
}

.refo-enhanced-select .select2-container--default.select2-container--open .select2-selection--single,
.refo-enhanced-select .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #5f4afe;
    box-shadow: 0 0 0 0.2rem rgba(95, 74, 254, 0.18), 0 14px 32px rgba(34, 47, 54, 0.08);
}

.refo-enhanced-select .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #f4f5fb;
    box-shadow: none;
    cursor: not-allowed;
}

.refo-enhanced-select .select2-container--default .select2-selection--multiple {
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(123, 97, 255, 0.18);
    background: #fff;
    box-shadow: 0 8px 20px rgba(34, 47, 54, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    padding: 0.35rem 2.75rem 0.35rem 0.5rem;
}

.refo-enhanced-select .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0;
}

.refo-enhanced-select .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    margin-top: 0;
    min-height: 28px;
    font-size: 0.95rem;
}

.refo-enhanced-select .select2-container--default .select2-selection--multiple .select2-selection__choice {
    margin-top: 0;
    border: 1px solid #c7d7fe;
    background: #eef4ff;
    color: #1d4ed8;
    border-radius: 999px;
    position: relative;
    padding: 0.22rem 1.45rem 0.22rem 0.55rem;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
}

.refo-enhanced-select .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    position: absolute;
    top: 50%;
    right: 0.38rem;
    transform: translateY(-50%);
    margin-right: 0;
    color: inherit;
    border-right: 0;
    line-height: 1;
}

.refo-enhanced-select .select2-container--default.select2-container--open .select2-selection--multiple,
.refo-enhanced-select .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #5f4afe;
    box-shadow: 0 0 0 0.2rem rgba(95, 74, 254, 0.18), 0 14px 32px rgba(34, 47, 54, 0.08);
}

.refo-enhanced-select .select2-dropdown {
    overflow: hidden;
    border: 1px solid rgba(123, 97, 255, 0.18) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 40px rgba(34, 47, 54, 0.14);
}

.refo-enhanced-select .select2-search--dropdown {
    padding: 10px;
}

.refo-enhanced-select .select2-search--dropdown .select2-search__field {
    min-height: 40px;
    border: 1px solid rgba(123, 97, 255, 0.18);
    border-radius: 10px;
    padding: 8px 12px;
}

.refo-enhanced-select .select2-results__option {
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.45;
}

.refo-enhanced-select .select2-results__option--highlighted.select2-results__option--selectable {
    background: rgba(95, 74, 254, 0.08);
    color: #4a3fee;
}

.refo-enhanced-select .select2-results__option--selected {
    background: rgba(95, 74, 254, 0.12);
    color: #2f2a52;
}

.refo-enhanced-select--register-select .select2-container--default .select2-selection--single {
    min-height: calc(1.5em + 1.25rem + calc(var(--bs-border-width, 1px) * 2));
    border-color: var(--refo-line-strong);
    border-radius: 1rem;
    box-shadow: none;
}

.refo-enhanced-select--register-select .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 1.375rem;
    padding-right: 4.125rem;
    font-size: 0.875rem;
}

.refo-enhanced-select--register-select .select2-container--default.select2-container--open .select2-selection--single,
.refo-enhanced-select--register-select .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: rgba(var(--bs-primary-rgb), 0.36);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.12);
}

.refo-enhanced-select--review-topic-select .select2-container--default .select2-selection--single,
.refo-enhanced-select--review-corpus-select .select2-container--default .select2-selection--single {
    min-height: 48px;
    border-radius: 0.9rem;
    border: 1px solid rgba(41, 31, 74, 0.12);
    box-shadow: none;
}

.refo-enhanced-select--review-topic-select .select2-container--default .select2-selection--single .select2-selection__rendered,
.refo-enhanced-select--review-corpus-select .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 14px;
    padding-right: 42px;
    font-size: 15px;
    color: #2d2d33;
}

.refo-enhanced-select--review-topic-select .select2-container--default.select2-container--open .select2-selection--single,
.refo-enhanced-select--review-topic-select .select2-container--default.select2-container--focus .select2-selection--single,
.refo-enhanced-select--review-corpus-select .select2-container--default.select2-container--open .select2-selection--single,
.refo-enhanced-select--review-corpus-select .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: rgba(84, 62, 150, 0.45);
    box-shadow: 0 0 0 4px rgba(84, 62, 150, 0.12);
}

.refo-enhanced-select--form-select .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 1rem;
    padding-right: 3.5rem;
}

.refo-enhanced-select--service-stage-account-select .select2-container--default .select2-selection--single {
    min-height: 46px;
}

.form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23222f36' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    min-height: 46px;
    padding: 0.625rem 3.5rem 0.625rem 1rem;
    border-width: 1px;
    border-style: solid;
    border-color: rgba(123, 97, 255, 0.18);
    border-radius: 12px;
    background-color: #fff;
    background-image: var(--bs-form-select-bg-img);
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    box-shadow: 0 8px 20px rgba(34, 47, 54, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
}

.form-select:hover {
    border-color: rgba(95, 74, 254, 0.32);
    box-shadow: 0 12px 28px rgba(34, 47, 54, 0.08);
}

.form-select:focus {
    border-color: #5f4afe;
    box-shadow: 0 0 0 0.2rem rgba(95, 74, 254, 0.18), 0 14px 32px rgba(34, 47, 54, 0.08);
}

.form-select:disabled {
    cursor: not-allowed;
    background-color: #f4f5fb;
    box-shadow: none;
}

.form-select option {
    color: #222f36;
    background-color: #fff;
}

.form-select optgroup {
    color: #5f4afe;
    background-color: #f7f5ff;
    font-style: normal;
    font-weight: 700;
}

@supports selector(select:open) {
    .form-select:open {
        border-color: #5f4afe;
        box-shadow: 0 0 0 0.2rem rgba(95, 74, 254, 0.18), 0 14px 32px rgba(34, 47, 54, 0.08);
    }
}

.service-stage-account-summary {
    display: grid;
    gap: 6px;
    align-content: center;
}

.service-stage-account-summary strong {
    font-size: 16px;
    color: var(--text);
}

.service-stage-account-summary span {
    font-size: 14px;
    line-height: 1.45;
}

.service-stage-account-note {
    color: #7c3aed;
}

.service-stage-account-error {
    color: #b42318;
}

.service-stage-readiness {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.service-stage-readiness-item {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid rgba(var(--bs-purple-rgb), 0.12);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(25, 24, 34, 0.04);
}

.service-stage-readiness-item-ready {
    border-color: rgba(22, 163, 74, 0.18);
    background: linear-gradient(180deg, rgba(22, 163, 74, 0.05), rgba(22, 163, 74, 0.02));
}

.service-stage-readiness-item-warning {
    border-color: rgba(217, 119, 6, 0.18);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.07), rgba(245, 158, 11, 0.03));
}

.service-stage-readiness-item-error {
    border-color: rgba(185, 28, 28, 0.18);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.06), rgba(239, 68, 68, 0.02));
}

.service-stage-readiness-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.service-stage-readiness-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.service-stage-readiness-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(var(--bs-purple-rgb), 0.1);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.service-stage-readiness-item-ready .service-stage-readiness-chip {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.service-stage-readiness-item-warning .service-stage-readiness-chip {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.service-stage-readiness-item-error .service-stage-readiness-chip {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

.service-stage-readiness-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
}

.service-stage-notice {
    margin-top: 0;
}

.service-stage-notice-list {
    margin: 0;
}

.service-stage-table-wrap {
    border: 1px solid rgba(var(--bs-purple-rgb), 0.1);
    border-radius: 16px;
    background: var(--bs-card-bg);
    box-shadow: 0 10px 24px rgba(25, 24, 34, 0.05);
    overflow-x: auto;
}

.service-stage-table {
    width: 100%;
    margin-bottom: 0;
    --bs-table-bg: #fff;
    --bs-table-border-color: var(--bs-border-color-translucent);
    --bs-table-striped-bg: #f6f6f9;
    --bs-table-hover-bg: rgba(var(--bs-emphasis-color-rgb), 0.075);
    --bs-table-hover-color: var(--bs-emphasis-color);
}

.service-stage-table th,
.service-stage-table td {
    padding: 12px 24px;
    font-size: 15px;
    line-height: 1.45;
    vertical-align: middle;
}

.service-stage-table th {
    font-weight: 700;
    color: var(--bs-emphasis-color);
    background: #fff;
    text-align: left;
    white-space: nowrap;
}

.service-stage-table td {
    text-align: left;
    color: var(--bs-emphasis-color);
}

.service-stage-table td:first-child {
    font-weight: 600;
    color: var(--text);
}

.service-stage-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.service-stage-status-queued {
    background: rgba(62, 96, 213, 0.08);
    color: var(--brand-dark);
}

.service-stage-status-running {
    background: rgba(245, 158, 11, 0.16);
    color: #9a6700;
}

.service-stage-status-success {
    background: rgba(34, 197, 94, 0.18);
    color: #166534;
}

.service-stage-status-verified {
    background: rgba(34, 197, 94, 0.18);
    color: #166534;
}

.service-stage-status-prepared {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.service-stage-status-exists {
    background: rgba(16, 185, 129, 0.12);
    color: #0f6b53;
}

.service-stage-status-already_verified {
    background: rgba(16, 185, 129, 0.12);
    color: #0f6b53;
}

.service-stage-status-already_set {
    background: rgba(16, 185, 129, 0.12);
    color: #0f6b53;
}

.service-stage-status-verification_pending {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.service-stage-status-needs_confirmation {
    background: rgba(245, 158, 11, 0.16);
    color: #9a6700;
}

.service-stage-status-skipped {
    background: rgba(107, 114, 128, 0.12);
    color: #4b5563;
}

.service-stage-status-error {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

.service-stage-status-paused {
    background: rgba(107, 114, 128, 0.16);
    color: #374151;
}

.service-stage-status-cell {
    min-width: 340px;
}

.service-stage-status-meta {
    display: grid;
    grid-template-columns: max-content max-content minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.service-stage-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.12);
    color: #4338ca;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.service-stage-status-note {
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}

.service-stage-empty {
    color: var(--muted);
}

.service-stage-results {
    display: grid;
    gap: 18px;
}

.service-stage-upload-meta-inline {
    min-width: 0;
    justify-items: start;
    text-align: left;
}

.service-stage-domain-cell {
    display: grid;
    gap: 4px;
}

.service-stage-secondary-text {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
}

.service-stage-monitor-link {
    margin-top: 12px;
}

.worker-monitor-shell {
    display: grid;
    gap: 24px;
}

.worker-monitor-header {
    gap: 16px;
}

.worker-monitor-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.worker-monitor-status-panel {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(var(--bs-purple-rgb), 0.12);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(var(--bs-purple-rgb), 0.12), transparent 36%),
        linear-gradient(135deg, rgba(var(--bs-purple-rgb), 0.05), rgba(62, 96, 213, 0.04));
}

.worker-monitor-status-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.worker-monitor-status-main {
    display: grid;
    gap: 12px;
    max-width: 780px;
}

.worker-monitor-status-message {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--bs-emphasis-color);
}

.worker-monitor-status-meta {
    display: grid;
    gap: 6px;
    min-width: 220px;
    font-size: 13px;
    color: var(--muted);
    text-align: right;
}

.worker-monitor-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.worker-monitor-summary-card {
    display: grid;
    gap: 8px;
    padding: 20px 22px;
    border: 1px solid rgba(var(--bs-purple-rgb), 0.08);
    box-shadow: 0 12px 32px rgba(25, 24, 34, 0.05);
}

.worker-monitor-summary-label {
    font-size: 13px;
    line-height: 1.4;
    color: var(--muted);
}

.worker-monitor-summary-value {
    font-size: 30px;
    line-height: 1;
    color: var(--text);
}

.worker-monitor-summary-note {
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}

.worker-monitor-empty {
    padding: 20px 22px;
    border: 1px dashed rgba(var(--bs-purple-rgb), 0.22);
    border-radius: 18px;
    background: rgba(var(--bs-purple-rgb), 0.03);
    color: var(--muted);
}

.worker-monitor-queue-note {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.worker-monitor-queue-list {
    display: grid;
    gap: 12px;
}

.worker-monitor-queue-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 18px 20px;
    border: 1px solid rgba(var(--bs-purple-rgb), 0.12);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(25, 24, 34, 0.05);
}

.worker-monitor-queue-item.is-reorderable {
    cursor: grab;
}

.worker-monitor-queue-item.is-reorderable:hover {
    border-color: rgba(var(--bs-purple-rgb), 0.26);
    box-shadow: 0 18px 42px rgba(var(--bs-purple-rgb), 0.08);
}

.worker-monitor-queue-item.is-running {
    border-color: rgba(62, 96, 213, 0.18);
    background:
        radial-gradient(circle at top right, rgba(var(--bs-purple-rgb), 0.08), transparent 42%),
        #fff;
}

.worker-monitor-queue-item.is-dragging {
    opacity: 0.55;
    transform: scale(0.99);
}

.worker-monitor-queue-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    user-select: none;
}

.worker-monitor-queue-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.worker-monitor-queue-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.worker-monitor-queue-name {
    font-weight: 700;
    color: var(--text);
}

.worker-monitor-queue-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.worker-monitor-cell {
    display: grid;
    gap: 4px;
}

.worker-monitor-cell-note {
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}

.worker-monitor-cell,
.worker-monitor-cell strong,
.worker-monitor-cell-note,
.worker-monitor-queue-name,
.worker-monitor-queue-note,
.worker-monitor-history-item strong,
.worker-monitor-history-item p {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.worker-monitor-row-stalled td {
    background: rgba(239, 68, 68, 0.04);
}

.worker-monitor-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.worker-monitor-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(var(--bs-purple-rgb), 0.16);
    border-radius: 999px;
    background: rgba(var(--bs-purple-rgb), 0.08);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.worker-monitor-action-button:hover {
    background: rgba(var(--bs-purple-rgb), 0.14);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(var(--bs-purple-rgb), 0.12);
    color: var(--brand-dark);
}

.worker-monitor-action-button.is-muted {
    background: rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.18);
    color: #4b5563;
}

.worker-monitor-action-button.is-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.18);
    color: #991b1b;
}

.worker-monitor-action-button[disabled] {
    opacity: 0.55;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.worker-monitor-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.worker-monitor-detail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.worker-monitor-summary-value-small {
    font-size: 18px;
    line-height: 1.35;
}

.worker-monitor-history {
    display: grid;
    gap: 12px;
}

.worker-monitor-history-item {
    display: grid;
    gap: 8px;
    padding: 18px 20px;
    border: 1px solid rgba(var(--bs-purple-rgb), 0.1);
    border-radius: 18px;
    background: #fff;
}

.worker-monitor-history-item strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

.worker-monitor-history-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.worker-monitor-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 991px) {
    .worker-monitor-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .worker-monitor-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .worker-monitor-status-meta {
        min-width: 0;
        text-align: left;
    }

    .worker-monitor-queue-item {
        grid-template-columns: 24px minmax(0, 1fr);
    }

    .worker-monitor-queue-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .worker-monitor-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .worker-monitor-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-stage-account-panel {
        grid-template-columns: minmax(0, 1fr);
        padding: 16px;
    }

    .service-stage-readiness {
        grid-template-columns: minmax(0, 1fr);
    }
}

.service-stage-file-meta {
    display: grid;
    gap: 8px;
    min-width: 240px;
}

.service-stage-file-name-text {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
}

.service-stage-file-body {
    padding: 10px 12px;
    border: 1px solid rgba(var(--bs-emphasis-color-rgb), 0.08);
    border-radius: 12px;
    background: #f6f6f9;
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
}

.yandex-recrawl-textarea {
    min-height: 260px;
}

.list-compare-card {
    display: grid;
    gap: 24px;
    background:
        radial-gradient(circle at top right, rgba(var(--bs-primary-rgb), 0.08), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 255, 0.96) 100%);
}

.list-compare-header p {
    max-width: 760px;
}

.list-compare-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.list-compare-panel {
    display: grid;
    gap: 12px;
}

.list-compare-panel-wide {
    gap: 14px;
}

.list-compare-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.list-compare-panel-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--bs-heading-color, #2d2d33);
}

.list-compare-panel-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.list-compare-textarea,
.list-compare-output {
    min-height: 220px;
}

.list-compare-output-common {
    min-height: 180px;
}

.list-compare-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    overflow-x: auto;
}

.list-compare-action-button,
.list-compare-clear-button {
    min-height: 52px;
    min-width: 176px;
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
}

.list-compare-copy-button[disabled] {
    opacity: 0.58;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .list-compare-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .list-compare-action-button,
    .list-compare-clear-button {
        min-width: 156px;
    }
}

.service-stage-url-cell {
    word-break: break-word;
}

.service-stage-url-value {
    display: inline-block;
    color: var(--text);
}

@media (max-width: 1199.98px) {
    .meta-workspace-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .meta-editor-zone {
        grid-column: 1 / -1;
    }

    .refo-user-card {
        box-shadow: none;
    }
}

@media (max-width: 991.98px) {
    .meta-workspace-grid,
    .meta-editor-grid,
    .meta-toolbar-head,
    .meta-generator-settings-grid {
        grid-template-columns: 1fr;
    }

    .meta-ai-prompts-grid {
        grid-template-columns: 1fr;
    }

    .review-corpus-layout,
    .review-corpus-summary-grid,
    .review-corpus-form-grid,
    .review-topic-form,
    .review-note-grid {
        grid-template-columns: 1fr;
    }

    .service-stage-upload-top,
    .service-stage-upload-actions,
    .service-stage-process-buttons {
        align-items: stretch;
    }

    .service-stage-upload-top,
    .service-stage-upload-meta {
        justify-items: stretch;
        justify-content: stretch;
        text-align: left;
    }

    .service-stage-upload-button,
    .service-stage-clear-button,
    .service-stage-submit,
    .service-stage-process-button {
        width: 100%;
    }

    .service-stage-status-cell {
        min-width: 0;
    }
}

.kb-hero-card h2,
.kb-catalog-group h2,
.kb-article-header h2 {
    margin-bottom: 0.85rem;
}

.kb-hero-side {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
}

.kb-hero-stats {
    display: grid;
    gap: 0.35rem;
}

.kb-hero-stat-value {
    font-size: clamp(1.8rem, 1.35rem + 1vw, 2.5rem);
    line-height: 1;
    font-weight: 800;
    color: var(--bs-heading-color, #1f1f21);
}

.kb-hero-stat-label {
    color: var(--muted);
    line-height: 1.55;
}

.kb-tool-grid {
    align-items: stretch;
}

.kb-tool-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kb-tool-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.kb-tool-card-head h3 {
    margin: 0;
}

.kb-tool-title-link {
    color: inherit;
    text-decoration: none;
}

.kb-tool-title-link:hover {
    color: var(--bs-primary);
}

.kb-tool-actions,
.kb-article-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.kb-tool-action,
.kb-article-action {
    min-height: 2.75rem;
}

.kb-article-shell {
    padding: 0;
    overflow: hidden;
}

.kb-article-header {
    padding: 1.5rem 1.75rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--refo-line);
}

.kb-article-header .meta-chip {
    display: inline-flex;
    margin-bottom: 0.9rem;
}

.kb-article-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
}

.kb-article-nav {
    position: sticky;
    top: 5.5rem;
    align-self: start;
    padding: 1.5rem;
    border-right: 1px solid var(--refo-line);
    background: linear-gradient(180deg, rgba(var(--bs-primary-rgb), 0.04), rgba(255, 255, 255, 0.95));
}

.kb-article-nav-card {
    display: grid;
    gap: 1rem;
}

.kb-article-nav-caption {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.kb-article-nav-list {
    display: grid;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.kb-article-nav-link {
    display: block;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.85);
    color: var(--bs-body-color, #2d2c34);
    line-height: 1.45;
    text-decoration: none;
}

.kb-article-nav-link:hover {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.08);
}

.kb-article-content {
    padding: 1.75rem;
}

.kb-article-content p,
.kb-article-content li {
    font-size: 0.98rem;
    line-height: 1.72;
    color: var(--bs-body-color, #2d2c34);
}

.kb-article-content p {
    margin-bottom: 1rem;
}

.kb-article-content h2,
.kb-article-content h3 {
    color: var(--bs-heading-color, #1f1f21);
}

.kb-article-content h2 {
    margin-bottom: 0.9rem;
    font-size: clamp(1.2rem, 1.05rem + 0.35vw, 1.5rem);
}

.kb-article-content h3 {
    margin: 1.2rem 0 0.7rem;
    font-size: 1.05rem;
}

.kb-article-section + .kb-article-section {
    margin-top: 1.8rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--refo-line);
}

.kb-article-list {
    margin: 0 0 1rem;
    padding-left: 1.35rem;
}

.kb-article-content code {
    padding: 0.18rem 0.4rem;
    border-radius: 0.45rem;
    background: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
    font-size: 0.92em;
}

.kb-article-content a {
    color: var(--bs-primary);
}

@media (max-width: 991.98px) {
    .kb-article-layout {
        grid-template-columns: 1fr;
    }

    .kb-article-nav {
        position: static;
        top: auto;
        border-right: 0;
        border-bottom: 1px solid var(--refo-line);
    }
}

@media (max-width: 640px) {
    .keyword-textarea,
    .keyword-result-output,
    .keyword-buffer-output {
        min-height: 192px;
    }

    .translit-source-input,
    .translit-result-output {
        min-height: 160px;
    }

    .meta-helper-row {
        grid-template-columns: minmax(0, 1fr) 42px 88px;
    }

    .meta-field-description,
    .meta-field-text,
    .meta-stop-words-input {
        min-height: 96px;
    }

    .meta-competitor-engine-wrap {
        width: 100%;
        min-width: 0;
    }

    .kb-tool-card-head {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 767.98px) {
    .app-header {
        padding: 0.9rem 1rem;
    }

    .review-corpus-action-row .keyword-main-button,
    .review-corpus-action-row .keyword-action-button {
        width: 100%;
    }

    .refo-user-card,
    .refo-topbar-logout {
        width: 100%;
    }
}

.project-positions-page .notice {
    margin-bottom: 0;
}

.project-positions-dashboard-card {
    display: grid;
    gap: 1rem;
}

.project-positions-page-title-bar {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.08);
}

.project-positions-page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-positions-page-title-row h2 {
    margin: 0;
}

.project-positions-list-filters {
    align-items: center;
    gap: 0.65rem;
}

.project-positions-tags-filter {
    min-width: 18rem !important;
}

.project-positions-tags-filter .refo-enhanced-select,
.project-positions-tags-filter .form-select {
    min-width: 18rem;
    max-width: 100%;
}

.project-positions-page-title-copy p {
    margin: 0.75rem 0 0;
    max-width: 980px;
}

.project-positions-create-button {
    min-height: 44px;
}

.project-positions-demo-notice {
    margin-top: 0;
}

.project-positions-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(30, 41, 59, 0.08);
    border-radius: 1rem;
    background: #fff;
}

.project-positions-table {
    width: 100%;
    min-width: 1240px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.84rem;
}

.project-positions-table thead th {
    padding: 0.85rem 0.8rem;
    background: #f8fafc;
    border-bottom: 1px solid rgba(30, 41, 59, 0.08);
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    white-space: nowrap;
}

.project-positions-table tbody td {
    padding: 0.95rem 0.8rem;
    border-top: 1px solid rgba(30, 41, 59, 0.08);
    vertical-align: top;
}

.project-positions-table tbody td.project-positions-cell-middle {
    vertical-align: middle;
}

.project-positions-table tbody tr:first-child td {
    border-top: 0;
}

.project-positions-table tbody tr:hover {
    background: rgba(248, 250, 252, 0.78);
}

.project-positions-table tbody tr.is-selected {
    background: rgba(219, 234, 254, 0.34);
}

.project-positions-table tbody tr.is-demo {
    background: rgba(255, 244, 214, 0.35);
}

.project-positions-col-project {
    width: 32%;
    min-width: 320px;
}

.project-positions-col-action {
    width: 96px;
    text-align: center;
}

.project-positions-project-cell {
    min-width: 280px;
}

.project-positions-project-name-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.project-positions-project-name {
    font-size: 0.96rem;
    line-height: 1.35;
    color: #0f172a;
}

.project-positions-project-name a {
    color: inherit;
    text-decoration: none;
}

.project-positions-project-name a:hover,
.project-positions-project-name a:focus-visible {
    text-decoration: underline;
}

.project-positions-project-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.8rem;
    margin-top: 0.35rem;
    color: #475569;
    line-height: 1.45;
}

.project-positions-project-links a {
    color: var(--brand);
    font-weight: 700;
}

.project-positions-project-link-muted {
    color: #94a3b8;
    font-weight: 700;
}

.project-positions-table tbody tr.is-demo .project-positions-project-links a {
    pointer-events: none;
    color: #94a3b8;
}

.project-positions-project-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.45;
}

.project-positions-tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.52rem;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #d4dbe4;
    color: #556274;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.project-positions-project-progress {
    display: grid;
    gap: 0.28rem;
    margin-top: 0.45rem;
    max-width: 16rem;
}

.project-positions-project-progress[hidden] {
    display: none !important;
}

.project-positions-project-progress-inline {
    margin-top: 0.65rem;
    max-width: 18rem;
}

.project-positions-project-progress-inline.is-secondary {
    margin-top: 0.32rem;
}

.project-positions-project-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.2;
}

.project-positions-project-progress-meta.is-secondary {
    font-size: 0.7rem;
    color: #94a3b8;
}

.project-positions-project-progress-bar {
    position: relative;
    height: 0.38rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.project-positions-project-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
    min-width: 0.38rem;
}

.project-positions-project-progress-bar.is-chunk {
    height: 0.24rem;
    background: #e5edf6;
}

.project-positions-project-progress-bar.is-chunk span {
    background: linear-gradient(90deg, #34d399 0%, #16a34a 100%);
    min-width: 0;
}

.project-positions-action-cell {
    text-align: center;
    vertical-align: middle !important;
}

.project-positions-rerun-form {
    display: flex;
    justify-content: center;
}

.project-positions-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid rgba(62, 96, 213, 0.16);
    border-radius: 0.8rem;
    background: rgba(62, 96, 213, 0.08);
    color: var(--brand);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.project-positions-icon-button:hover {
    transform: translateY(-1px);
    background: rgba(62, 96, 213, 0.14);
    box-shadow: 0 10px 24px rgba(62, 96, 213, 0.12);
}

.project-positions-icon-button:disabled,
.project-positions-table tbody tr.is-demo .project-positions-icon-button {
    opacity: 0.42;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.project-positions-icon-button.is-running {
    background: rgba(62, 96, 213, 0.12);
    border-color: rgba(62, 96, 213, 0.28);
}

.project-positions-icon-button.is-running span {
    display: inline-block;
    animation: project-positions-spin 0.95s linear infinite;
}

.project-positions-icon-button.is-running:disabled {
    opacity: 0.72;
}

@keyframes project-positions-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.project-positions-table-number {
    font-size: 1rem;
    font-weight: 400;
    color: #64748b;
}

.project-positions-bucket-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
}

.project-positions-bucket-value-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    white-space: nowrap;
}

.project-positions-bucket-share {
    font-size: 0.8rem;
    font-weight: 400;
    color: #64748b;
}

.project-positions-table-metric {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 88px;
    white-space: nowrap;
}

.project-positions-table-metric strong {
    font-size: 1rem;
    line-height: 1.2;
    color: #0f172a;
}

.project-positions-table-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.24rem;
    width: fit-content;
    min-height: 1.4rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.project-positions-table-delta-positive {
    background: rgba(4, 120, 87, 0.1);
    color: #047857;
}

.project-positions-table-delta-negative {
    background: rgba(185, 28, 28, 0.1);
    color: #b91c1c;
}

.project-positions-table-delta-muted {
    background: rgba(100, 116, 139, 0.12);
    color: #64748b;
}

.project-positions-table-empty {
    color: #94a3b8;
    font-weight: 700;
}

.project-positions-dynamics {
    display: grid;
    gap: 0.35rem;
    min-width: 118px;
}

.project-positions-dynamics-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.35;
}

.project-positions-dynamics-item.is-up {
    color: #047857;
}

.project-positions-dynamics-item.is-flat {
    color: #64748b;
}

.project-positions-dynamics-item.is-down {
    color: #b91c1c;
}

.project-positions-buckets {
    display: grid;
    gap: 0.4rem;
    min-width: 170px;
}

.project-positions-buckets.is-google .project-positions-bucket-item:last-child {
    display: none;
}

.project-positions-bucket-item {
    display: grid;
    grid-template-columns: 52px max-content max-content;
    align-items: center;
    gap: 0.45rem;
}

.project-positions-bucket-label {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
}

.project-positions-form {
    display: grid;
    gap: 1rem;
}

.project-positions-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.project-positions-field {
    display: grid;
    gap: 0.45rem;
}

.project-positions-field > span {
    font-size: 0.92rem;
    color: #475569;
    font-weight: 600;
}

.project-positions-field code {
    font-size: 0.84rem;
}

.project-positions-engine-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.2rem;
}

.project-positions-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    min-height: 2rem;
    padding-left: 0;
}

.project-positions-checkbox .form-check-input {
    float: none;
    margin: 0;
}

.project-positions-checkbox .form-check-label {
    margin: 0;
    color: #334155;
    font-weight: 500;
    cursor: pointer;
}

.project-positions-keyword-master-check {
    flex-wrap: nowrap;
}

.project-positions-day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.55rem;
}

.project-positions-day-cell {
    position: relative;
}

.project-positions-day-cell input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.project-positions-day-cell span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(30, 41, 59, 0.12);
    background: #fff;
    font-weight: 600;
    color: #0f172a;
}

.project-positions-day-cell input:checked + span {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1d4ed8;
}

.project-positions-hosts-textarea,
.project-positions-keywords-textarea {
    min-height: 9rem;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92rem;
}

.project-positions-actions,
.project-positions-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-positions-inline-run-form {
    margin: 0;
}

.project-positions-inline-run-form .secondary-button[disabled] {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.project-positions-actions {
    margin-bottom: 1.5rem;
}

.project-positions-danger-button {
    color: #991b1b;
    border-color: rgba(153, 27, 27, 0.2);
}

.project-positions-filter-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.project-positions-filter-actions {
    display: flex;
    align-items: flex-end;
}

.project-positions-view-stack {
    display: grid;
    gap: 1rem;
}

.project-positions-screen-card,
.project-positions-report-card,
.project-positions-positions-card {
    display: grid;
    gap: 0.8rem;
}

.project-positions-positions-toolbar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 0;
}

.project-positions-filter-actions-wide {
    gap: 0.75rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.project-positions-competitors-dialog {
    width: min(760px, calc(100vw - 2rem));
    max-width: 760px;
    border: 0;
    border-radius: 24px;
    padding: 1.15rem 1.15rem 1rem;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.project-positions-competitors-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
}

.project-positions-competitors-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-positions-competitors-head h3 {
    margin: 0;
    font-size: 1.05rem;
}

.project-positions-competitors-head p {
    margin: 0.3rem 0 0;
    color: #64748b;
    font-size: 0.88rem;
}

.project-positions-competitors-close {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: #eef2ff;
    color: #334155;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.project-positions-competitors-table-wrap {
    max-height: min(70vh, 680px);
    overflow: auto;
}

.project-positions-competitors-table {
    width: 100%;
    border-collapse: collapse;
}

.project-positions-competitors-table th,
.project-positions-competitors-table td {
    padding: 0.65rem 0.7rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.project-positions-competitors-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.project-positions-competitors-table td:first-child,
.project-positions-competitors-table th:first-child {
    width: 3.5rem;
}

.project-positions-competitors-table td:nth-child(3),
.project-positions-competitors-table td:nth-child(4) {
    text-align: right;
}

.project-positions-competitors-table td:nth-child(5),
.project-positions-competitors-table th:nth-child(5) {
    width: 5.75rem;
    text-align: center;
}

.project-positions-competitors-table tbody tr.is-target-host {
    background: rgba(251, 191, 36, 0.09);
}

.project-positions-competitor-host {
    font-weight: 600;
    color: #0f172a;
}

.project-positions-competitor-delta {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.project-positions-competitor-delta.is-up {
    color: #16a34a;
}

.project-positions-competitor-delta.is-down {
    color: #dc2626;
}

.project-positions-competitor-delta.is-flat,
.project-positions-competitor-delta.is-empty {
    color: #94a3b8;
}

.project-positions-competitor-trend-cell {
    text-align: center !important;
}

.project-positions-competitor-sparkline {
    width: 4.25rem;
    height: 1.2rem;
    display: inline-block;
    overflow: visible;
}

.project-positions-competitor-sparkline-line {
    fill: none;
    stroke: #94a3b8;
    stroke-width: 1.7px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-positions-competitor-sparkline-point {
    fill: #2563eb;
    stroke: #ffffff;
    stroke-width: 0.8px;
}

.project-positions-report-table-wrap,
.project-positions-positions-table-wrap {
    overflow: auto;
}

.project-positions-report-table {
    width: max-content;
    min-width: max-content;
    border-collapse: separate;
    border-spacing: 0.28rem;
}

.project-positions-report-table th,
.project-positions-report-table td {
    padding: 0.48rem 0.56rem;
    text-align: center;
    white-space: nowrap;
    font-size: 0.76rem;
    line-height: 1.15;
}

.project-positions-report-table thead th:not(.project-positions-report-label),
.project-positions-report-table tbody td.project-positions-report-cell {
    width: 4.9rem;
    min-width: 4.9rem;
    max-width: 4.9rem;
}

.project-positions-report-label {
    position: sticky;
    left: 0;
    z-index: 2;
    text-align: left !important;
    color: #0f172a;
    background: #ffffff;
    font-weight: 700;
    min-width: 7.2rem;
}

.project-positions-report-cell {
    border-radius: 10px;
    font-weight: 700;
    color: #0f172a;
    background: #f8fafc;
}

.project-positions-report-cell.is-low {
    background: #fecaca;
}

.project-positions-report-cell.is-warm {
    background: #fdba74;
}

.project-positions-report-cell.is-mid {
    background: #fde68a;
}

.project-positions-report-cell.is-good {
    background: #bbf7d0;
}

.project-positions-report-cell.is-high {
    background: #86efac;
}

.project-positions-report-cell.is-empty {
    background: #f1f5f9;
    color: #94a3b8;
}

.project-positions-report-cell.is-average {
    background: #eff6ff;
    color: #1d4ed8;
}

.project-positions-chart-empty {
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    background: #f8fafc;
}

.project-positions-positions-table {
    width: max-content;
    min-width: max-content;
    border-collapse: separate;
    border-spacing: 0;
}

.project-positions-positions-table th,
.project-positions-positions-table td {
    padding: 0.68rem 0.72rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    font-size: 0.88rem;
    background: #ffffff;
}

.project-positions-positions-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.project-positions-sort-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    color: inherit;
    text-decoration: none;
    font: inherit;
}

.project-positions-sort-link.is-active {
    color: #1d4ed8;
}

.project-positions-sort-link-glyph {
    min-width: 0.9rem;
    color: #1d4ed8;
}

.project-positions-positions-col-keyword {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 20rem;
    max-width: 28rem;
    white-space: normal !important;
    background: #ffffff;
}

.project-positions-positions-table thead .project-positions-positions-col-keyword {
    z-index: 3;
    background: #f8fafc;
}

.project-positions-positions-col-frequency {
    min-width: 8rem;
    text-align: right;
}

.project-positions-positions-col-date,
.project-positions-positions-cell {
    position: relative;
    text-align: center;
    font-weight: 600;
    width: 4.7rem;
    min-width: 4.7rem;
    max-width: 4.7rem;
    padding: 0.32rem 0.4rem !important;
    border-right: 1px solid #d9e2ec;
}

.project-positions-positions-cell.is-empty {
    background: #f8fafc;
    color: #94a3b8;
}

.project-positions-positions-cell.is-top3 {
    background: #c9daf8;
    color: #1e3a8a;
}

.project-positions-positions-cell.is-top10 {
    background: #aeeec7;
    color: #166534;
}

.project-positions-positions-cell.is-top20 {
    background: #d7f7e5;
    color: #166534;
}

.project-positions-positions-cell.is-top30 {
    background: #f8fafc;
    color: #334155;
}

.project-positions-positions-cell.is-top50 {
    background: #f8dfdf;
    color: #7f1d1d;
}

.project-positions-positions-cell.is-beyond {
    background: #f5d7d7;
    color: #7f1d1d;
}

.project-positions-positions-cell-box {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.08rem;
    min-height: auto;
    padding-right: 0;
    width: 100%;
}

.project-positions-positions-value {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
}

.project-positions-positions-delta {
    position: static;
    display: inline-block;
    font-size: 0.54rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.01em;
    transform: translateY(-0.3rem);
    transform-origin: left top;
    white-space: nowrap;
}

.project-positions-positions-delta.is-positive {
    color: #22c55e;
}

.project-positions-positions-delta.is-negative {
    color: #ef4444;
}

.project-positions-positions-delta.is-flat,
.project-positions-positions-delta.is-empty {
    color: #94a3b8;
}

.project-positions-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.project-positions-pagination a,
.project-positions-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.3rem;
    height: 2.3rem;
    padding: 0 0.8rem;
    border-radius: 999px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
}

.project-positions-pagination .is-current {
    border-color: rgba(37, 99, 235, 0.28);
    background: #eff6ff;
    color: #1d4ed8;
}

.project-positions-metric-grid {
    margin-top: 1rem;
}

.project-positions-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-style: normal;
    font-size: 0.88rem;
    font-weight: 600;
}

.project-positions-delta-positive,
.project-positions-growth {
    color: #047857;
}

.project-positions-delta-negative,
.project-positions-fall {
    color: #b91c1c;
}

.project-positions-delta-muted,
.project-positions-flat {
    color: #64748b;
}

.project-positions-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.project-positions-chart-card {
    border: 1px solid rgba(30, 41, 59, 0.08);
    border-radius: 1rem;
    padding: 0.7rem 0.8rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: grid;
    gap: 0.42rem;
}

.project-positions-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.project-positions-chart-head h3 {
    margin: 0;
    font-size: 0.82rem;
}

.project-positions-chart-head span {
    color: #64748b;
    font-size: 0.7rem;
}

.project-positions-chart-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #334155;
    font-size: 0.66rem;
    font-weight: 600;
}

.project-positions-chart-legend-swatch {
    width: 0.95rem;
    height: 0.16rem;
    border-radius: 999px;
    background: #84cc16;
    box-shadow: 0 0 0 2px rgba(132, 204, 22, 0.12);
}

.project-positions-chart-svg {
    width: 100%;
    height: auto;
    max-height: 142px;
    overflow: visible;
    display: block;
}

.project-positions-chart-grid-line {
    stroke: rgba(148, 163, 184, 0.34);
    stroke-width: 1px;
    stroke-dasharray: 4 4;
}

.project-positions-chart-grid-line.is-vertical {
    stroke: rgba(203, 213, 225, 0.7);
    stroke-dasharray: none;
}

.project-positions-chart-axis-line,
.project-positions-chart-axis-tick {
    stroke: rgba(100, 116, 139, 0.55);
    stroke-width: 1px;
}

.project-positions-chart-axis-label {
    fill: #64748b;
    font-size: 10px;
    font-weight: 500;
}

.project-positions-chart-axis-label.is-x {
    fill: #475569;
}

.project-positions-chart-svg circle {
    fill: #84cc16;
    stroke-width: 1.5px;
}

.project-positions-chart-point-label {
    fill: #1d4ed8;
    font-size: 7px;
    font-weight: 600;
}

.project-positions-chart-area {
    stroke: none;
}

.project-positions-chart-area.is-position {
    fill: rgba(132, 204, 22, 0.12);
}

.project-positions-chart-line {
    fill: none;
    stroke-width: 2.2px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-positions-chart-line.is-position,
.project-positions-chart-svg circle {
    stroke: #84cc16;
}

.project-positions-chart-line.is-visibility {
    stroke: #059669;
}

.project-positions-chart-card:nth-child(2) .project-positions-chart-svg circle {
    stroke: #059669;
}

.project-positions-chart-foot {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #475569;
    font-size: 0.68rem;
}

.project-positions-history-table td,
.project-positions-history-table th {
    white-space: nowrap;
}

@media (max-width: 1199.98px) {
    .project-positions-chart-grid,
    .project-positions-filter-form,
    .project-positions-form-grid,
    .project-positions-positions-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .project-positions-chart-grid,
    .project-positions-filter-form,
    .project-positions-form-grid,
    .project-positions-positions-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-positions-chart-foot,
    .project-positions-page-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-positions-create-button {
        width: 100%;
    }
}

@media (max-width: 639.98px) {
    .project-positions-day-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.project-positions-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-positions-editor-title-wrap p {
    margin: 0.4rem 0 0;
    color: #475569;
}

.project-positions-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.project-positions-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: #f8fbff;
    color: #64748b;
}

.project-positions-step.is-current {
    border-color: rgba(37, 99, 235, 0.28);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.08));
    color: #0f172a;
}

.project-positions-step.is-complete {
    border-color: rgba(22, 163, 74, 0.22);
    background: rgba(240, 253, 244, 0.88);
    color: #166534;
}

.project-positions-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid currentColor;
    font-weight: 700;
}

.project-positions-step-text {
    font-weight: 600;
}

.project-positions-wizard-form {
    display: grid;
    gap: 1.5rem;
}

.project-positions-form-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-positions-step-panel {
    display: none;
    gap: 1.25rem;
}

.project-positions-step-panel.is-active {
    display: grid;
}

.project-positions-field-hint {
    margin: 0.55rem 0 0;
    font-size: 0.92rem;
    color: #64748b;
}

.project-positions-inline-error {
    margin: 0.55rem 0 0;
    color: #dc2626;
    font-size: 0.92rem;
    font-weight: 600;
}

.project-positions-engine-picker {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.project-positions-engine-picker .form-select {
    min-width: 20rem;
}

.project-positions-engine-picker .refo-enhanced-select--form-select {
    min-width: 20rem;
}

.project-positions-engine-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.project-positions-engine-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    background: #eef4ff;
    border: 1px solid #c7d7fe;
    color: #1d4ed8;
    font-weight: 600;
}

.project-positions-engine-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3rem;
    height: 1.3rem;
    border: 0;
    border-radius: 999px;
    background: rgba(29, 78, 216, 0.12);
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.project-positions-day-grid-editor {
    gap: 0.55rem;
}

.project-positions-wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding-top: 0.25rem;
}

.project-positions-upload-card {
    display: grid;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: #fbfdff;
}

.project-positions-upload-card h3 {
    margin: 0;
    font-size: 1rem;
}

.project-positions-upload-top {
    display: grid;
    gap: 0.45rem;
}

.project-positions-upload-meta {
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-positions-upload-meta .form-control {
    width: 24rem;
    max-width: 100%;
    min-width: 16rem;
    min-height: 46px;
    height: 46px;
    flex: 0 1 auto;
}

.project-positions-upload-meta .secondary-button {
    min-height: 46px;
    height: 46px;
    padding-inline: 16px;
}

.project-positions-template-button[disabled] {
    opacity: 0.65;
    cursor: default;
}

.project-positions-import-summary {
    color: #475569;
    font-size: 0.95rem;
}

.project-positions-import-actions {
    display: flex;
    justify-content: flex-start;
}

.project-positions-keyword-builder {
    display: grid;
    grid-template-columns: minmax(16rem, 19rem) minmax(0, 1fr);
    gap: 1rem;
}

.project-positions-groups-card,
.project-positions-keywords-card {
    display: grid;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: #ffffff;
}

.project-positions-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.project-positions-section-head h3 {
    margin: 0;
    font-size: 1.02rem;
}

.project-positions-section-head p {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.92rem;
}

.project-positions-inline-form {
    display: flex;
    gap: 0.75rem;
}

.project-positions-inline-form .form-control {
    flex: 1 1 auto;
}

.project-positions-inline-form-compact {
    align-items: end;
    flex-wrap: wrap;
}

.project-positions-inline-form-compact .project-positions-field {
    min-width: 11rem;
}

.project-positions-groups-list {
    display: grid;
    gap: 0.65rem;
}

.project-positions-groups-empty {
    padding: 1rem;
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    background: #f8fafc;
    text-align: center;
}

.project-positions-group-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #f8fbff;
}

.project-positions-group-item.is-selected {
    border-color: rgba(37, 99, 235, 0.32);
    background: rgba(239, 246, 255, 0.95);
}

.project-positions-group-copy {
    display: grid;
    gap: 0.25rem;
}

.project-positions-group-copy strong {
    font-size: 0.96rem;
    color: #0f172a;
}

.project-positions-group-copy span {
    font-size: 0.88rem;
    color: #64748b;
}

.project-positions-group-remove,
.project-positions-keyword-remove {
    width: 1.9rem;
    height: 1.9rem;
    border: 0;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}

.project-positions-keyword-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.project-positions-keywords-table-wrap {
    overflow-x: auto;
}

.project-positions-keywords-table {
    width: 100%;
    border-collapse: collapse;
}

.project-positions-keywords-table th,
.project-positions-keywords-table td {
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.project-positions-keywords-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.project-positions-keywords-table td {
    font-size: 0.94rem;
}

.project-positions-keywords-col-checkbox {
    width: 3rem;
    text-align: center;
}

.project-positions-keywords-col-frequency {
    width: 9rem;
    text-align: right;
}

.project-positions-keywords-col-remove {
    width: 3.25rem;
}

.project-positions-keywords-empty {
    padding: 1rem;
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    background: #f8fafc;
}

.project-positions-editor-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.9rem;
    margin-top: 1.25rem;
}

.project-positions-keyword-actions .secondary-button[disabled] {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.project-positions-table-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding-left: 0;
}

.project-positions-table-check .form-check-input {
    float: none;
    margin: 0;
}

@media (max-width: 980px) {
    .project-positions-editor-head,
    .project-positions-upload-top,
    .project-positions-keyword-builder,
    .project-positions-section-head,
    .project-positions-wizard-actions,
    .project-positions-inline-form,
    .project-positions-engine-picker {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .project-positions-steps,
    .project-positions-form-grid-compact {
        grid-template-columns: 1fr;
    }

    .project-positions-upload-meta {
        align-items: flex-start;
    }

    .project-positions-editor-footer {
        justify-content: stretch;
    }

    .project-positions-positions-col-keyword {
        min-width: 16rem;
    }
}

.project-dashboard-page {
    --project-dashboard-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --project-dashboard-card-shadow: 0 2px 2px -1px rgba(25, 24, 34, 0.1), 0 1px 3px 0 rgba(25, 24, 34, 0.08);
    --project-dashboard-soft-shadow: 0 10px 24px rgba(25, 24, 34, 0.05);
    --project-dashboard-line: rgba(3, 31, 66, 0.08);
    --project-dashboard-project-frame: rgba(226, 232, 240, 0.95);
    font-family: var(--project-dashboard-font-family);
    gap: 1.5rem;
}

.project-dashboard-page button,
.project-dashboard-page input,
.project-dashboard-page select,
.project-dashboard-page textarea {
    font-family: var(--project-dashboard-font-family);
}

.project-dashboard-toolbar-card,
.project-dashboard-form-card,
.project-dashboard-direction-card,
.project-dashboard-project-card,
.project-dashboard-empty-card {
    border: 0;
    border-radius: 0.875rem;
    background: var(--bs-card-bg, #fff);
    box-shadow: var(--project-dashboard-card-shadow);
}

.project-dashboard-toolbar-header,
.project-dashboard-direction-header,
.project-dashboard-project-top,
.project-dashboard-segment-editor-top,
.project-dashboard-project-title-row,
.project-dashboard-segment-title-row,
.project-dashboard-segment-block-top,
.project-dashboard-toolbar-actions,
.project-dashboard-direction-actions,
.project-dashboard-project-actions,
.project-dashboard-form-actions,
.project-dashboard-available-actions,
.project-dashboard-selected-actions,
.project-dashboard-project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.project-dashboard-toolbar-actions,
.project-dashboard-direction-actions,
.project-dashboard-project-actions,
.project-dashboard-form-actions,
.project-dashboard-available-actions,
.project-dashboard-selected-actions {
    justify-content: flex-end;
}

.project-dashboard-toolbar-actions .primary-button,
.project-dashboard-toolbar-actions .secondary-button,
.project-dashboard-direction-actions .primary-button,
.project-dashboard-direction-actions .secondary-button {
    min-height: 2.5rem;
    padding: 0 0.95rem;
    font-size: 0.875rem;
}

.project-dashboard-project-actions {
    margin-left: auto;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.project-dashboard-project-actions form {
    margin: 0;
}

.project-dashboard-project-top {
    justify-content: space-between;
    align-items: flex-start;
}

.project-dashboard-project-top > :first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.project-dashboard-filter-form,
.project-dashboard-form-grid,
.project-dashboard-segment-columns,
.project-dashboard-project-grid,
.project-dashboard-direction-kpi-grid,
.project-dashboard-kpi-grid {
    display: grid;
    gap: 1rem;
}

.project-dashboard-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
}

.project-dashboard-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
}

.project-dashboard-date-field {
    width: min(100%, 10.5rem);
    justify-self: start;
    flex: 0 0 auto;
}

.project-dashboard-date-field input[type="date"] {
    width: 100%;
    min-height: 48px;
    padding-left: 0.75rem;
    padding-right: 0.5rem;
}

.project-dashboard-date-field input[type="date"]::-webkit-calendar-picker-indicator {
    margin: 0;
}

.project-dashboard-engine-field {
    position: relative;
    width: min(100%, 8rem);
    justify-self: start;
    flex: 0 0 auto;
}

.project-dashboard-engine-field::after {
    content: "";
    position: absolute;
    right: 0.75rem;
    bottom: 18px;
    width: 16px;
    height: 12px;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23222f36' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 12px;
}

.project-dashboard-filter-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding-inline: 0.75rem 2rem;
    padding-block: 0.5rem;
    font-size: 15px;
    color: inherit;
    line-height: 1.2;
    outline: none;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    background-position: initial;
    background-size: initial;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-dashboard-filter-select:focus {
    border-color: rgba(15, 108, 189, 0.5);
    box-shadow: 0 0 0 4px rgba(15, 108, 189, 0.1);
}

.project-dashboard-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid rgba(62, 96, 213, 0.16);
    border-radius: 0.8rem;
    background: #fff;
    color: var(--brand);
    font-size: 1.12rem;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-dashboard-icon-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
}

.project-dashboard-icon-button:hover {
    transform: translateY(-1px);
    background: rgba(62, 96, 213, 0.14);
    box-shadow: 0 10px 24px rgba(62, 96, 213, 0.12);
}

.project-dashboard-icon-button:disabled {
    opacity: 0.72;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.project-dashboard-order-button,
.project-dashboard-edit-button {
    border-color: rgba(3, 31, 66, 0.12);
    background: #fff;
    color: #475569;
}

.project-dashboard-order-button:hover,
.project-dashboard-edit-button:hover {
    background: rgba(3, 31, 66, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.project-dashboard-refresh-button.is-running {
    background: rgba(62, 96, 213, 0.12);
    border-color: rgba(62, 96, 213, 0.28);
}

.project-dashboard-refresh-button.is-running span {
    display: inline-block;
    animation: project-dashboard-spin 0.95s linear infinite;
}

@keyframes project-dashboard-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.project-dashboard-segment-mode-tabs {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-dashboard-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0 1rem;
    border: 1px solid rgba(206, 214, 228, 0.92);
    border-radius: 999px;
    background: #fff;
    color: #4c5363;
    font-weight: 600;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.project-dashboard-tab.is-active {
    background: rgba(var(--bs-primary-rgb), 0.12);
    border-color: rgba(var(--bs-primary-rgb), 0.3);
    color: var(--bs-primary);
}

.project-dashboard-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-dashboard-toolbar-card h2,
.project-dashboard-form-card h2,
.project-dashboard-direction-card h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.project-dashboard-toolbar-card p,
.project-dashboard-form-card p,
.project-dashboard-direction-card p,
.project-dashboard-selected-subtitle,
.project-dashboard-segment-subtitle,
.project-dashboard-project-meta,
.project-dashboard-empty-inline {
    font-size: 0.875rem;
    line-height: 1.55;
}

.project-dashboard-checkbox {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    font-weight: 600;
    margin: 0 0 1rem;
    color: #403b53;
    line-height: 1.45;
}

.project-dashboard-form-grid + .project-dashboard-checkbox {
    margin-top: 1rem;
}

.project-dashboard-checkbox input {
    --bs-form-check-bg-image: none;
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0.125rem 0 0;
    vertical-align: top;
    appearance: none;
    background-color: #fff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 0.188rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.project-dashboard-checkbox input:active {
    filter: brightness(96%);
}

.project-dashboard-checkbox input:focus {
    border-color: #5F4AFE;
    outline: 0;
    box-shadow: 0 1px 3px 0 rgba(45, 45, 51, 0.2), 0 0 0 4px rgba(95, 74, 254, 0.12);
}

.project-dashboard-checkbox input:checked {
    background-color: #5F4AFE;
    border-color: #5F4AFE;
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9 1L3.5 6.5L1 4' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-image: var(--bs-form-check-bg-image);
}

.project-dashboard-checkbox input:disabled {
    pointer-events: none;
    filter: none;
    opacity: 0.5;
}

.project-dashboard-checkbox input:disabled + span {
    opacity: 0.5;
}

.project-dashboard-checkbox span {
    cursor: pointer;
}

.project-dashboard-edit-form .form-select {
    min-height: 3.25rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 1rem;
    padding-right: 3rem;
    line-height: 1.25;
    background-position: right 1rem center, 0 0;
}

.project-dashboard-edit-form .field input {
    background: #fff;
}

.project-dashboard-edit-form > .project-dashboard-form-actions {
    margin-top: 1rem;
}

.project-dashboard-edit-form .refo-enhanced-select--form-select .select2-container--default .select2-selection--single {
    min-height: 3.25rem;
}

.project-dashboard-edit-form .refo-enhanced-select--form-select .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-right: 3rem;
    line-height: 1.25;
}

.project-dashboard-edit-form .refo-enhanced-select--form-select .select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 0;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 100%;
}

.project-dashboard-edit-form .refo-enhanced-select--form-select .select2-container--default .select2-selection--single .select2-selection__arrow b {
    position: static;
    margin: 0;
}

.project-dashboard-segment-editor {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border: 0;
    border-radius: 1rem;
    background: #fff;
    box-shadow: var(--project-dashboard-soft-shadow);
}

.project-dashboard-segment-creator {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(3, 31, 66, 0.08);
    border-radius: 1rem;
    background: rgba(246, 248, 252, 0.96);
}

.project-dashboard-segment-editor-panel {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(3, 31, 66, 0.08);
    border-radius: 1rem;
    background: rgba(250, 251, 255, 0.98);
}

.project-dashboard-segment-editor-panel.is-hidden {
    display: none;
}

.project-dashboard-segment-editor-panel input:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.project-dashboard-segment-creator-controls {
    display: flex;
    align-items: flex-end;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.project-dashboard-segment-creator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.9fr);
    gap: 0.85rem;
    align-items: start;
}

.project-dashboard-segment-values-field {
    min-width: 0;
}

.project-dashboard-segment-side {
    display: grid;
    gap: 0.85rem;
    align-content: start;
}

.project-dashboard-segment-side .field {
    min-width: 0;
}

.project-dashboard-segment-side .project-dashboard-form-actions {
    justify-content: flex-start;
    align-items: stretch;
    margin-top: 0;
}

.project-dashboard-segment-side .project-dashboard-form-actions .secondary-button {
    min-height: 2.875rem;
}

.project-dashboard-segment-creator-controls .field {
    flex: 1 1 18rem;
    min-width: min(100%, 18rem);
}

.project-dashboard-segment-values-field textarea,
.project-dashboard-segment-creator-controls .field textarea {
    width: 100%;
    min-height: 7.5rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    outline: none;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}

.project-dashboard-segment-values-field textarea:focus,
.project-dashboard-segment-creator-controls .field textarea:focus {
    border-color: rgba(15, 108, 189, 0.5);
    box-shadow: 0 0 0 4px rgba(15, 108, 189, 0.1);
}

.project-dashboard-segment-values-field textarea:disabled,
.project-dashboard-segment-creator-controls .field textarea:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    background: #f4f5fb;
}

.project-dashboard-segment-values-field textarea::placeholder,
.project-dashboard-segment-creator-controls .field textarea::placeholder {
    color: var(--muted);
}

.project-dashboard-segment-creator-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(49, 89, 185, 0.12);
    color: var(--muted);
    line-height: 1.5;
}

.project-dashboard-segment-creator-note code {
    padding: 0.2rem 0.45rem;
    border-radius: 0.45rem;
    background: rgba(49, 89, 185, 0.08);
    color: #1f3f8f;
    word-break: break-all;
}

.project-dashboard-segment-search-field {
    max-width: 32rem;
}

.project-dashboard-editor-feedback {
    margin-top: 0;
}

.project-dashboard-segment-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-dashboard-segment-column {
    display: grid;
    gap: 0.75rem;
}

.project-dashboard-segment-list,
.project-dashboard-selected-list {
    display: grid;
    gap: 0.75rem;
    min-height: 5rem;
}

.project-dashboard-available-item,
.project-dashboard-selected-item,
.project-dashboard-segment-row {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(206, 214, 228, 0.9);
    border-radius: 1rem;
    background: #fff;
}

.project-dashboard-available-item,
.project-dashboard-selected-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.project-dashboard-selected-item.is-warning,
.project-dashboard-segment-row.is-warning {
    border-color: rgba(255, 193, 7, 0.45);
    background: rgba(255, 248, 225, 0.8);
}

.project-dashboard-available-main,
.project-dashboard-selected-main,
.project-dashboard-segment-main {
    min-width: 0;
}

.project-dashboard-selected-subtitle,
.project-dashboard-segment-subtitle,
.project-dashboard-project-meta,
.project-dashboard-empty-inline {
    color: #6b7280;
}

.project-dashboard-danger-button {
    border-color: rgba(220, 53, 69, 0.26);
    color: #b42318;
    background: rgba(255, 240, 241, 0.96);
}

.project-dashboard-direction-card {
    display: grid;
    gap: 1rem;
}

.project-dashboard-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.project-dashboard-direction-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-dashboard-direction-metric-card {
    border: 1px solid rgba(226, 232, 240, 0.88);
    background: linear-gradient(180deg, #fff 0%, rgba(248, 250, 252, 0.98) 100%);
}

.project-dashboard-project-grid-column {
    display: grid;
    gap: 1rem;
    align-content: start;
    min-width: 0;
}

.project-dashboard-project-card {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--project-dashboard-project-frame);
    background: var(--bs-card-bg, #fff);
    align-self: start;
}

.project-dashboard-project-card.is-inactive {
    opacity: 0.78;
}

.project-dashboard-project-title-row h3,
.project-dashboard-segment-column h3,
.project-dashboard-segment-block-top h3,
.project-dashboard-empty-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.project-dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-dashboard-metric-card {
    --project-dashboard-metric-accent: #2563eb;
    --project-dashboard-metric-accent-soft: rgba(37, 99, 235, 0.22);
    display: grid;
    gap: 0.45rem;
    padding: 1rem 1.125rem;
    border: 0;
    border-radius: 1rem;
    background: var(--bs-card-bg, #fff);
    box-shadow: var(--project-dashboard-soft-shadow);
}

.project-dashboard-metric-label {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.project-dashboard-metric-value {
    font-size: clamp(1.4rem, 2vw, 2rem);
    line-height: 1.1;
}

.project-dashboard-metric-card-yandex {
    --project-dashboard-metric-accent: #ef4444;
    --project-dashboard-metric-accent-soft: rgba(239, 68, 68, 0.2);
}

.project-dashboard-metric-card-google {
    --project-dashboard-metric-accent: #2563eb;
    --project-dashboard-metric-accent-soft: rgba(37, 99, 235, 0.22);
}

.project-dashboard-delta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-weight: 700;
}

.project-dashboard-delta-positive {
    color: #17784b;
}

.project-dashboard-delta-negative {
    color: #b42318;
}

.project-dashboard-delta-neutral {
    color: #6b7280;
}

.project-dashboard-metric-chart {
    position: relative;
    height: 3.4rem;
    margin-top: 0.2rem;
    overflow: visible;
}

.project-dashboard-metric-chart-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    shape-rendering: geometricPrecision;
}

.project-dashboard-metric-chart-stop-start {
    stop-color: var(--project-dashboard-metric-accent-soft);
}

.project-dashboard-metric-chart-stop-end {
    stop-color: rgba(255, 255, 255, 0);
}

.project-dashboard-metric-chart-area {
    opacity: 0.95;
}

.project-dashboard-metric-chart-line {
    fill: none;
    stroke: var(--project-dashboard-metric-accent);
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.project-dashboard-metric-chart-point {
    fill: #fff;
    stroke: var(--project-dashboard-metric-accent);
    stroke-width: 2px;
    vector-effect: non-scaling-stroke;
}

.project-dashboard-metric-chart-point-hover {
    filter: drop-shadow(0 0 0.2rem rgba(15, 23, 42, 0.18));
    display: none;
}

.project-dashboard-metric-chart-hit {
    fill: transparent;
    stroke: transparent;
    cursor: default;
}

.project-dashboard-metric-chart-hit:focus {
    outline: none;
}

.project-dashboard-metric-chart-tooltip {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    max-width: 12rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.96);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, calc(-100% - 0.45rem));
    box-shadow: 0 0.45rem 1rem rgba(15, 23, 42, 0.16);
    transition: opacity 0.16s ease, visibility 0.16s ease;
}

.project-dashboard-metric-chart-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border: 0.32rem solid transparent;
    border-top-color: rgba(31, 41, 55, 0.96);
}

.project-dashboard-metric-chart.is-tooltip-visible .project-dashboard-metric-chart-tooltip {
    opacity: 1;
    visibility: visible;
}

.project-dashboard-sampled-badge {
    display: inline-flex;
    width: fit-content;
    min-height: 1.75rem;
    padding: 0 0.65rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 193, 7, 0.16);
    color: #9f7a00;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.project-dashboard-segment-block {
    display: grid;
    gap: 0.75rem;
}

.project-dashboard-segment-table-wrap {
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.project-dashboard-segment-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.project-dashboard-segment-table th,
.project-dashboard-segment-table td {
    padding: 0.70rem 0.9rem;
    border-bottom: 1px solid var(--project-dashboard-line);
    vertical-align: middle;
}

.project-dashboard-segment-table thead th {
    color: #7a8395;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: transparent;
}

.project-dashboard-segment-table th:first-child,
.project-dashboard-segment-table td:first-child {
    padding-left: 0;
}

.project-dashboard-segment-table th:last-child,
.project-dashboard-segment-table td:last-child {
    padding-right: 0;
}

.project-dashboard-segment-table tbody tr:last-child td {
    border-bottom: none;
}

.project-dashboard-segment-table tbody tr:hover {
    background: rgba(246, 248, 252, 0.82);
}

.project-dashboard-segment-table-row.is-warning {
    background: rgba(255, 248, 225, 0.64);
}

.project-dashboard-segment-table-main {
    min-width: 0;
    overflow-wrap: anywhere;
}

.project-dashboard-segment-table-main strong {
    display: block;
    font-weight: 500;
}

.project-dashboard-segment-table-col-visits {
    width: 11ch;
    white-space: nowrap;
}

.project-dashboard-segment-table-col-visits.project-dashboard-segment-table-numeric {
    text-align: left;
}

.project-dashboard-segment-table-col-delta {
    width: 17ch;
    white-space: nowrap;
    text-align: left;
}

.project-dashboard-segment-table-numeric {
    text-align: right;
}

.project-dashboard-segment-table-col-delta.project-dashboard-segment-table-numeric {
    text-align: left;
}

.project-dashboard-segment-table-value {
    font-size: 0.875rem;
    font-weight: 500;
}

.project-dashboard-segment-table-col-visits .project-dashboard-segment-table-value {
    display: block;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.project-dashboard-segment-table .project-dashboard-delta {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.35rem;
    text-align: left;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.project-dashboard-segment-table .project-dashboard-delta-abs {
    line-height: 1;
}

.project-dashboard-segment-table .project-dashboard-delta-percent {
    font-size: 0.72em;
    line-height: 1;
    vertical-align: super;
}

.project-dashboard-segment-metric {
    display: grid;
    gap: 0.35rem;
    justify-items: end;
    text-align: right;
}

@media (max-width: 1360px) {
    .project-dashboard-project-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .project-dashboard-filter-form,
    .project-dashboard-form-grid,
    .project-dashboard-segment-columns,
    .project-dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .project-dashboard-toolbar-header,
    .project-dashboard-direction-header,
    .project-dashboard-project-top,
    .project-dashboard-segment-editor-top,
    .project-dashboard-segment-creator-layout,
    .project-dashboard-segment-creator-controls,
    .project-dashboard-available-item,
    .project-dashboard-selected-item {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .project-dashboard-toolbar-actions,
    .project-dashboard-direction-actions,
    .project-dashboard-project-actions,
    .project-dashboard-form-actions,
    .project-dashboard-available-actions,
    .project-dashboard-selected-actions,
    .project-dashboard-filter-buttons {
        justify-content: stretch;
    }

    .project-dashboard-date-field {
        width: 100%;
    }

    .project-dashboard-filter-form {
        align-items: stretch;
    }

    .project-dashboard-direction-kpi-grid {
        grid-template-columns: 1fr;
    }

    .project-dashboard-filter-buttons {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .project-dashboard-segment-metric {
        justify-items: start;
        text-align: left;
    }

    .project-dashboard-segment-creator-note {
        align-items: flex-start;
        flex-direction: column;
    }
}
.hybrid-relevance-pro-page {
    display: grid;
    gap: 1.25rem;
}

.hybrid-relevance-pro-hero-head,
.hybrid-relevance-pro-status-head,
.hybrid-relevance-pro-history-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.hybrid-relevance-pro-form,
.hybrid-relevance-pro-settings {
    display: grid;
    gap: 1rem;
}

.hybrid-relevance-pro-grid {
    display: grid;
    gap: 1rem;
}

.hybrid-relevance-pro-grid-1 {
    grid-template-columns: 1fr;
}

.hybrid-relevance-pro-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hybrid-relevance-pro-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hybrid-relevance-pro-meta-grid {
    align-items: start;
}

.hybrid-relevance-pro-meta-grid > .hybrid-relevance-pro-panel {
    align-self: start;
}

.hybrid-relevance-pro-field,
.hybrid-relevance-pro-panel {
    display: grid;
    gap: 0.5rem;
}

.hybrid-relevance-pro-field-full {
    grid-column: 1 / -1;
}

.hybrid-relevance-pro-textarea {
    min-height: 7rem;
    resize: vertical;
}

.hybrid-relevance-pro-page .translit-text-input,
.hybrid-relevance-pro-page .register-select {
    background-color: #fff;
}

.hybrid-relevance-pro-page .register-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 2.75rem;
    line-height: 1.35;
    padding: 0.58rem 2.65rem 0.58rem 1rem;
    background-position: right 1rem center;
    background-size: 0.85rem 0.65rem;
}

.hybrid-relevance-pro-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 500;
    color: #403b53;
    cursor: pointer;
}

.hybrid-relevance-pro-check input {
    --bs-form-check-bg-image: none;
    flex: 0 0 auto;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0.125rem 0 0;
    vertical-align: top;
    appearance: none;
    background-color: #fff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 0.188rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, filter 0.2s ease;
}

.hybrid-relevance-pro-check input:active {
    filter: brightness(96%);
}

.hybrid-relevance-pro-check input:focus {
    border-color: #5F4AFE;
    outline: 0;
    box-shadow: 0 1px 3px 0 rgba(45, 45, 51, 0.2), 0 0 0 4px rgba(95, 74, 254, 0.12);
}

.hybrid-relevance-pro-check input:checked {
    background-color: #5F4AFE;
    border-color: #5F4AFE;
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9 1L3.5 6.5L1 4' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-image: var(--bs-form-check-bg-image);
}

.hybrid-relevance-pro-check input:disabled {
    pointer-events: none;
    filter: none;
    opacity: 0.5;
}

.hybrid-relevance-pro-check input:disabled + span {
    opacity: 0.5;
}

.hybrid-relevance-pro-check span {
    cursor: pointer;
}

.hybrid-relevance-pro-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hybrid-relevance-pro-settings-group {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(35, 52, 76, 0.08);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(247, 249, 252, 0.96), rgba(255, 255, 255, 0.96));
}

.hybrid-relevance-pro-settings-group h3 {
    margin: 0;
    font-size: 1rem;
}

.hybrid-relevance-pro-actions,
.hybrid-relevance-pro-status-actions,
.hybrid-relevance-pro-history-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hybrid-relevance-pro-status-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #6b7785;
    font-size: 0.92rem;
}

.hybrid-relevance-pro-results {
    display: grid;
    gap: 1rem;
}

.hybrid-relevance-pro-panel {
    padding: 1rem;
    border: 1px solid rgba(35, 52, 76, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
}

.hybrid-relevance-pro-panel h3 {
    margin: 0;
    font-size: 1rem;
}

.hybrid-relevance-pro-overview {
    display: grid;
    gap: 1rem;
}

.hybrid-relevance-pro-overview-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.hybrid-relevance-pro-overview-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, rgba(18, 87, 150, 0.08), rgba(18, 87, 150, 0.02));
}

.hybrid-relevance-pro-overview-card span {
    color: #697586;
    font-size: 0.84rem;
}

.hybrid-relevance-pro-overview-card strong {
    font-size: 1.35rem;
    line-height: 1.1;
}

.hybrid-relevance-pro-overview-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
}

.hybrid-relevance-pro-overview-meta p {
    margin: 0;
}

.hybrid-relevance-pro-warning-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hybrid-relevance-pro-warning-list span {
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    background: rgba(193, 110, 0, 0.12);
    color: #8b5a00;
    font-size: 0.85rem;
}

.hybrid-relevance-pro-chart {
    display: grid;
    gap: 0.8rem;
}

.hybrid-relevance-pro-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.86rem;
    color: #5f6b7b;
}

.hybrid-relevance-pro-chart-dot {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    margin-right: 0.4rem;
    border-radius: 999px;
    vertical-align: middle;
}

.hybrid-relevance-pro-chart-dot-own,
.hybrid-relevance-pro-chart-bar-own {
    background: linear-gradient(90deg, #0c6ddf, #4ba3ff);
}

.hybrid-relevance-pro-chart-dot-benchmark,
.hybrid-relevance-pro-chart-bar-benchmark {
    background: linear-gradient(90deg, #f18c26, #ffbf6b);
}

.hybrid-relevance-pro-chart-row {
    display: grid;
    gap: 0.45rem;
}

.hybrid-relevance-pro-chart-label {
    font-size: 0.9rem;
    font-weight: 600;
}

.hybrid-relevance-pro-chart-bars {
    display: grid;
    gap: 0.35rem;
}

.hybrid-relevance-pro-chart-bar {
    position: relative;
    min-height: 1.5rem;
    border-radius: 999px;
    color: #fff;
    overflow: hidden;
}

.hybrid-relevance-pro-chart-bar span {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding: 0 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.hybrid-relevance-pro-word-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    align-items: flex-end;
}

.hybrid-relevance-pro-word-cloud span {
    color: #1b3553;
    line-height: 1;
}

.hybrid-relevance-pro-table-wrap {
    overflow-x: auto;
}

.hybrid-relevance-pro-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    line-height: 1.28;
}

.hybrid-relevance-pro-table th,
.hybrid-relevance-pro-table td {
    padding: 0.54rem 0.62rem;
    border-bottom: 1px solid rgba(35, 52, 76, 0.08);
    text-align: left;
    vertical-align: middle;
}

.hybrid-relevance-pro-table th {
    font-size: 0.76rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6b7785;
}

.hybrid-relevance-pro-table-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: left;
    cursor: pointer;
}

.hybrid-relevance-pro-table-sort::after {
    content: '↕';
    font-size: 0.9em;
    color: #9aa6b2;
    transition: color 0.18s ease;
}

.hybrid-relevance-pro-table-sort[data-sort-state="asc"]::after {
    content: '↑';
    color: var(--hybrid-pro-accent);
}

.hybrid-relevance-pro-table-sort[data-sort-state="desc"]::after {
    content: '↓';
    color: var(--hybrid-pro-accent);
}

.hybrid-relevance-pro-table-sort:hover,
.hybrid-relevance-pro-table-sort:focus-visible {
    color: var(--hybrid-pro-accent);
    outline: none;
}

.hybrid-relevance-pro-history-list {
    display: grid;
    gap: 0.9rem;
}

.hybrid-relevance-pro-history-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(35, 52, 76, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
}

.hybrid-relevance-pro-history-main {
    display: grid;
    gap: 0.45rem;
}

.hybrid-relevance-pro-history-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.45rem;
    align-items: center;
}

.hybrid-relevance-pro-history-head h3 {
    margin: 0;
    font-size: 1rem;
}

.hybrid-relevance-pro-history-head .status-badge {
    flex: 0 0 auto;
    margin-left: 0.25rem;
}

.hybrid-relevance-pro-section {
    border: 1px solid rgba(35, 52, 76, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.98);
    overflow: hidden;
}

.hybrid-relevance-pro-section summary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    cursor: pointer;
    list-style: none;
    font-size: 1rem;
    font-weight: 600;
}

.hybrid-relevance-pro-section summary::-webkit-details-marker {
    display: none;
}

.hybrid-relevance-pro-section summary::after {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: rgba(18, 87, 150, 0.08);
    color: #125796;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.hybrid-relevance-pro-section[open] summary::after {
    content: '−';
}

.hybrid-relevance-pro-section-body {
    display: grid;
    gap: 1rem;
    padding: 0 1.15rem 1.15rem;
}

.hybrid-relevance-pro-export-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hybrid-relevance-pro-metrics-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.hybrid-relevance-pro-metric-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(35, 52, 76, 0.08);
    background: linear-gradient(135deg, rgba(244, 248, 252, 0.98), rgba(232, 239, 247, 0.9));
}

.hybrid-relevance-pro-metric-card strong {
    font-size: 1.12rem;
    line-height: 1.2;
}

.hybrid-relevance-pro-metric-card span {
    color: #6b7785;
    font-size: 0.86rem;
}

.hybrid-relevance-pro-simple-list {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding-left: 1.1rem;
    color: #5f6d7a;
    line-height: 1.45;
}

.hybrid-relevance-pro-example-card,
.hybrid-relevance-pro-passage-card,
.hybrid-relevance-pro-schema-card {
    display: grid;
    gap: 0.55rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(35, 52, 76, 0.08);
    border-radius: 0.9rem;
    background: rgba(247, 250, 252, 0.94);
}

.hybrid-relevance-pro-example-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    align-items: baseline;
}

.hybrid-relevance-pro-example-head strong {
    font-size: 0.95rem;
}

.hybrid-relevance-pro-example-head span,
.hybrid-relevance-pro-passage-card span,
.hybrid-relevance-pro-schema-card span {
    color: #6b7785;
    font-size: 0.84rem;
}

.hybrid-relevance-pro-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
    align-content: flex-start;
}

.hybrid-relevance-pro-tag-list span {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0.38rem 0.62rem;
    border-radius: 999px;
    background: rgba(18, 87, 150, 0.08);
    color: #125796;
    font-size: 0.84rem;
}

.hybrid-relevance-pro-tag-list a {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0.38rem 0.62rem;
    border-radius: 999px;
    background: rgba(18, 87, 150, 0.08);
    color: #125796;
    font-size: 0.84rem;
    text-decoration: none;
}

.hybrid-relevance-pro-tag-list a:hover,
.hybrid-relevance-pro-tag-list a:focus-visible {
    background: rgba(18, 87, 150, 0.14);
    color: #0e477c;
    text-decoration: none;
    outline: none;
}

@media (max-width: 1100px) {
    .hybrid-relevance-pro-grid-2,
    .hybrid-relevance-pro-grid-3,
    .hybrid-relevance-pro-settings,
    .hybrid-relevance-pro-overview-cards,
    .hybrid-relevance-pro-overview-meta,
    .hybrid-relevance-pro-metrics-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hybrid-relevance-pro-history-item,
    .hybrid-relevance-pro-status-head {
        flex-direction: column;
        align-items: stretch;
    }

    .hybrid-relevance-pro-status-meta {
        flex-direction: column;
    }
}

.hybrid-relevance-pro-page {
    --hybrid-pro-accent: #125796;
    --hybrid-pro-accent-soft: rgba(18, 87, 150, 0.08);
    --hybrid-pro-accent-strong: #0d4b83;
    --hybrid-pro-highlight: #f18c26;
    --hybrid-pro-emerald: #1f8a5a;
    --hybrid-pro-danger: #b94a48;
    --hybrid-pro-surface: rgba(255, 255, 255, 0.98);
    --hybrid-pro-surface-soft: rgba(244, 248, 252, 0.96);
    --hybrid-pro-border: rgba(35, 52, 76, 0.1);
    --hybrid-pro-shadow: 0 24px 54px rgba(21, 46, 74, 0.08);
    gap: 1.5rem;
}

.hybrid-relevance-pro-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

.hybrid-relevance-pro-main,
.hybrid-relevance-pro-sidebar {
    display: grid;
    gap: 1.25rem;
}

.hybrid-relevance-pro-sidebar {
    position: sticky;
    top: 5.75rem;
}

.hybrid-relevance-pro-hero,
.hybrid-relevance-pro-task-card,
.hybrid-relevance-pro-results-card,
.hybrid-relevance-pro-outline-card,
.hybrid-relevance-pro-history-card,
.hybrid-relevance-pro-status-card {
    border: 1px solid var(--hybrid-pro-border);
    box-shadow: var(--hybrid-pro-shadow);
}

.hybrid-relevance-pro-hero {
    background:
        radial-gradient(circle at top left, rgba(241, 140, 38, 0.17), transparent 38%),
        radial-gradient(circle at bottom right, rgba(18, 87, 150, 0.18), transparent 42%),
        linear-gradient(135deg, rgba(248, 250, 253, 0.98), rgba(255, 255, 255, 0.98));
}

.hybrid-relevance-pro-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.9fr);
    gap: 1.2rem;
    align-items: start;
}

.hybrid-relevance-pro-eyebrow,
.hybrid-relevance-pro-card-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(18, 87, 150, 0.08);
    color: var(--hybrid-pro-accent);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hybrid-relevance-pro-hero-copy {
    display: grid;
    gap: 0.95rem;
}

.hybrid-relevance-pro-hero-copy h1 {
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.02;
}

.hybrid-relevance-pro-hero-copy p,
.hybrid-relevance-pro-hero-note p,
.hybrid-relevance-pro-note {
    color: #5f6b7b;
}

.hybrid-relevance-pro-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hybrid-relevance-pro-chip-list span {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(18, 87, 150, 0.1);
    color: #1b3553;
    font-size: 0.86rem;
    font-weight: 600;
}

.hybrid-relevance-pro-hero-note {
    display: grid;
    gap: 0.75rem;
    padding: 1.2rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(18, 87, 150, 0.12);
    background: rgba(255, 255, 255, 0.88);
}

.hybrid-relevance-pro-hero-note strong {
    font-size: 1rem;
}

.hybrid-relevance-pro-hero-note ul {
    margin: 0;
    padding-left: 1.15rem;
    color: #30435d;
}

.hybrid-relevance-pro-form {
    gap: 1.2rem;
}

.hybrid-relevance-pro-task-intro,
.hybrid-relevance-pro-workbench,
.hybrid-relevance-pro-summary-grid {
    display: grid;
    gap: 1rem;
}

.hybrid-relevance-pro-task-intro {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hybrid-relevance-pro-field-query {
    min-width: 0;
}

.hybrid-relevance-pro-workbench {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.hybrid-relevance-pro-workbench > .hybrid-relevance-pro-workbench-card {
    min-width: 0;
}

.hybrid-relevance-pro-workbench-card {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
    border-radius: 1.15rem;
    border: 1px solid var(--hybrid-pro-border);
    background: linear-gradient(180deg, var(--hybrid-pro-surface-soft), var(--hybrid-pro-surface));
}

.hybrid-relevance-pro-card-head,
.hybrid-relevance-pro-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.hybrid-relevance-pro-card-head h3,
.hybrid-relevance-pro-panel-head h3 {
    margin: 0;
    font-size: 1.08rem;
}

.hybrid-relevance-pro-card-head p,
.hybrid-relevance-pro-panel-head p {
    color: #6a7686;
}

.hybrid-relevance-pro-section-note {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 0.95rem;
    border: 1px dashed rgba(18, 87, 150, 0.18);
    background: rgba(18, 87, 150, 0.05);
}

.hybrid-relevance-pro-section-note h4 {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.35;
    color: #20344d;
}

.hybrid-relevance-pro-section-note p {
    color: #6a7686;
}

.hybrid-relevance-pro-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.hybrid-relevance-pro-mode-tab {
    appearance: none;
    border: 1px solid rgba(18, 87, 150, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: #39506d;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    transition: 0.18s ease;
}

.hybrid-relevance-pro-mode-tab:hover,
.hybrid-relevance-pro-mode-tab:focus-visible {
    border-color: rgba(18, 87, 150, 0.26);
    color: var(--hybrid-pro-accent);
    outline: none;
}

.hybrid-relevance-pro-mode-tab.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--hybrid-pro-accent), #4b89d2);
    color: #fff;
    box-shadow: 0 12px 24px rgba(18, 87, 150, 0.22);
}

.hybrid-relevance-pro-mode-panels,
.hybrid-relevance-pro-card-stack {
    display: grid;
    gap: 0.9rem;
}

.hybrid-relevance-pro-meta-recommendations {
    display: grid;
    gap: 0.8rem;
    align-items: start;
}

.hybrid-relevance-pro-meta-recommendation {
    display: grid;
    gap: 0.55rem;
    align-content: start;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(18, 87, 150, 0.06);
    border: 1px dashed rgba(18, 87, 150, 0.2);
}

.hybrid-relevance-pro-meta-recommendation strong {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    color: #20344d;
}

.hybrid-relevance-pro-meta-recommendation-empty {
    margin: 0;
    color: #6a7686;
    line-height: 1.5;
}

.hybrid-relevance-pro-meta-recommendation .hybrid-relevance-pro-tag-list {
    align-self: start;
}

.hybrid-relevance-pro-mode-panel {
    display: grid;
    gap: 0.8rem;
}

.hybrid-relevance-pro-compact-select-grid {
    grid-template-columns: repeat(3, minmax(10rem, 1fr));
    justify-content: stretch;
    align-items: end;
    gap: 0.85rem;
}

.hybrid-relevance-pro-compact-select-grid .hybrid-relevance-pro-field {
    width: 100%;
    min-width: 0;
}

.hybrid-relevance-pro-compact-select-grid .register-select {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.hybrid-relevance-pro-placeholder-card {
    display: grid;
    gap: 0.55rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(18, 87, 150, 0.06);
    border: 1px dashed rgba(18, 87, 150, 0.2);
}

.hybrid-relevance-pro-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 0.5rem 1rem;
}

.hybrid-relevance-pro-recommendation-controls {
    align-items: start;
}

.hybrid-relevance-pro-depth-field {
    align-self: start;
}

.hybrid-relevance-pro-textarea {
    min-height: 7rem;
    resize: vertical;
}

.hybrid-relevance-pro-textarea-compact {
    min-height: 5.1rem;
}

.hybrid-relevance-pro-check {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    transition: color 0.2s ease;
}

.hybrid-relevance-pro-check:hover {
    color: #253c59;
}

.hybrid-relevance-pro-actions {
    align-items: center;
}

.hybrid-relevance-pro-status-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.98));
}

.hybrid-relevance-pro-status-head h2 {
    font-size: 1.08rem;
}

.hybrid-relevance-pro-outline {
    display: grid;
    gap: 0.65rem;
}

.hybrid-relevance-pro-outline a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.78rem 0.92rem;
    border-radius: 0.92rem;
    border: 1px solid rgba(35, 52, 76, 0.08);
    background: rgba(255, 255, 255, 0.92);
    color: #20344d;
    font-weight: 600;
    text-decoration: none;
}

.hybrid-relevance-pro-outline a:hover,
.hybrid-relevance-pro-outline a:focus-visible {
    border-color: rgba(18, 87, 150, 0.24);
    color: var(--hybrid-pro-accent);
    outline: none;
}

.hybrid-relevance-pro-outline a small {
    color: #748193;
    font-weight: 500;
}

.hybrid-relevance-pro-report-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.hybrid-relevance-pro-results {
    gap: 1.25rem;
}

.hybrid-relevance-pro-report {
    display: grid;
    gap: 1.15rem;
}

.hybrid-relevance-pro-report-hero {
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
    border-radius: 1.25rem;
    border: 1px solid var(--hybrid-pro-border);
    background:
        radial-gradient(circle at top right, rgba(18, 87, 150, 0.12), transparent 38%),
        linear-gradient(135deg, rgba(249, 251, 253, 0.98), rgba(255, 255, 255, 0.98));
}

.hybrid-relevance-pro-report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hybrid-relevance-pro-report-meta span,
.hybrid-relevance-pro-inline-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.36rem 0.68rem;
    border-radius: 999px;
    background: rgba(18, 87, 150, 0.08);
    color: var(--hybrid-pro-accent);
    font-size: 0.82rem;
    font-weight: 600;
}

.hybrid-relevance-pro-inline-chip-accent {
    background: rgba(31, 138, 90, 0.12);
    color: var(--hybrid-pro-emerald);
}

.hybrid-relevance-pro-report-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2vw, 2.1rem);
}

.hybrid-relevance-pro-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hybrid-relevance-pro-report-summary {
    padding: 1rem 1.05rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(35, 52, 76, 0.08);
}

.hybrid-relevance-pro-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hybrid-relevance-pro-summary-grid article {
    display: grid;
    gap: 0.35rem;
}

.hybrid-relevance-pro-summary-grid span {
    color: #6c7888;
    font-size: 0.84rem;
}

.hybrid-relevance-pro-summary-grid strong {
    font-size: 1.18rem;
    line-height: 1.14;
}

.hybrid-relevance-pro-report-sections {
    display: grid;
    gap: 1rem;
}

.hybrid-relevance-pro-section {
    border: 1px solid var(--hybrid-pro-border);
    border-radius: 1.2rem;
    background: var(--hybrid-pro-surface);
    box-shadow: 0 16px 40px rgba(21, 46, 74, 0.05);
}

.hybrid-relevance-pro-section summary {
    align-items: center;
}

.hybrid-relevance-pro-section summary::after {
    content: '+';
    width: 1.85rem;
    height: 1.85rem;
    background: rgba(18, 87, 150, 0.08);
    color: var(--hybrid-pro-accent);
    font-size: 1.1rem;
}

.hybrid-relevance-pro-section[open] summary::after {
    content: '−';
}

.hybrid-relevance-pro-section-summary-main {
    display: grid;
    gap: 0.18rem;
    flex: 1 1 auto;
    min-width: 0;
}

.hybrid-relevance-pro-section summary > .hybrid-relevance-pro-inline-chip {
    flex: 0 0 auto;
    margin-left: auto;
}

.hybrid-relevance-pro-section-summary-main strong {
    font-size: 1rem;
    color: #20344d;
}

.hybrid-relevance-pro-section-summary-main small {
    color: #6f7b8b;
    font-size: 0.85rem;
    font-weight: 400;
}

.hybrid-relevance-pro-section-body {
    gap: 1rem;
}

.hybrid-relevance-pro-link {
    color: var(--hybrid-pro-accent);
    text-decoration: none;
    word-break: break-word;
}

.hybrid-relevance-pro-link:hover,
.hybrid-relevance-pro-link:focus-visible {
    color: var(--hybrid-pro-accent-strong);
    text-decoration: underline;
    outline: none;
}

.hybrid-relevance-pro-definition-list {
    display: grid;
    gap: 0.85rem;
    margin: 0;
}

.hybrid-relevance-pro-definition-list div {
    display: grid;
    gap: 0.22rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(35, 52, 76, 0.07);
}

.hybrid-relevance-pro-definition-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.hybrid-relevance-pro-definition-list dt {
    color: #6b7785;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hybrid-relevance-pro-definition-list dd {
    margin: 0;
    color: #20344d;
    font-weight: 600;
    word-break: break-word;
}

.hybrid-relevance-pro-chart-card {
    gap: 1rem;
}

.hybrid-relevance-pro-chart-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.hybrid-relevance-pro-plot {
    --hybrid-relevance-pro-plot-height: 300px;
    display: grid;
    gap: 0.8rem;
}

.hybrid-relevance-pro-plot-shell {
    display: grid;
    grid-template-columns: 3.35rem minmax(0, 1fr);
    gap: 0.72rem;
    align-items: start;
}

.hybrid-relevance-pro-plot-dual-axis .hybrid-relevance-pro-plot-shell {
    grid-template-columns: 3.35rem minmax(0, 1fr) 3.6rem;
}

.hybrid-relevance-pro-plot-axis {
    position: relative;
    height: var(--hybrid-relevance-pro-plot-height);
}

.hybrid-relevance-pro-plot-axis span {
    position: absolute;
    right: 0;
    width: 100%;
    transform: translateY(-50%);
    color: #7a8695;
    font-size: 12px;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

.hybrid-relevance-pro-plot-axis-right span {
    right: auto;
    left: 0;
    text-align: left;
}

.hybrid-relevance-pro-plot-canvas {
    min-width: 0;
    display: grid;
    gap: 0.78rem;
}

.hybrid-relevance-pro-plot-frame {
    position: relative;
}

.hybrid-relevance-pro-plot-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.1rem;
}

.hybrid-relevance-pro-plot-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: #566578;
    font-size: 0.85rem;
}

.hybrid-relevance-pro-plot-legend-button {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #566578;
    font-size: 0.85rem;
    line-height: 1.2;
    cursor: pointer;
}

.hybrid-relevance-pro-plot-legend-button:hover {
    color: #20344d;
}

.hybrid-relevance-pro-plot-legend-button:focus-visible {
    outline: 2px solid rgba(18, 87, 150, 0.28);
    outline-offset: 4px;
    border-radius: 0.45rem;
}

.hybrid-relevance-pro-plot-legend-button.is-disabled {
    opacity: 0.45;
}

.hybrid-relevance-pro-plot-dot {
    display: inline-flex;
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
}

.hybrid-relevance-pro-plot-svg {
    display: block;
    width: 100%;
    height: var(--hybrid-relevance-pro-plot-height);
    border-radius: 1.05rem;
    background: linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(252, 253, 255, 0.98));
    border: 1px solid rgba(35, 52, 76, 0.06);
}

.hybrid-relevance-pro-grid-line {
    stroke: rgba(35, 52, 76, 0.08);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.hybrid-relevance-pro-grid-text {
    fill: #7a8695;
    font-size: 12px;
    text-anchor: end;
}

.hybrid-relevance-pro-plot-line {
    vector-effect: non-scaling-stroke;
}

.hybrid-relevance-pro-plot-line.is-hidden-series,
.hybrid-relevance-pro-plot-point.is-hidden-series {
    opacity: 0;
    pointer-events: none;
}

.hybrid-relevance-pro-plot-zone {
    fill: rgba(18, 87, 150, 0.001);
    pointer-events: all;
    transition: fill 0.15s ease;
}

.hybrid-relevance-pro-plot-zone.is-active {
    fill: rgba(18, 87, 150, 0.08);
}

.hybrid-relevance-pro-plot-zone:focus-visible,
.hybrid-relevance-pro-plot-point:focus-visible {
    outline: none;
}

.hybrid-relevance-pro-plot-point {
    cursor: pointer;
    transition: opacity 0.15s ease, filter 0.15s ease, stroke-width 0.15s ease;
    vector-effect: non-scaling-stroke;
}

.hybrid-relevance-pro-plot-point.is-active {
    filter: drop-shadow(0 6px 12px rgba(18, 87, 150, 0.22));
    stroke-width: 3;
}

.hybrid-relevance-pro-plot-point.is-muted {
    opacity: 0.45;
}

.hybrid-relevance-pro-plot-tooltip {
    position: absolute;
    z-index: 3;
    min-width: 12rem;
    max-width: min(20rem, calc(100% - 1rem));
    padding: 0.8rem 0.9rem;
    border-radius: 0.95rem;
    background: rgba(18, 24, 33, 0.94);
    color: #fff;
    box-shadow: 0 18px 42px rgba(16, 22, 31, 0.28);
    pointer-events: none;
}

.hybrid-relevance-pro-plot-tooltip.is-hidden {
    display: none;
}

.hybrid-relevance-pro-plot-tooltip-title {
    margin-bottom: 0.55rem;
    font-size: 0.83rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.96);
}

.hybrid-relevance-pro-plot-tooltip-rows {
    display: grid;
    gap: 0.4rem;
}

.hybrid-relevance-pro-plot-tooltip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    font-size: 0.8rem;
}

.hybrid-relevance-pro-plot-tooltip-value {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.12rem;
}

.hybrid-relevance-pro-plot-tooltip-value small {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.72rem;
    font-weight: 500;
}

.hybrid-relevance-pro-plot-tooltip-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.88);
}

.hybrid-relevance-pro-plot-tooltip-label i {
    display: inline-flex;
    width: 0.64rem;
    height: 0.64rem;
    border-radius: 999px;
}

.hybrid-relevance-pro-plot-labels {
    position: relative;
    min-height: 2.35rem;
}

.hybrid-relevance-pro-plot-labels span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    color: #6a7686;
    font-size: 0.78rem;
    line-height: 1.2;
    word-break: break-word;
    text-align: center;
}

.hybrid-relevance-pro-plot-labels span.is-active {
    color: var(--hybrid-pro-accent);
    font-weight: 700;
}

.hybrid-relevance-pro-overview-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.hybrid-relevance-pro-overview-card {
    padding: 1rem;
    border: 1px solid rgba(18, 87, 150, 0.1);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.84);
}

.hybrid-relevance-pro-overview-card strong {
    font-size: 1.45rem;
}

.hybrid-relevance-pro-metrics-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hybrid-relevance-pro-metric-card {
    gap: 0.45rem;
    min-height: 100%;
}

.hybrid-relevance-pro-metric-card small {
    color: #677485;
    line-height: 1.35;
}

.hybrid-relevance-pro-table-wrap {
    border-radius: 1rem;
    border: 1px solid rgba(35, 52, 76, 0.08);
    background: rgba(255, 255, 255, 0.92);
}

.hybrid-relevance-pro-table th,
.hybrid-relevance-pro-table td {
    padding: 0.54rem 0.62rem;
}

.hybrid-relevance-pro-table tbody tr:nth-child(even) {
    background: rgba(247, 250, 252, 0.65);
}

.hybrid-relevance-pro-table-row-missing .hybrid-relevance-pro-missing-term-cell,
.hybrid-relevance-pro-table-row-missing .hybrid-relevance-pro-missing-term-cell .hybrid-relevance-pro-term-label,
.hybrid-relevance-pro-table-row-missing .hybrid-relevance-pro-missing-term-cell .hybrid-relevance-pro-term-label-interactive {
    color: var(--hybrid-pro-danger);
}

.hybrid-relevance-pro-term-cell {
    display: grid;
    gap: 0.45rem;
    min-width: 12rem;
    font-size: 0.875rem;
    line-height: 1.28;
}

.hybrid-relevance-pro-term-label {
    font-size: 0.875rem;
    line-height: 1.28;
    font-weight: 700;
    color: inherit;
}

.hybrid-relevance-pro-term-label-interactive {
    font-size: 0.875rem;
    line-height: 1.28;
    color: var(--hybrid-pro-accent);
}

.hybrid-relevance-pro-table .hybrid-relevance-pro-missing-term-cell {
    font-size: 0.875rem;
    line-height: 1.28;
}

.hybrid-relevance-pro-wordforms {
    display: grid;
    gap: 0.45rem;
}

.hybrid-relevance-pro-wordforms summary {
    padding: 0;
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.hybrid-relevance-pro-wordforms summary::-webkit-details-marker {
    display: none;
}

.hybrid-relevance-pro-wordforms summary::marker,
.hybrid-relevance-pro-wordforms summary::after {
    display: none;
}

.hybrid-relevance-pro-score-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.25rem;
    padding: 0.38rem 0.62rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.hybrid-relevance-pro-score-pill-success {
    background: rgba(31, 138, 90, 0.12);
    color: var(--hybrid-pro-emerald);
}

.hybrid-relevance-pro-score-pill-warning {
    background: rgba(241, 140, 38, 0.14);
    color: #9a5a13;
}

.hybrid-relevance-pro-score-pill-danger {
    background: rgba(185, 74, 72, 0.12);
    color: var(--hybrid-pro-danger);
}

.hybrid-relevance-pro-example-card,
.hybrid-relevance-pro-passage-card,
.hybrid-relevance-pro-schema-card {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96));
}

.hybrid-relevance-pro-schema-own-panel {
    align-content: start;
    align-items: start;
}

.hybrid-relevance-pro-schema-own-panel .hybrid-relevance-pro-tag-list {
    align-self: start;
}

.hybrid-relevance-pro-example-meta,
.hybrid-relevance-pro-history-main small,
.hybrid-relevance-pro-cell-note {
    color: #708095;
}

.hybrid-relevance-pro-cell-stack {
    display: grid;
    gap: 0.3rem;
    align-items: start;
}

.hybrid-relevance-pro-cell-stack .status-badge {
    width: fit-content;
}

.hybrid-relevance-pro-cell-note {
    display: block;
    font-size: 0.78rem;
    line-height: 1.35;
}

.hybrid-relevance-pro-history-list {
    gap: 0.85rem;
}

.hybrid-relevance-pro-history-item {
    align-items: flex-start;
    border-radius: 1.05rem;
    box-shadow: none;
}

.hybrid-relevance-pro-history-main {
    gap: 0.35rem;
}

.hybrid-relevance-pro-history-main small {
    font-size: 0.8rem;
}

@media (max-width: 1320px) {
    .hybrid-relevance-pro-shell {
        grid-template-columns: 1fr;
    }

    .hybrid-relevance-pro-sidebar {
        position: static;
    }
}

@media (max-width: 980px) {
    .hybrid-relevance-pro-hero-grid,
    .hybrid-relevance-pro-task-intro,
    .hybrid-relevance-pro-option-grid,
    .hybrid-relevance-pro-summary-grid,
    .hybrid-relevance-pro-metrics-list,
    .hybrid-relevance-pro-overview-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .hybrid-relevance-pro-workbench {
        grid-template-columns: 1fr;
    }

    .hybrid-relevance-pro-compact-select-grid {
        grid-template-columns: repeat(2, minmax(10rem, 1fr));
    }
}

@media (max-width: 720px) {
    .hybrid-relevance-pro-report-controls,
    .hybrid-relevance-pro-report-actions,
    .hybrid-relevance-pro-mode-tabs,
    .hybrid-relevance-pro-plot-legend {
        width: 100%;
    }

    .hybrid-relevance-pro-mode-tab,
    .hybrid-relevance-pro-report-controls .secondary-button,
    .hybrid-relevance-pro-report-actions .secondary-button {
        width: 100%;
        justify-content: center;
    }

    .hybrid-relevance-pro-results-card .section-header,
    .hybrid-relevance-pro-card-head,
    .hybrid-relevance-pro-panel-head,
    .hybrid-relevance-pro-hero-head,
    .hybrid-relevance-pro-status-head,
    .hybrid-relevance-pro-history-item {
        flex-direction: column;
        align-items: stretch;
    }

    .hybrid-relevance-pro-report-hero,
    .hybrid-relevance-pro-workbench-card {
        padding: 1rem;
    }

    .hybrid-relevance-pro-compact-select-grid {
        grid-template-columns: 1fr;
    }

    .hybrid-relevance-pro-table th,
    .hybrid-relevance-pro-table td {
        padding: 0.48rem 0.52rem;
    }

    .hybrid-relevance-pro-plot {
        --hybrid-relevance-pro-plot-height: 16rem;
    }
}

.call-audit-page {
    --call-audit-border: rgba(124, 139, 159, 0.22);
    --call-audit-ink: #1f2937;
    --call-audit-muted: #718096;
    --call-audit-green: #16835b;
    --call-audit-red: #b42318;
    --call-audit-amber: #9a5a13;
}

.call-audit-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem;
    border: 1px solid var(--call-audit-border);
    border-radius: 0.75rem;
    background: #ffffff;
}

.call-audit-hero-main {
    display: grid;
    gap: 0.55rem;
}

.call-audit-hero-main h2 {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1.15;
    color: var(--call-audit-ink);
}

.call-audit-hero-main p,
.call-audit-control-panel .section-header p {
    margin: 0;
    color: var(--call-audit-muted);
}

.call-audit-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.call-audit-status-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
}

.call-audit-status-card {
    display: grid;
    gap: 0.35rem;
    min-height: 5.25rem;
    padding: 0.95rem;
    border: 1px solid var(--call-audit-border);
    border-radius: 0.65rem;
    background: #ffffff;
}

.call-audit-status-label {
    font-size: 0.78rem;
    color: var(--call-audit-muted);
    text-transform: uppercase;
    letter-spacing: 0;
}

.call-audit-ready {
    color: var(--call-audit-green);
}

.call-audit-muted {
    color: var(--call-audit-muted);
}

.call-audit-controls {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(12rem, 1fr) repeat(4, max-content);
    align-items: end;
    gap: 0.75rem;
}

.call-audit-controls .form-field {
    display: grid;
    gap: 0.35rem;
}

.call-audit-controls .form-field span {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--call-audit-muted);
}

.call-audit-smoke-panel .section-header p {
    margin: 0;
    color: var(--call-audit-muted);
}

.call-audit-smoke-panel .call-audit-controls {
    grid-template-columns: repeat(3, max-content);
}

.call-audit-smoke-result {
    margin: 1rem 0 0;
    min-height: 8rem;
    max-height: 28rem;
    overflow: auto;
    padding: 0.9rem;
    border: 1px solid var(--call-audit-border);
    border-radius: 0.5rem;
    background: #f8fafc;
    color: var(--call-audit-ink);
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.call-audit-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 58rem;
}

.call-audit-table th,
.call-audit-table td {
    padding: 0.68rem 0.75rem;
    border-bottom: 1px solid var(--call-audit-border);
    vertical-align: top;
    font-size: 0.88rem;
}

.call-audit-table th {
    color: var(--call-audit-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

.call-audit-table td .status-badge + .status-badge {
    margin-left: 0.3rem;
}

.call-audit-risk {
    display: inline-flex;
    align-items: center;
    min-width: 4.6rem;
    justify-content: center;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
}

.call-audit-risk-low {
    color: var(--call-audit-green);
    background: rgba(22, 131, 91, 0.12);
}

.call-audit-risk-medium {
    color: var(--call-audit-amber);
    background: rgba(154, 90, 19, 0.12);
}

.call-audit-risk-high,
.call-audit-risk-critical {
    color: var(--call-audit-red);
    background: rgba(180, 35, 24, 0.12);
}

.call-audit-empty {
    color: var(--call-audit-muted);
    text-align: center;
}

.call-audit-message-success {
    color: var(--call-audit-green) !important;
}

.call-audit-message-error {
    color: var(--call-audit-red) !important;
}

@media (max-width: 1180px) {
    .call-audit-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .call-audit-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .call-audit-hero,
    .call-audit-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .call-audit-status-grid,
    .call-audit-controls {
        grid-template-columns: 1fr;
    }

    .call-audit-controls .primary-button,
    .call-audit-controls .secondary-button {
        width: 100%;
        justify-content: center;
    }
}
