/* The Guides library (js/guides.js): a dialog of its own, wide enough to read a guide in, with the list of guides and
   then the guide chosen, rendered from Markdown (js/guides-md.js) in Lantern's own type and colours */
.guides-content { width: min(900px, calc(100vw - 32px)); max-height: 88vh; display: flex; flex-direction: column; }
.guides-head { display: flex; align-items: center; gap: 12px; }
.guides-head h3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guides-back, .guides-pdf, .guides-open { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text-primary); cursor: pointer; text-decoration: none; white-space: nowrap; }
.guides-back:hover, .guides-pdf:hover, .guides-open:hover { background: #f1f5f9; }
.guides-pdf { color: var(--accent); border-color: var(--accent); }
.guides-body { padding: 4px 22px 22px; outline: none; line-height: 1.55; }

/* the list: each guide a real button, reachable by keyboard */
.guide-entry { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; padding: 12px 8px; border-bottom: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.guide-entry:hover, .guide-entry:focus-visible { background: #f1f5f9; }
.guide-entry-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.guide-entry-main b { color: var(--text-primary); font-size: 15px; }
.guide-entry-desc { color: var(--text-secondary); font-size: 13px; }
.guide-entry-meta { color: var(--text-secondary); font-size: 12px; white-space: nowrap; }
/* a film: a link styled as an entry, marked with a play sign */
a.guide-film { text-decoration: none; }
a.guide-film .guide-entry-main b::before { content: '▶'; display: inline-block; width: 22px; height: 22px; line-height: 22px; margin-right: 8px; border-radius: 50%; background: #F9BF62; color: #0F2844; font-size: 10px; text-align: center; vertical-align: 2px; }
.guide-empty { color: var(--text-secondary); padding: 14px 0; }

/* a guide's own words */
.guides-body h1 { font-size: 24px; margin: 10px 0 4px; color: var(--text-primary); }
.guides-body h2 { font-size: 18px; margin: 26px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.guides-body h3 { font-size: 15px; margin: 18px 0 4px; color: var(--text-primary); }
.guides-body h4 { font-size: 14px; margin: 14px 0 2px; color: var(--text-primary); }
.guides-body p, .guides-body li { font-size: 14px; }
.guides-body ul, .guides-body ol { padding-left: 24px; margin: 6px 0; }
.guides-body li { margin: 3px 0; }
.guides-body a { color: var(--accent); }
.guides-body blockquote { margin: 12px 0; padding: 10px 14px; border-left: 3px solid #F9BF62; background: #FFF8EA; border-radius: 0 8px 8px 0; }
.guides-body blockquote p { margin: 0; font-size: 13.5px; }
.guides-body table { border-collapse: collapse; margin: 10px 0; font-size: 13.5px; }
.guides-body th { background: var(--text-primary); color: #fff; text-align: left; padding: 6px 12px; }
.guides-body td { border-bottom: 1px solid var(--border); padding: 5px 12px; vertical-align: top; }
.guides-body tbody tr:nth-child(even) td { background: #f8fafc; }
.guides-body hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.guides-body code { background: #f1f5f9; border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }
.guides-body pre { background: #f1f5f9; border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow-x: auto; }
.guides-body pre code { border: 0; background: none; padding: 0; }
.guides-body figure { margin: 14px 0; text-align: center; }
.guides-body img { max-width: 100%; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 2px 10px rgba(9, 24, 44, .08); }
.guides-body figcaption { font-size: 12px; color: var(--text-secondary); margin-top: 5px; }
.guide-img-missing { border: 1px dashed var(--border); border-radius: 8px; padding: 22px 12px; color: var(--text-secondary); font-size: 13px; background: #f8fafc; margin: 6px auto; max-width: 520px; }
@media (max-width: 640px) {
    .guides-body { padding: 4px 14px 16px; }
    .guide-entry { flex-direction: column; align-items: flex-start; gap: 4px; }
}
