/* 2026-11-01 — player guides (/guides, /guides/{sport}) and the PDF export, which inlines this same file.
   Colours are the site's theme tokens; each has a light fallback so the PDF (printed without qse-theme.css) reads
   as the light theme. */

.guide-wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; color: var(--qse-text, #1A2340); }
.guide-crumb { margin: 0 0 8px; font-size: .9rem; }
.guide-muted { color: var(--qse-text-muted, #5c636a); font-size: .9rem; }
.guide-badge { display: inline-block; margin-bottom: 6px; padding: 2px 8px; border-radius: 999px; font-size: .75rem;
    background: var(--qse-accent, #966500); color: var(--qse-on-accent, #fff); }
.guide-draft { padding: 8px 12px; border-left: 4px solid var(--qse-accent, #966500); background: var(--qse-surface, #fff); }

/* Button groups: equal cells, first column flush left (UI alignment rule, 2026-10-24). */
/* 2026-11-16 (owner: "Text should never extend outside of a button"): the row's buttons share one width - the longest
   label's (an inline grid's 1fr columns size to the widest item), at least 180px - instead of fixed 180px cells that a
   long label ("Start a Baseball league") spilled out of. Below 992px they stack full width. */
.guide-actions { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 10px; align-items: center; margin: 12px 0 20px; }
@media (max-width: 991px) {
    .guide-actions { display: grid; grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; }
}
.guide-actions .btn { width: 100%; }

.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.guide-card { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--qse-border, #e2e6ea); border-radius: 10px; background: var(--qse-surface, #fff); }
/* Cards in a row share one height and their buttons sit on one line along the bottom (UI alignment rule). */
.guide-card .guide-actions { margin-top: auto; }
.guide-card h2, .guide-card h3 { font-size: 1.25rem; margin: 0 0 6px; }
.guide-card .guide-badge { align-self: flex-start; }
.guide-card h2 a { text-decoration: none; }
.guide-card .guide-actions { margin-bottom: 0; display: grid; grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
.guide-actions .btn { white-space: nowrap; }
@media (max-width: 480px) {
    .guide-card .guide-actions { grid-template-columns: 1fr; }   /* phones: stacked, full width, one line each */
}

.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
/* Grid items default to min-width:auto, so a wide table (nowrap cells) would stretch the article past a phone screen;
   its own .guide-live box scrolls instead. */
.guide-layout > *, .hole-grid > * { min-width: 0; }
.guide-toc { position: sticky; top: 80px; font-size: .9rem; }
.guide-toc summary { font-weight: 600; cursor: pointer; margin-bottom: 6px; }
.guide-toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--qse-border, #e2e6ea); }
.guide-toc li a { display: block; padding: 4px 10px; text-decoration: none; color: var(--qse-text-muted, #5c636a); }
.guide-toc li a:hover { color: var(--qse-text, #1A2340); }
@media (max-width: 860px) {
    .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .guide-toc { position: static; }
}

.guide-body { max-width: 760px; line-height: 1.6; }
.guide-body h2 { margin: 2rem 0 .75rem; padding-top: .5rem; border-top: 1px solid var(--qse-border, #e2e6ea); font-size: 1.5rem; scroll-margin-top: 80px; }
.guide-body h2:first-child { border-top: 0; margin-top: 0; }
.guide-body h3 { margin: 1.5rem 0 .5rem; font-size: 1.15rem; scroll-margin-top: 80px; }
.guide-body li { margin-bottom: .35rem; }
.guide-body img { max-width: 100%; height: auto; border: 1px solid var(--qse-border, #e2e6ea); border-radius: 6px; }
.guide-body table, .guide-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.guide-body th, .guide-body td { padding: 6px 10px; border-bottom: 1px solid var(--qse-border, #e2e6ea); text-align: left; vertical-align: top; }
.guide-body thead th { border-bottom: 2px solid var(--qse-border-strong, #8892A6); }
.guide-live { overflow-x: auto; }
.guide-table th, .guide-table td { white-space: nowrap; }   /* numbers stay whole; the table scrolls in .guide-live */
.guide-body .tip, .guide-body .note { margin: 1rem 0; padding: 10px 14px; border-left: 4px solid var(--qse-golf, #5AB130); background: var(--qse-surface, #fff); }
.guide-missing { color: #b42318; font-weight: 600; }
.guide-total td { font-weight: 600; border-bottom-color: var(--qse-border-strong, #8892A6); }

/* ---- course guides (GolfCourseGuides) ---- */
.guide-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin: 0 0 1rem; }
.guide-figure { margin: 0 0 .5rem; }
.guide-figure img { display: block; width: 100%; max-width: 760px; height: auto; }
/* Images reserve their space before they load, so a contents link lands on its heading: screenshots carry width/height,
   and every course map is square (aspect-ratio + contain covers one that isn't). */
.course-map img { aspect-ratio: 1; object-fit: contain; }
.guide-figure figcaption { font-size: .9rem; color: var(--qse-text-muted, #5c636a); margin-top: 4px; }
.guide-links { font-size: .95rem; }
.hole-jump { display: grid; grid-template-columns: repeat(auto-fill, 40px); gap: 6px; margin: .5rem 0 1rem; }
.hole-jump a { display: block; height: 36px; line-height: 36px; text-align: center; border: 1px solid var(--qse-border, #e2e6ea); border-radius: 6px; text-decoration: none; }
.hole-card { padding: 1rem 0; border-top: 1px solid var(--qse-border, #e2e6ea); scroll-margin-top: 80px; }
.guide-body .hole-card h3 { margin-top: 0; }
.hole-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.hole-svg { display: block; width: 100%; height: 400px; border-radius: 8px; background: #5f8f43; }
.hole-svg .hd-lbl { fill: #fff; font-family: system-ui, sans-serif; font-weight: 600; paint-order: stroke; stroke: #1d3a12; stroke-width: .28em; }
.hole-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 .75rem; }
.hole-facts dt { font-weight: 600; }
.hole-facts dd { margin: 0; }
.wind-arrow { width: 1.1em; height: 1.1em; vertical-align: -0.18em; margin-right: 6px; color: var(--qse-text, #1A2340); }
@media (max-width: 560px) {
    .hole-grid { grid-template-columns: minmax(0, 1fr); }
    .hole-svg { height: 320px; }
}

/* ---- playbooks (FootballPlaybooks) ---- */
.pb-defs { position: absolute; width: 0; height: 0; }
.pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin: 1rem 0 1.5rem; }
.pb-card { padding: 12px; border: 1px solid var(--qse-border, #e2e6ea); border-radius: 10px; background: var(--qse-surface, #fff); scroll-margin-top: 80px; }
.guide-body .pb-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.pb-svg { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; }
.pb-meta { margin: .5rem 0 .25rem; font-size: .85rem; color: var(--qse-text-muted, #5c636a); }
.pb-tags p { margin: .2rem 0; font-size: .9rem; line-height: 1.4; }
.pb-strong b { color: var(--qse-positive, #146c43); }
.pb-beats b { color: var(--qse-blue, #2C6FD6); }
.pb-weak b { color: #c0392b; }
.pb-even { color: var(--qse-text-muted, #5c636a); }

/* ---- PDF (tools/QSEGames.GuideExport prints a page with <body class="guide-print">) ---- */
.guide-print { margin: 0; font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1A2340; background: #fff; }
.guide-print h1, .guide-print h2, .guide-print h3 { font-family: 'Exo 2', system-ui, sans-serif; }
.guide-print .guide-body { max-width: none; font-size: 10.5pt; }
.guide-cover { height: 9.2in; display: flex; flex-direction: column; justify-content: center; break-after: page; }
.guide-cover .kick { color: #966500; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: 11pt; }
.guide-cover h1 { font-size: 34pt; margin: 6px 0 12px; }
.guide-cover p { font-size: 13pt; color: #5c636a; max-width: 5.5in; }
.guide-print-toc { break-after: page; }
.guide-print-toc ol { padding-left: 2.2rem; line-height: 1.9; }
.guide-print-toc ul { list-style: none; padding-left: 1rem; margin: 0 0 .4rem; columns: 2; font-size: 9.5pt; line-height: 1.6; color: #5c636a; }
.guide-group { margin: 2rem 0 .75rem; font-size: 1.35rem; }
@media print {
    .guide-body h2, .guide-body h3 { break-after: avoid; }
    /* A scroll container prints as one unbreakable block, and a whole-table avoid leaves half a page blank:
       let tables split between rows (Chrome repeats the header row). */
    .guide-live { overflow: visible; }
    .guide-body tr, .guide-body li, .guide-body img, .guide-body .tip, .guide-body .note, .hole-card { break-inside: avoid; }
    .hole-jump, .guide-links { display: none; }
    .hole-svg { height: 3.4in; }
    .pb-grid { grid-template-columns: repeat(2, 1fr); }
    .pb-card { break-inside: avoid; }
    .pb-svg { width: 2.5in; margin: 0 auto; }   /* four cards a page */
    .course-map { break-after: page; }   /* a course guide's scorecard starts on its own page */
    .guide-body a { color: inherit; text-decoration: none; }
}
