/* Help / instructions page — uses tokens from styles.css */

.help-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 56px;
}

.help-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 40vh;
    color: var(--text-medium);
    font-size: 0.95rem;
}

.help-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: help-spin 0.75s linear infinite;
}

@keyframes help-spin {
    to {
        transform: rotate(360deg);
    }
}

.help-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 37, 84, 0.08);
    box-shadow: var(--shadow-md);
    padding: 36px 32px;
    text-align: center;
}

.help-panel h2 {
    font-size: 1.35rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 650;
}

.help-panel p {
    color: var(--text-medium);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.65;
}

.help-public-gate .btn {
    margin-top: 20px;
}

.help-error .help-panel-copy {
    color: var(--status-error-text);
}

.help-hero {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.help-hero h1 {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.help-hero-sub {
    opacity: 0.92;
    font-size: 1rem;
    margin: 0 0 16px;
    line-height: 1.5;
}

.help-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.95;
}

.help-meta-item strong {
    font-weight: 600;
    margin-right: 6px;
}

.help-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.help-toolbar .btn {
    padding: 12px 28px;
    font-size: 1rem;
}

.help-doc-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 37, 84, 0.08);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.help-pdf-canvas {
    background: #777;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-height: 80vh;
    overflow-y: auto;
}

.help-pdf-page {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    line-height: 0;
}

.help-pdf-page canvas {
    display: block;
    max-width: 100%;
}

.help-page-count {
    font-size: 0.88rem;
    color: var(--text-medium);
    margin-left: auto;
    align-self: center;
}

.help-word-fallback {
    padding: 48px 32px;
    text-align: center;
}

.help-doc-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(0, 37, 84, 0.08);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.help-word-fallback h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin: 0 0 12px;
}

.help-word-fallback p {
    color: var(--text-medium);
    max-width: 460px;
    margin: 0 auto 22px;
    line-height: 1.65;
}

.help-viewer-error {
    padding: 28px;
    text-align: center;
    color: var(--status-error-text);
    background: var(--status-danger-bg-light);
}

.is-hidden {
    display: none !important;
}

@media (max-width: 640px) {
    .help-hero {
        padding: 22px 20px;
    }

    .help-pdf-canvas {
        padding: 12px;
        max-height: 65vh;
    }
}
