.aiv-product-nav {
    align-items: center;
    border-bottom: 1px solid #dcdcde;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin: 24px 0 20px;
    position: relative;
}

.aysa-ai-visibility__view-state {
    background: #fff;
    border: 1px solid #dcdcde;
    border-left: 4px solid #2271b1;
    border-radius: 6px;
    padding: 18px;
}

.aysa-ai-visibility__view-state.is-error {
    border-left-color: #d63638;
}

.aysa-ai-visibility__view-state h2 {
    margin-top: 0;
}

.aiv-product-nav__primary,
.aiv-product-nav__actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.aiv-product-nav__item {
    appearance: none;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    color: #3c434a;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: -1px;
    padding: 13px 14px 12px;
}

.aiv-product-nav__item:hover,
.aiv-product-nav__item:focus-visible,
.aiv-product-nav__item.is-active {
    color: #135e96;
}

.aiv-product-nav__item:focus-visible,
.aiv-product-nav__advanced > summary:focus-visible,
.aiv-product-context button:focus-visible,
.aiv-product-actions button:focus-visible,
.aysa-ai-visibility details > summary:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.aiv-product-nav__item.is-active {
    border-bottom-color: #2271b1;
}

.aiv-product-nav__measure {
    white-space: nowrap;
}

.aiv-product-nav__advanced {
    position: relative;
}

.aiv-product-nav__advanced > summary {
    cursor: pointer;
    list-style: none;
}

.aiv-product-nav__advanced > summary::-webkit-details-marker {
    display: none;
}

.aiv-product-nav__advanced-menu {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    display: grid;
    min-width: 230px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
}

.aiv-product-nav__advanced-menu .aiv-product-nav__item {
    border: 0;
    border-radius: 4px;
    margin: 0;
    text-align: left;
}

.aiv-product-nav__advanced-menu .aiv-product-nav__item.is-active {
    background: #f0f6fc;
}

.aiv-product-context {
    background: linear-gradient(135deg, #f6f7f7 0%, #fff 65%);
    border: 1px solid #dcdcde;
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 20px;
}

.aiv-product-context__header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.aiv-product-context__eyebrow {
    color: #646970;
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.aiv-product-context__header h2 {
    margin: 4px 0 0;
}

.aiv-product-context__selector {
    display: grid;
    font-size: 12px;
    font-weight: 600;
    gap: 4px;
    min-width: 240px;
}

.aiv-product-context__selector select {
    max-width: 100%;
}

.aiv-product-context__verdict {
    font-size: 20px;
    font-weight: 650;
    line-height: 1.35;
    margin: 18px 0 4px;
    max-width: 850px;
}

.aiv-product-context__status {
    background: #edfaef;
    border-radius: 999px;
    color: #116329;
    font-weight: 700;
    padding: 6px 10px;
}

.aiv-product-context__values {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 20px 0 12px;
}

.aiv-product-context__value {
    border-left: 3px solid #dcdcde;
    padding-left: 12px;
}

.aiv-product-context__value dt {
    color: #646970;
    font-size: 12px;
}

.aiv-product-context__value dd {
    font-size: 15px;
    font-weight: 700;
    margin: 4px 0 0;
    overflow-wrap: anywhere;
}

.aiv-product-context__notice,
.aiv-product-baseline {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    margin: 14px 0 0;
    padding: 10px 12px;
}

.aiv-product-context__notice.is-reportable,
.aiv-product-baseline:not(.is-warning) {
    background: #edfaef;
    border-left-color: #00a32a;
}

.aiv-product-baseline {
    margin: 0 0 16px;
}

.aiv-product-context__technical {
    color: #50575e;
    margin-top: 12px;
}

.aiv-product-context__technical summary {
    cursor: pointer;
    font-weight: 600;
}

.aiv-product-actions {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 18px;
}

.aiv-product-actions__header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.aiv-product-actions__header h2 {
    margin: 0;
}

.aiv-product-actions__list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 16px 0 0;
}

.aiv-product-actions__list li {
    background: #f6f7f7;
    border-radius: 6px;
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 14px;
}

.aiv-product-actions__list small {
    color: #50575e;
}

.aysa-ai-visibility__primary-metrics,
.aysa-ai-visibility__additional-metrics > div {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.aysa-ai-visibility__additional-metrics {
    grid-column: 1 / -1;
    margin-top: 16px;
}

.aysa-ai-visibility__additional-metrics > summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 12px;
}

.aysa-ai-visibility__conversation > summary {
    display: grid;
    gap: 5px;
}

.aysa-ai-visibility__conversation > summary > span {
    color: #646970;
    font-size: 12px;
    font-weight: 600;
}

.aysa-ai-visibility__evidence-flow {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.aysa-ai-visibility__evidence-flow section {
    background: #f6f7f7;
    border-radius: 6px;
    padding: 14px;
}

.aysa-ai-visibility__evidence-flow h3 {
    margin-top: 0;
}

.aysa-ai-visibility__recommendation-evidence li {
    display: grid;
    gap: 3px;
}

.aysa-ai-visibility__evidence-technical {
    border-top: 1px solid #dcdcde;
    margin-top: 16px;
    padding-top: 12px;
}

.aysa-ai-visibility__setup-checklist {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 18px;
}

.aysa-ai-visibility__setup-checklist h3 {
    margin-top: 0;
}

.aysa-ai-visibility__setup-checklist ul {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.aysa-ai-visibility__setup-checklist li {
    border-left: 4px solid #dba617;
    display: grid;
    gap: 3px;
    margin: 0;
    padding: 8px 10px;
}

.aysa-ai-visibility__setup-checklist li.is-ready {
    border-left-color: #00a32a;
}

.aysa-ai-visibility__setup-checklist li.needs-attention {
    border-left-color: #d63638;
}

.aysa-ai-visibility__setup-checklist li strong {
    font-size: 12px;
}

.aysa-ai-visibility__profile-state {
    border-left: 4px solid #dba617;
    padding: 10px 12px;
}

.aysa-ai-visibility__profile-state.is-confirmed {
    border-left-color: #00a32a;
}

@media (max-width: 1024px) {
    .aiv-product-nav {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding-bottom: 12px;
    }

    .aiv-product-nav__primary {
        overflow-x: auto;
    }

    .aiv-product-nav__actions {
        justify-content: space-between;
    }

    .aiv-product-context__values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aysa-ai-visibility__primary-metrics,
    .aysa-ai-visibility__additional-metrics > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aysa-ai-visibility__evidence-flow {
        grid-template-columns: 1fr;
    }

    .aysa-ai-visibility__setup-checklist ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aiv-product-actions__list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .aiv-product-nav__item {
        padding-inline: 10px;
        white-space: nowrap;
    }

    .aiv-product-context__header {
        display: block;
    }

    .aiv-product-context__status {
        display: inline-block;
        margin-top: 10px;
    }

    .aiv-product-context__values {
        grid-template-columns: 1fr;
    }

    .aysa-ai-visibility__primary-metrics,
    .aysa-ai-visibility__additional-metrics > div {
        grid-template-columns: 1fr;
    }

    .aysa-ai-visibility__setup-checklist ul {
        grid-template-columns: 1fr;
    }

    .aiv-product-nav__advanced-menu {
        left: 0;
        right: auto;
    }
}

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