/* Help page styles; shared tokens come from variables.css */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header a {
    color: var(--primary);
    text-decoration: none;
}

.header a:hover {
    text-decoration: underline;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    padding: 2rem 0 3rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.toc {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc h3 {
    margin-bottom: 1rem;
    color: var(--accent-gold);
}

.toc ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.toc a {
    color: var(--primary);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
}

.toc a:hover {
    text-decoration: underline;
}

section {
    margin-bottom: 3rem;
}

section h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--fill-primary);
}

section h3 {
    color: var(--accent-gold);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
}

.feature-card h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    margin: 0;
}

.tip {
    background: rgba(88, 166, 255, 0.1);
    border-left: 4px solid var(--accent-blue);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.tip strong {
    color: var(--accent-blue);
}

.warning {
    background: rgba(248, 81, 73, 0.1);
    border-left: 4px solid var(--accent-red);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.warning strong {
    color: var(--accent-red);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-green { background: rgba(39, 174, 96, 0.2); color: var(--accent-green); }
.badge-gold { background: rgba(243, 156, 18, 0.2); color: var(--accent-gold); }
.badge-purple { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.badge-blue { background: var(--primary-tint); color: var(--primary); }

ul, ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--text-secondary);
}

li {
    margin-bottom: 0.5rem;
}

code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-gold);
}

.event-badge-demo {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0.25rem;
}

.event-demo-spawn { background: rgba(76, 175, 80, 0.25); color: #81c784; border: 1px solid rgba(76, 175, 80, 0.5); }
.event-demo-exp { background: rgba(255, 193, 7, 0.25); color: #ffd54f; border: 1px solid rgba(255, 193, 7, 0.5); }
.event-demo-loot { background: rgba(156, 39, 176, 0.25); color: #ce93d8; border: 1px solid rgba(156, 39, 176, 0.5); }
.event-demo-spire { background: rgba(255, 87, 34, 0.2); color: #ff8a65; border: 1px solid rgba(255, 87, 34, 0.4); }

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
}

.faq-question:hover {
    background: var(--bg-tertiary);
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: -2px;
}

.faq-answer {
    padding: 0 1rem 1rem;
    color: var(--text-secondary);
}

.faq-item[open] .faq-question::after {
    transform: rotate(180deg);
}

.faq-question::after {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.2s;
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.event-demo-row {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.footer-line {
    margin-top: 0.5rem;
}

.footer-thanks {
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

@media (max-width: 768px) {
    .container { padding: 1rem; }
    .hero h2 { font-size: 1.5rem; }
    .toc ul { grid-template-columns: 1fr; }
}

/* Thumb-sized contents links on touch screens */
@media (pointer: coarse) {
    .toc ul { gap: 0.25rem; }
    .toc a { display: flex; align-items: center; min-height: 44px; }
}
