/* Help pages (Overview + Guide) */

.help-content {
    max-width: 960px;
    margin: 0 auto;
    line-height: 1.7;
}

.help-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .help-content table {
        display: block;
        overflow-x: auto;
    }
}

.help-content th {
    background: var(--brand-dark);
    color: white;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.help-content td {
    padding: 10px 14px;
    border-bottom: 1px solid #dee2e6;
}

.help-content tr:nth-child(even) {
    background: #f8f9fa;
}

.help-content h1 {
    font-size: 2rem;
    color: var(--brand-primary);
    border-bottom: 3px solid var(--brand-primary);
    padding-bottom: 12px;
    margin-bottom: 32px;
}

.help-content h1 + p {
    color: #5d6d7e;
    margin-bottom: 32px;
}

.help-subtitle {
    color: var(--bs-secondary-color);
    margin-top: -24px;
    margin-bottom: 24px;
}

.help-content h3 {
    font-size: 1.15rem;
    color: var(--brand-accent);
    margin-top: 28px;
    margin-bottom: 10px;
}

.help-content details {
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    margin: 16px 0;
    background: #fff;
}

.help-content details[open] {
    border-color: var(--brand-primary);
}

.help-content summary {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--brand-dark);
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-content summary::-webkit-details-marker { display: none; }

.help-content summary::before {
    content: '\25B6';
    font-size: 0.8rem;
    transition: transform 0.2s;
    color: var(--brand-primary);
}

.help-content details[open] > summary::before {
    transform: rotate(90deg);
}

.help-content summary:hover {
    background: #f8f9fa;
    border-radius: var(--radius-md);
}

.help-content .section-content {
    padding: 0 20px 20px;
}

.help-content .mermaid {
    text-align: center;
    margin: 24px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    border: 1px solid #dee2e6;
}

.help-content blockquote {
    border-left: 4px solid var(--brand-primary);
    padding: 12px 16px;
    margin: 16px 0;
    background: var(--brand-light);
    border-radius: 0 6px 6px 0;
    font-size: 0.95rem;
}

.help-content blockquote strong {
    color: var(--brand-dark);
}

.help-content .color-box {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Nested details (sub-accordions within .section-content) */
.help-content .section-content details {
    border-color: #dee2e6;
    margin: 12px 0;
    padding: 0;
}

.help-content .section-content details[open] {
    border-color: var(--brand-accent);
}

.help-content .section-content summary {
    font-size: 1rem;
    font-weight: 600;
    padding: 0 14px;
    height: 42px;
    display: flex;
    align-items: center;
}

.help-content .section-content details > :not(summary) {
    margin: 0 14px 10px;
}

/* Guide-specific */
.help-content .step p {
    margin: 0;
}

.help-content .step {
    background: var(--brand-light);
    border-left: 4px solid var(--brand-primary);
    padding: 14px 18px;
    margin: 20px 0;
    border-radius: 0 6px 6px 0;
}

.help-content .step strong:first-child {
    color: var(--brand-dark);
    display: block;
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.help-content .screenshot {
    display: block;
    max-width: 100%;
    margin: 16px auto;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.help-content .prereq {
    background: #fef9e7;
    border-left: 4px solid #f39c12;
    padding: 10px 16px;
    margin: 12px 0;
    border-radius: 0 6px 6px 0;
    font-size: 0.95rem;
}

.help-content .prereq strong {
    color: #7d6608;
}

.help-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.help-toolbar .help-search-wrapper {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.help-toolbar-btn {
    white-space: nowrap;
    padding: 9px 14px;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--brand-dark);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.help-toolbar-btn:hover {
    background: #f8f9fa;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.help-search-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.help-search-wrapper::before {
    content: '\1F50D';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    opacity: 0.5;
}

.help-search {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.help-search:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 114, 206, 0.12);
}

mark.help-highlight {
    background: #fff3cd;
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

.help-lang-switcher {
    display: flex;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.help-lang-btn {
    padding: 9px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #fff;
    color: var(--brand-dark);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-right: 1px solid #dee2e6;
    line-height: 1;
}

.help-lang-btn:last-child {
    border-right: none;
}

.help-lang-btn:hover {
    background: #f8f9fa;
    color: var(--brand-primary);
}

.help-lang-btn.active {
    background: var(--brand-primary);
    color: #fff;
}

.help-no-results {
    color: #6c757d;
    text-align: center;
    padding: 32px 0;
    display: none;
}

.help-content pre {
    background: #f8f9fa;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid #dee2e6;
    overflow-x: auto;
    margin: 16px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.help-content pre code {
    background: none;
    padding: 0;
}

.help-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

@media (max-width: 600px) {
    .help-content summary { font-size: 1.1rem; }
}

@media print {
    .help-content .mermaid { break-inside: avoid; }
    .help-content .step { break-inside: avoid; }
    .help-content table { break-inside: avoid; }
    .help-content .screenshot { box-shadow: none; }
}
