/* Onboarding wizard & guided tour */

.onboarding-shell {
    max-width: 920px;
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.onboarding-progress {
    margin-bottom: 1.25rem;
}

.onboarding-progress-track {
    height: 8px;
    border-radius: 999px;
    background: var(--fl-border, #e5e7eb);
    overflow: hidden;
}

.onboarding-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #16a34a, #2563eb);
    transition: width 0.25s ease;
}

.onboarding-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--fl-muted, #6b7280);
}

.onboarding-card {
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: var(--fl-radius-lg, 14px);
    background: var(--fl-surface, #fff);
    padding: 1.25rem 1.35rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.onboarding-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
}

.onboarding-card .lead {
    margin: 0 0 1rem;
    color: var(--fl-muted, #6b7280);
    line-height: 1.5;
}

.onboarding-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--fl-border, #e5e7eb);
}

.onboarding-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.onboarding-module-card {
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 12px;
    padding: 0.85rem;
    background: #fafafa;
}

.onboarding-module-card.is-on {
    border-color: color-mix(in srgb, var(--fl-primary, #2563eb) 35%, white);
    background: color-mix(in srgb, var(--fl-primary, #2563eb) 5%, white);
}

.onboarding-module-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.onboarding-species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.65rem;
}

.onboarding-species-card {
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.onboarding-species-card.is-selected {
    border-color: #16a34a;
    background: color-mix(in srgb, #16a34a 8%, white);
}

.onboarding-species-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
    margin-top: 0.35rem;
}

.onboarding-species-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    white-space: nowrap;
}

.onboarding-species-badge--milk {
    background: color-mix(in srgb, #3b82f6 12%, white);
    color: #1d4ed8;
}

.onboarding-species-badge--eggs {
    background: color-mix(in srgb, #f59e0b 15%, white);
    color: #b45309;
}

.onboarding-species-badge--repro {
    background: color-mix(in srgb, #ec4899 12%, white);
    color: #be185d;
}

.onboarding-feed-preset .small {
    display: block;
    margin-top: 0.2rem;
}

.onboarding-distribution-preview {
    margin: 0.75rem 0 1rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--fl-border, #e5e7eb);
}

.onboarding-empty-hero {
    margin-bottom: 1rem;
    padding: 1.35rem 1.5rem;
    border-radius: var(--fl-radius-lg, 14px);
    background: linear-gradient(135deg, color-mix(in srgb, #16a34a 8%, white), color-mix(in srgb, #2563eb 6%, white));
    border: 1px solid color-mix(in srgb, #16a34a 20%, white);
}

.onboarding-empty-hero__content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.onboarding-empty-hero__icon {
    font-size: 2.5rem;
    line-height: 1;
}

.onboarding-empty-hero__title {
    margin: 0 0 0.35rem;
    font-size: 1.4rem;
}

.onboarding-empty-hero__subtitle {
    margin: 0 0 0.35rem;
    color: var(--fl-muted, #6b7280);
    line-height: 1.5;
}

.onboarding-empty-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.onboarding-concept-grid {
    display: grid;
    gap: 0.75rem;
}

.onboarding-concept-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: #f8fafc;
}

.onboarding-concept-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--fl-border, #e5e7eb);
    font-size: 1.1rem;
}

.onboarding-important {
    margin-top: 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.12);
    font-size: 0.9rem;
    line-height: 1.45;
}

.onboarding-checklist-panel {
    margin-bottom: 1rem;
    border: 1px solid color-mix(in srgb, #16a34a 25%, white);
    border-radius: var(--fl-radius-lg, 14px);
    background: color-mix(in srgb, #16a34a 4%, white);
    padding: 1rem 1.1rem;
}

.onboarding-completed-card {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid color-mix(in srgb, #16a34a 25%, white);
    border-radius: var(--fl-radius-lg, 14px);
    background: color-mix(in srgb, #16a34a 4%, white);
}

.onboarding-completed-card__body {
    flex: 1 1 240px;
}

.onboarding-completed-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.onboarding-checklist-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.onboarding-checklist-items {
    display: grid;
    gap: 0.5rem;
}

.onboarding-checklist-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.75);
}

.onboarding-checklist-item.is-done {
    opacity: 0.75;
}

.onboarding-checklist-status {
    width: 1.25rem;
    text-align: center;
}

.onboarding-inline-form {
    display: grid;
    gap: 0.75rem;
}

.onboarding-step-guide {
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    background: color-mix(in srgb, #2563eb 6%, white);
    border: 1px solid color-mix(in srgb, #2563eb 18%, white);
    font-size: 0.9rem;
    line-height: 1.45;
    color: #334155;
}

.onboarding-validation-banner {
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: color-mix(in srgb, #dc2626 8%, white);
    border: 1px solid color-mix(in srgb, #dc2626 25%, white);
    color: #991b1b;
    font-size: 0.9rem;
}

.onboarding-validation-banner ul {
    margin: 0.35rem 0 0;
    padding-inline-start: 1.1rem;
}

.onboarding-field-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #dc2626;
}

.onboarding-inline-form .form-control.is-invalid,
.onboarding-inline-form .form-select.is-invalid {
    border-color: #dc2626;
}

.is-invalid-wrapper .catalog-select__control {
    border-color: #dc2626;
}

.onboarding-checklist-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.onboarding-checklist-link:hover {
    color: var(--fl-primary, #2563eb);
    text-decoration: underline;
}

.help-tour-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .help-tour-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .help-tour-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.help-tour-card {
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 12px;
    padding: 1rem;
    background: var(--fl-surface, #fff);
    min-width: 0;
}

.help-tour-card h3 {
    margin: 0 0 0.35rem;
    font-size: clamp(0.875rem, 1.4vw + 0.45rem, 1rem);
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.help-tour-card p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.guided-tour-active {
    overflow: hidden;
}

.guided-tour-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(15, 23, 42, 0.45);
    pointer-events: auto;
}

.guided-tour-panel {
    position: fixed;
    z-index: 1000000;
    pointer-events: auto;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    padding: 0 1.1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.22);
    max-height: min(45vh, 320px);
    overflow: auto;
    touch-action: pan-y;
}

.guided-tour-panel-drag-zone {
    margin: -0.5rem -0.65rem 0.65rem;
    padding: 0.35rem 0.65rem 0.5rem;
    cursor: grab;
    touch-action: none;
    user-select: none;
    border-radius: 0.65rem 0.65rem 0 0;
}

.guided-tour-panel-drag-zone:hover {
    background: rgba(15, 23, 42, 0.04);
}

.guided-tour-panel-drag-handle {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 1.1rem;
    margin: 0 0 0.35rem;
    padding: 0.15rem 0 0;
    pointer-events: none;
    user-select: none;
}

.guided-tour-panel-drag-handle::before {
    content: '';
    width: 2.75rem;
    height: 0.28rem;
    border-radius: 999px;
    background: var(--fl-border, #cbd5e1);
}

.guided-tour-panel.is-dragging .guided-tour-panel-drag-handle {
    cursor: grabbing;
}

.guided-tour-panel.is-dragging .guided-tour-panel-drag-zone,
.guided-tour-panel.is-dragged .guided-tour-panel-drag-zone {
    cursor: grabbing;
}

body.guided-tour-panel-dragging {
    cursor: grabbing !important;
    user-select: none;
}

body.guided-tour-panel-dragging * {
    cursor: grabbing !important;
}

.guided-tour-panel.is-dragged,
.guided-tour-panel.is-dragging {
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    max-height: min(70vh, 360px);
}

@media (min-width: 768px) {
    .guided-tour-panel {
        left: 50%;
        right: auto;
        bottom: 1.25rem;
        transform: translateX(-50%);
        width: min(420px, calc(100vw - 2rem));
        border-radius: 14px;
        max-height: min(70vh, 360px);
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    }
}

.guided-tour-popover-warning {
    color: var(--fl-warning, #b45309);
    margin-top: 0.35rem;
}

.onboarding-checklist-section-title {
    font-size: 0.9rem;
    margin: 0.75rem 0 0.35rem;
    color: var(--fl-muted, #6b7280);
}

.onboarding-checklist-section--optional {
    border-top: 1px dashed var(--fl-border, #e5e7eb);
    margin-top: 0.75rem;
    padding-top: 0.25rem;
}

.onboarding-comparison-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}

.onboarding-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.onboarding-comparison-table th,
.onboarding-comparison-table td {
    border: 1px solid var(--fl-border, #e5e7eb);
    padding: 0.5rem 0.65rem;
}

.onboarding-feed-schema {
    background: var(--fl-surface-muted, #f8fafc);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.help-center-page.onboarding-shell {
    max-width: 100%;
    width: 100%;
    padding-inline: max(0.75rem, env(safe-area-inset-left, 0px)) max(0.75rem, env(safe-area-inset-right, 0px));
}

@media (min-width: 992px) {
    .help-center-page.onboarding-shell {
        max-width: 1120px;
    }
}

.help-center-page .help-search-bar input {
    border-radius: 12px;
    width: 100%;
    max-width: 100%;
}

.help-category-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

@media (min-width: 480px) {
    .help-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .help-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .help-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.help-category-card {
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 12px;
    padding: 0.85rem;
    background: var(--fl-surface, #fff);
    min-width: 0;
}

.help-category-icon {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
    line-height: 1;
}

.help-category-card h3 {
    margin: 0 0 0.25rem;
    font-size: clamp(0.8125rem, 1.5vw + 0.45rem, 0.9375rem);
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.help-category-card p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.help-setup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.help-setup-actions .fl-btn {
    flex: 1 1 auto;
    min-width: min(100%, 12rem);
}

.help-article-list {
    display: grid;
    gap: 0.65rem;
}

.help-article-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.help-article-card,
.help-faq-item {
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0;
    background: var(--fl-surface, #fff);
    min-width: 0;
}

.help-faq-item summary {
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
    cursor: pointer;
}

.help-faq-item p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.help-pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--fl-surface-muted, #f8fafc);
    padding: 0.75rem;
    border-radius: 8px;
}

/* Help Center V2 */
.help-section-title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 650;
}

.help-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.help-search-bar {
    position: relative;
}

.help-search-bar .help-search-icon {
    position: absolute;
    inset-inline-start: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.55;
    pointer-events: none;
}

.help-search-bar input {
    padding-inline-start: 2.5rem;
}

.help-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
}

.help-badge-category {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.help-badge-muted {
    background: var(--fl-surface-muted, #f1f5f9);
    color: var(--fl-text-muted, #64748b);
}

.help-badge-success {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.help-badge-info {
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
}

.help-article-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .help-article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .help-article-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.help-article-card-v2 {
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 14px;
    padding: 1rem;
    background: var(--fl-surface, #fff);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 100%;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.help-article-card-v2:hover {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.help-article-card-v2-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.help-article-card-v2-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.35;
}

.help-article-card-v2-summary {
    margin: 0;
    color: var(--fl-text-muted, #64748b);
    font-size: 0.875rem;
    line-height: 1.45;
    flex: 1;
}

.help-article-card-v2-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: auto;
}

.help-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.help-tag {
    font-size: 0.72rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: var(--fl-surface-muted, #f8fafc);
    color: var(--fl-text-muted, #64748b);
}

.help-category-card {
    text-align: start;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.help-category-card.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.help-category-card:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.help-setup-block .help-setup-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.help-setup-block .help-setup-head svg {
    flex-shrink: 0;
    margin-top: 0.15rem;
    opacity: 0.8;
}

.help-faq-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.help-faq-filter {
    border: 1px solid var(--fl-border, #e5e7eb);
    background: var(--fl-surface, #fff);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.78rem;
    cursor: pointer;
}

.help-faq-filter.is-active {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.35);
    color: #1d4ed8;
}

.help-faq-link {
    font-size: 0.82rem;
    font-weight: 600;
}

.help-tour-card-v2 {
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 14px;
    padding: 1rem;
    background: var(--fl-surface, #fff);
}

.help-tour-card-v2-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.help-tour-card-v2-head h3 {
    margin: 0;
    font-size: 0.95rem;
}

.help-tour-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--fl-text-muted, #64748b);
    margin: 0.55rem 0 0.75rem;
}

.help-tour-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.help-search-results {
    display: grid;
    gap: 0.55rem;
}

.help-search-hit {
    display: grid;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--fl-border, #e5e7eb);
    text-decoration: none;
    color: inherit;
}

.help-search-hit:hover {
    border-color: rgba(37, 99, 235, 0.35);
    background: var(--fl-surface-muted, #f8fafc);
}

.help-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--fl-text-muted, #64748b);
}

.help-article-detail-v2 {
    padding: 1.25rem;
}

.help-back-link {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    text-decoration: none;
}

.help-article-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.help-article-detail-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem);
}

.help-article-detail-summary {
    color: var(--fl-text-muted, #64748b);
    font-size: 1rem;
    line-height: 1.5;
}

.help-article-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.25rem;
}

.help-article-section {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--fl-border, #e5e7eb);
}

.help-article-highlight {
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    border-top: none;
    margin-top: 1rem;
}

.help-related-links {
    display: grid;
    gap: 0.35rem;
}

.help-related-links a {
    font-weight: 600;
    text-decoration: none;
}

.help-not-found {
    text-align: center;
    padding: 2rem 1rem;
}

.help-context-panel {
    position: relative;
}

.help-context-panel-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    cursor: pointer;
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.82rem;
    background: var(--fl-surface, #fff);
}

.help-context-panel-trigger::-webkit-details-marker {
    display: none;
}

.help-context-panel-body {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 0.35rem);
    z-index: 30;
    min-width: 260px;
    max-width: 320px;
    background: var(--fl-surface, #fff);
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    padding: 0.75rem;
}

.help-context-panel-title {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
}

.help-context-panel-links {
    margin: 0;
    padding-inline-start: 1rem;
    font-size: 0.82rem;
}

.help-context-panel-links a {
    text-decoration: none;
}

.help-context-panel-all {
    display: inline-block;
    margin-top: 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
}

[dir="rtl"] .help-context-panel-body {
    inset-inline-start: 0;
    inset-inline-end: auto;
}

.guided-tour-highlight {
    position: relative;
    z-index: 999999 !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.85) !important;
    border-radius: 8px;
    overflow: visible !important;
}

.feed-hub-hero-card-wrap {
    min-width: 0;
}

.feed-autonomy-tour-anchor,
.animal-tour-tab-anchor,
.animal-tour-anchor {
    min-height: 48px;
}

.animal-tour-tab-anchor {
    min-height: 160px;
}

.feed-autonomy-tour-anchor,
.feed-stocks-tour-anchor,
.feed-hub-hero-card-wrap {
    min-height: 3rem;
}

.stock-kpi-grid--autonomy {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.75rem;
}

.health-tour-anchor,
.repro-tour-anchor,
.poultry-tour-anchor {
    min-height: 2.5rem;
}

.health-tour-anchor.guided-tour-highlight,
.repro-tour-anchor.guided-tour-highlight,
.poultry-tour-anchor.guided-tour-highlight {
    border-radius: 12px;
}

.guided-tour-panel--draggable {
    touch-action: none;
}

[data-tour="farm-nav"].guided-tour-highlight {
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.75) !important;
    border-radius: 12px;
}

.guided-tour-nav-link-pulse {
    position: relative;
    isolation: isolate;
    overflow: visible !important;
    z-index: 1;
}

.guided-tour-nav-link-pulse::before,
.guided-tour-nav-link-pulse::after {
    content: '';
    position: absolute;
    border-radius: 12px;
    pointer-events: none;
}

.guided-tour-nav-link-pulse::before {
    inset: -4px;
    border: 2px solid rgba(250, 204, 21, 0.95);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
    animation: guided-tour-nav-ring 1.75s ease-in-out infinite;
    animation-delay: calc(var(--nav-pulse-index, 0) * 0.12s);
}

.guided-tour-nav-link-pulse::after {
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(101, 163, 13, 0.28));
    animation: guided-tour-nav-fill 1.75s ease-in-out infinite;
    animation-delay: calc(var(--nav-pulse-index, 0) * 0.12s);
    z-index: -1;
}

@keyframes guided-tour-nav-ring {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.55;
    }
}

@keyframes guided-tour-nav-fill {
    0%, 100% {
        transform: scale(0.9);
        opacity: 0.28;
    }

    50% {
        transform: scale(1.03);
        opacity: 0.72;
    }
}

.guided-tour-popover {
    position: fixed;
    z-index: 10052;
    pointer-events: auto;
    border-radius: 14px;
    background: #fff;
    padding: 1rem 1.1rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    max-height: min(70vh, 520px);
    overflow: auto;
}

.guided-tour-popover--sheet {
    border-radius: 16px 16px 0 0;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.2);
}

.guided-tour-popover--center {
    z-index: 10053;
}

.guided-tour-popover-arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
}

.guided-tour-popover-arrow--right { left: -6px; top: 50%; margin-top: -6px; }
.guided-tour-popover-arrow--left { right: -6px; top: 50%; margin-top: -6px; }
.guided-tour-popover-arrow--bottom { top: -6px; left: 50%; margin-left: -6px; }
.guided-tour-popover-arrow--top { bottom: -6px; left: 50%; margin-left: -6px; }

.guided-tour-popover h3,
.guided-tour-popover-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.guided-tour-popover p,
.guided-tour-popover-body {
    margin: 0;
    color: var(--fl-muted, #6b7280);
    line-height: 1.45;
}

.guided-tour-popover-meta {
    font-size: 0.75rem;
    color: var(--fl-muted, #6b7280);
    margin-bottom: 0.35rem;
}

.guided-tour-popover-nav-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
    margin-bottom: 0.35rem;
}

.guided-tour-popover-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.guided-tour-popover-actions .guided-tour-popover-nav {
    justify-content: flex-end;
}

.guided-tour-popover-nav {
    display: flex;
    gap: 0.5rem;
}

.help-context-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    border: 1px solid var(--fl-border, #e5e7eb);
    color: var(--fl-muted, #6b7280);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.help-context-link:hover {
    color: var(--fl-primary, #2563eb);
    border-color: var(--fl-primary, #2563eb);
}

[dir="rtl"] .onboarding-concept-icon {
    order: 2;
}

/* Help Center V2 — tabs, drawer, videos */
.help-tabs {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.help-tabs::-webkit-scrollbar { display: none; }

.help-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 999px;
    background: var(--fl-surface, #fff);
    color: var(--fl-text, #111827);
    font-size: 0.8125rem;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
}

.help-tab.is-active {
    background: var(--fl-primary, #2563eb);
    border-color: var(--fl-primary, #2563eb);
    color: #fff;
}

.help-tab-panel { margin-top: 0.25rem; }

.help-article-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.help-guides-layout {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .help-guides-layout {
        grid-template-columns: 220px 1fr;
        align-items: start;
    }
}

.help-guides-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.help-sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--fl-muted, #6b7280);
}

.help-sidebar-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    text-align: start;
    font-size: 0.8125rem;
    cursor: pointer;
    color: var(--fl-text, #111827);
}

.help-sidebar-item.is-active,
.help-sidebar-item:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--fl-primary, #2563eb);
}

.help-sidebar-count {
    font-size: 0.75rem;
    color: var(--fl-muted, #6b7280);
}

.help-home-support-cta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--fl-border, #e5e7eb);
}

.help-badge-tour { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.help-badge-video { background: rgba(168, 85, 247, 0.12); color: #7c3aed; }

.help-video-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .help-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.help-video-card {
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    background: var(--fl-surface, #fff);
}

.help-video-card-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: var(--fl-muted, #6b7280);
    font-size: 2rem;
}

.help-video-card-thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.help-video-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    font-size: 0.7rem;
}

.help-video-card-body { padding: 0.85rem; }
.help-video-card-body h3 { font-size: 0.9375rem; margin: 0.35rem 0; }
.help-video-card-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }

.help-support-form .auth-field { margin-bottom: 0.85rem; }
.help-consent-label { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.8125rem; cursor: pointer; }

.help-faq-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.35rem; }

.help-drawer-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--fl-border, #e5e7eb);
    border-radius: 999px;
    background: var(--fl-surface, #fff);
    color: var(--fl-muted, #6b7280);
    font-size: 0.8125rem;
    cursor: pointer;
}

.help-drawer-trigger:hover { color: var(--fl-primary, #2563eb); border-color: var(--fl-primary, #2563eb); }

.help-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999990;
    background: rgba(15, 23, 42, 0.4);
}

.help-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 999991;
    width: min(100%, 380px);
    background: var(--fl-surface, #fff);
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.15);
    padding: 1rem;
    overflow-y: auto;
}

[dir="rtl"] .help-drawer { right: auto; left: 0; box-shadow: 8px 0 32px rgba(15, 23, 42, 0.15); }

.help-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.help-drawer-head h2 { font-size: 1.125rem; margin: 0; }

.help-drawer-close {
    border: none;
    background: transparent;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--fl-muted, #6b7280);
}

.help-drawer-section { margin-bottom: 1rem; }
.help-drawer-section h3 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fl-muted, #6b7280); margin: 0 0 0.5rem; }
.help-drawer-section ul { margin: 0; padding-inline-start: 1.1rem; }
.help-drawer-section li { margin-bottom: 0.35rem; font-size: 0.875rem; }

.help-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--fl-border, #e5e7eb);
}

.animal-details-help-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.poultry-dashboard-sticky-actions,
.milk-dashboard-sticky-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.guided-tour-popover-extra-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.guided-tour-popover-warning {
    color: #b45309;
    background: #fffbeb;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
}
