/* LifeOS Help Center — uses design tokens; supports light-theme + RTL */
.lifeos-help-page .launch-main {
    max-width: 1100px;
}

.lifeos-help {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lifeos-help-header h1 {
    margin: 0 0 6px;
}

.lifeos-help-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.lifeos-help-search-wrap {
    flex: 1 1 240px;
    position: relative;
}

.lifeos-help-search {
    width: 100%;
    min-height: var(--lifeos-btn-height, 40px);
    padding: 10px 14px 10px 40px;
    border-radius: var(--lifeos-radius-sm, 8px);
    border: 1px solid var(--lifeos-border, rgba(255, 255, 255, 0.08));
    background: var(--lifeos-input-bg, rgba(0, 0, 0, 0.4));
    color: var(--lifeos-text, #e2e8f0);
    font-size: 0.95rem;
}

.lifeos-help-search:focus {
    outline: none;
    box-shadow: var(--lifeos-focus-ring);
    border-color: var(--lifeos-cyan, #00f2fe);
}

.lifeos-help-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lifeos-text-muted, #94a3b8);
    pointer-events: none;
    font-size: 0.95rem;
}

html[dir="rtl"] .lifeos-help-search {
    padding: 10px 40px 10px 14px;
}

html[dir="rtl"] .lifeos-help-search-icon {
    left: auto;
    right: 12px;
}

.lifeos-help-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.lifeos-help-lang select {
    min-height: var(--lifeos-btn-height, 40px);
    border-radius: var(--lifeos-radius-sm, 8px);
    border: 1px solid var(--lifeos-border, rgba(255, 255, 255, 0.08));
    background: var(--lifeos-input-bg, rgba(0, 0, 0, 0.4));
    color: var(--lifeos-text, #e2e8f0);
    padding: 8px 10px;
}

.lifeos-help-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.lifeos-help-nav {
    border: 1px solid var(--lifeos-border, rgba(255, 255, 255, 0.08));
    border-radius: var(--lifeos-radius-md, 12px);
    background: rgba(0, 0, 0, 0.18);
    padding: 10px;
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 96px);
    overflow: auto;
}

.lifeos-help-nav h2 {
    margin: 4px 8px 10px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--lifeos-text-muted, #94a3b8);
    border: none;
    padding: 0;
}

.lifeos-help-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lifeos-help-nav-btn,
.lifeos-help-faq-tab {
    width: 100%;
    text-align: start;
    border: 1px solid transparent;
    background: transparent;
    color: var(--lifeos-text, #e2e8f0);
    border-radius: var(--lifeos-radius-sm, 8px);
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.35;
}

.lifeos-help-nav-btn:hover,
.lifeos-help-faq-tab:hover,
.lifeos-help-nav-btn:focus-visible,
.lifeos-help-faq-tab:focus-visible {
    background: rgba(var(--lifeos-accent-rgb, 0, 242, 254), 0.08);
    outline: none;
    box-shadow: var(--lifeos-focus-ring);
}

.lifeos-help-nav-btn.is-active,
.lifeos-help-faq-tab.is-active {
    border-color: rgba(var(--lifeos-accent-rgb, 0, 242, 254), 0.35);
    background: rgba(var(--lifeos-accent-rgb, 0, 242, 254), 0.12);
    color: var(--lifeos-cyan, #00f2fe);
    font-weight: 650;
}

.lifeos-help-panel {
    border: 1px solid var(--lifeos-border, rgba(255, 255, 255, 0.08));
    border-radius: var(--lifeos-radius-md, 12px);
    padding: 18px 18px 22px;
    background: rgba(0, 0, 0, 0.12);
    min-height: 320px;
}

.lifeos-help-panel[hidden] {
    display: none !important;
}

.lifeos-help-panel h2 {
    margin-top: 0;
}

.lifeos-help-section-label {
    margin: 18px 0 8px;
    font-size: 0.95rem;
    color: var(--lifeos-cyan, #00f2fe);
    border-bottom: 1px solid var(--lifeos-border, rgba(255, 255, 255, 0.08));
    padding-bottom: 4px;
}

.lifeos-help-list {
    margin: 0;
    padding-left: 1.2rem;
}

.lifeos-help-list li {
    margin-bottom: 8px;
}

.lifeos-help-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--lifeos-radius-sm, 8px);
    border: 1px dashed var(--lifeos-border, rgba(255, 255, 255, 0.08));
    background: rgba(0, 0, 0, 0.2);
    color: var(--lifeos-text-muted, #94a3b8);
    font-size: 0.92rem;
}

.lifeos-help-faq-item {
    border-bottom: 1px solid var(--lifeos-border, rgba(255, 255, 255, 0.08));
    padding: 12px 0;
}

.lifeos-help-faq-item:last-child {
    border-bottom: none;
}

.lifeos-help-faq-q {
    margin: 0 0 6px;
    font-weight: 700;
    color: var(--lifeos-text, #e2e8f0);
    font-size: 1rem;
}

.lifeos-help-faq-a {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.lifeos-help-related {
    margin-top: 10px;
    font-size: 0.88rem;
}

.lifeos-help-result {
    display: block;
    width: 100%;
    text-align: start;
    border: 1px solid var(--lifeos-border, rgba(255, 255, 255, 0.08));
    background: rgba(0, 0, 0, 0.15);
    color: inherit;
    border-radius: var(--lifeos-radius-sm, 8px);
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
}

.lifeos-help-result:hover,
.lifeos-help-result:focus-visible {
    border-color: rgba(var(--lifeos-accent-rgb, 0, 242, 254), 0.4);
    outline: none;
    box-shadow: var(--lifeos-focus-ring);
}

.lifeos-help-result-kind {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--lifeos-cyan, #00f2fe);
    margin-bottom: 4px;
}

.lifeos-help-empty {
    color: var(--lifeos-text-muted, #94a3b8);
    margin: 12px 0;
}

.lifeos-help-footer-cta {
    margin-top: 8px;
}

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

.lifeos-help-skip:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 12px;
    padding: 8px 12px;
    clip: auto;
    overflow: visible;
    white-space: normal;
    display: inline-block;
    border-radius: 8px;
    background: var(--lifeos-accent, var(--lifeos-cyan, #00f2fe));
    color: #0b0d16;
    font-weight: 700;
    text-decoration: none;
}

body.light-theme .lifeos-help-nav,
body.light-theme .lifeos-help-panel,
body.light-theme .lifeos-help-result,
body.light-theme .lifeos-help-note {
    background: rgba(255, 255, 255, 0.72);
}

body.light-theme .lifeos-help-search,
body.light-theme .lifeos-help-lang select {
    background: #fff;
    color: #0f172a;
    border-color: #cbd5e1;
}

body.light-theme .lifeos-help-faq-a,
body.light-theme .lifeos-help-list li,
body.light-theme .lifeos-help p {
    color: var(--lifeos-text-muted, #334155);
}

body.light-theme .lifeos-help-nav-btn,
body.light-theme .lifeos-help-faq-tab {
    color: var(--lifeos-text, #0f172a);
}

body.light-theme .lifeos-help-nav-btn:hover,
body.light-theme .lifeos-help-faq-tab:hover,
body.light-theme .lifeos-help-nav-btn:focus-visible,
body.light-theme .lifeos-help-faq-tab:focus-visible {
    background: rgba(15, 23, 42, 0.06);
}

body.light-theme .lifeos-help-nav-btn.is-active,
body.light-theme .lifeos-help-faq-tab.is-active {
    color: var(--lifeos-cyan-deep, #0284c7);
    background: rgba(2, 132, 199, 0.1);
    border-color: rgba(2, 132, 199, 0.28);
}

body.light-theme .lifeos-help-result {
    color: var(--lifeos-text, #0f172a);
}

body.light-theme .lifeos-help-result:hover,
body.light-theme .lifeos-help-result:focus-visible {
    border-color: rgba(15, 23, 42, 0.2);
}

@media (max-width: 900px) {
    .lifeos-help-layout {
        grid-template-columns: 1fr;
    }

    .lifeos-help-nav {
        position: static;
        max-height: none;
    }

    .lifeos-help-nav-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
}

@media (max-width: 560px) {
    .lifeos-help-nav-list {
        grid-template-columns: 1fr;
    }

    .lifeos-help-panel {
        padding: 14px;
    }
}
