/* Help pages (ROADMAP F21, templates/help/) and the first-visit tour (static/js/tour.js). Tokens from app.css. */

.help-page { max-width: 1150px; }

/* index */
.help-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

a.help-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    color: var(--ink);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

/* lifts slightly on hover, like the tool cards (ROADMAP F88) */
a.help-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.help-card-title { font-size: calc(18px * var(--text-scale, 1)); font-weight: 600; color: var(--link); }
.help-card-text { color: var(--ink-dim); font-size: calc(16px * var(--text-scale, 1)); }
.help-foot { margin-top: 18px; color: var(--ink-dim); }

/* topic pages */
.help-crumb { margin: 0; font-size: var(--fs-meta); color: var(--ink-faint); }
.help-crumb a { color: var(--link); }

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

.help-menu { position: sticky; top: 12px; }
.help-menu ul { list-style: none; margin: 0; padding: 0; }
.help-menu li a {
    display: block;
    padding: 6px 10px;
    border-radius: var(--radius, 8px);
    color: var(--ink-dim);
    text-decoration: none;
    font-size: calc(16px * var(--text-scale, 1));
}
.help-menu li a:hover { background: var(--panel-2); color: var(--ink); }
.help-menu li a.active { background: var(--panel-2); color: var(--ink); font-weight: 600; }
.help-menu-foot { margin-top: 12px; padding: 0 10px; font-size: calc(15px * var(--text-scale, 1)); line-height: 1.8; }
.help-menu-foot a { color: var(--link); }

.help-text { max-width: 82ch; font-size: calc(17px * var(--text-scale, 1)); line-height: 1.6; }
.help-text h2 { font-size: calc(19px * var(--text-scale, 1)); font-weight: 600; margin: 22px 0 8px; }
.help-text h2:first-child { margin-top: 0; }
.help-text a { color: var(--link); }
.help-text ul, .help-text ol { padding-inline-start: 22px; }
.help-text li { margin-bottom: 6px; }
.help-text code { color: var(--ink); background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-size: calc(15.5px * var(--text-scale, 1)); }
.help-lead { font-size: calc(18px * var(--text-scale, 1)); color: var(--ink); }
.help-note { color: var(--ink-dim); font-size: calc(16px * var(--text-scale, 1)); }

.help-example {
    margin: 12px 0 14px;
    padding: 10px 14px;
    border-inline-start: 3px solid var(--accent);
    background: var(--panel-2);
    border-radius: 0 var(--radius, 8px) var(--radius, 8px) 0;
    font-size: calc(16.5px * var(--text-scale, 1));
}

.help-table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: calc(16px * var(--text-scale, 1)); }
.help-table th, .help-table td { text-align: start; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; white-space: normal; }   /* sentences wrap: no sideways scroll in the help (2026-10-30) */
.help-table th { color: var(--ink-dim); font-weight: 600; }

@media (max-width: 768px) {
    .help-layout { grid-template-columns: 1fr; }
    .help-menu { position: static; }
    .help-menu ul { display: flex; flex-wrap: wrap; gap: 4px; }
    .help-table { font-size: calc(15px * var(--text-scale, 1)); }
}
