/* Guides page (guides.php, js/guides.js). v7 "Mission Control" (Oct 2026
   redesign): a field manual. The guide cards are numbered chapter tabs, the
   open guide is a manual page with a stripe spine, and the guide text has
   plain printed tables and boxed tips / warnings / notes.
   .guide-body and its parts (callouts, tables, figures) are also used by
   the 3D print pages (members_3d_print.php, members_3d_print_edit.php), so
   those stay unscoped. Site tokens only, so every theme follows.
   Plain words, no em dashes (site rule). */

.guides-container,
.guides-roster,
.guides-admin,
.guides-hidden,
.guide-panel {
    width: 100%;
    max-width: var(--page-w);
    margin: 1.5rem auto;
    padding: 0 var(--gutter);
    box-sizing: border-box;
}

/* The tabs line up with the picture band's left edge, not centred. */
body[data-page="guides"] main > .os-tabs {
    margin-left: max(var(--gutter), calc((100% - var(--page-w)) / 2 + var(--gutter)));
    margin-right: auto;
}

.guides-manual-head {
    margin: 0 0 1.1rem;
}

.guides-plate {
    margin: 0 0 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--ink-2);
    font-weight: 500;
}

.guides-section-title {
    margin: 0 0 1rem;
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    line-height: 1.2;
    text-align: left;
    text-transform: none;
    letter-spacing: 0.02em;
    color: var(--ink);
}

.guides-manual-head .guides-section-title {
    margin: 0;
}

/* "LIVE 4.10.1" in the picture band: a small CRT readout. */
.guides-live {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.2rem 0.75rem;
    border-radius: 0;
    background: var(--crt);
    box-shadow: inset 0 0 0 2px #000, 0 0 0 2px rgba(77, 163, 255, 0.35);
    color: var(--phosphor);
    font-family: var(--font-crt);
    font-size: 1.35rem;
    line-height: 1.1;
    letter-spacing: 0.06em;
    text-shadow: none;
}

/* ------------------------------------------------------------ chapter cards */

.guides-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    counter-reset: guides-chapter;
}

.guide-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: 0 0 0 transparent;
    color: var(--ink);
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}

.guide-card:not(.guide-card-add):not(.guides-preview-card) {
    counter-increment: guides-chapter;
}

.guide-card:hover {
    background: var(--sheet-2);
}

/* The open chapter: pressed in, dark like a lit key. */
.guide-card.is-active {
    background: var(--solid);
    color: var(--on-solid);
    transform: translateY(2px);
    box-shadow: 0 0 0 transparent;
}

.guide-card-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    width: 100%;
    height: 100%;
    padding: 0.7rem 0.7rem 0.9rem;
    box-sizing: border-box;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.guide-card-open:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: -5px;
    border-radius: 0;
}

.guide-card-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0;
    background: var(--sheet-3);
}

.guide-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 0.6s ease;
}

.guide-card-title {
    display: block;
    margin-top: auto;
    padding: 0 0.2rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: uppercase;
    color: inherit;
    overflow-wrap: anywhere;
    font-weight: 500;
}

/* "CH 01" above each title. */
.guide-card:not(.guide-card-add):not(.guides-preview-card) .guide-card-title::before {
    content: "Ch " counter(guides-chapter, decimal-leading-zero);
    display: block;
    margin-bottom: 0.3rem;
    color: var(--accent);
    font-size: 0.6rem;
    letter-spacing: 0.04em;
}

.guide-card:hover .guide-card-img img {
    scale: 1.05;
}

@media (prefers-reduced-motion: reduce) {
    .guide-card:hover .guide-card-img img {
        scale: 1;
    }
}

.guides-empty {
    text-align: left;
    color: var(--ink-2);
}

@media screen and (max-width: 1024px) {
    .guides-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 480px) {
    .guides-grid {
        gap: 0.75rem;
    }

    .guide-card-open {
        padding: 0.55rem 0.55rem 0.75rem;
    }

    .guide-card-title {
        font-size: 0.68rem;
    }
}

/* ------------------------------------------------------------ open guide: a manual page */

.guide-panel[hidden] {
    display: none;
}

.guide-panel.is-open {
    animation: guidesIn 0.35s ease;
}

@keyframes guidesIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .guide-panel.is-open {
        animation: none;
    }
}

.guide-panel {
    scroll-margin-top: 1rem;
}

.guide-panel-inner,
.guides-roster {
    position: relative;
    box-sizing: border-box;
}

.guide-panel-inner {
    width: 100%;
    padding: clamp(1.2rem, 3vw, 2.2rem) clamp(1.2rem, 3.5vw, 2.6rem) clamp(1.2rem, 3vw, 2rem) clamp(1.2rem, 3.5vw, 2.6rem);   /* 6.66: no stripe band down the left (Matt) */
    background: var(--sheet);
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: 0 0 0 transparent;
    overflow: hidden;
}

.guide-kicker {
    margin: 0 3.25rem 0.5rem 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--ink-2);
    font-weight: 500;
}

.guide-title {
    margin: 0 3.25rem 0.9rem 0;
    font-size: clamp(1.3rem, 2.6vw, 2rem);
    line-height: 1.12;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.guide-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 1.4rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--rule-soft);
}

.guide-pill {
    display: inline-block;
    padding: 0.12rem 0.65rem;
    border: 1px solid var(--rule-soft);
    border-radius: 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.4;
    text-transform: none;
    color: var(--ink);
    white-space: nowrap;
}

.guide-pill.is-ok { border-color: var(--good); }
.guide-pill.is-warn { border-color: var(--warn); }
.guide-pill.is-hot { border-color: var(--bad); background: var(--bad); color: var(--on-accent); }
.guide-pill.is-off { border-color: var(--rule-soft); color: var(--ink-3); }
.guide-pill.is-info { border-color: var(--link); }

/* The guide's own text (also the event roster, the editor preview and the
   3D print pages). */
.guide-body {
    color: var(--ink);
    overflow-wrap: break-word;
}

.guide-body p,
.guide-body li {
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--ink);
}

.guide-body p {
    margin: 0.4rem 0 0.9rem;
}

/* Reading width for running text; pictures and tables keep the page width. */
.guide-panel .guide-body > p,
.guide-panel .guide-body > ul,
.guide-panel .guide-body > ol,
.guide-panel .guide-body > h3,
.guide-panel .guide-body > h4 {
    max-width: 78ch;
}

.guide-body ul,
.guide-body ol {
    margin: 0.3rem 0 1rem 1.25rem;
    padding-left: 0.5rem;
}

.guide-body ul li::marker {
    color: var(--accent);
}

.guide-body ol li::marker {
    color: var(--ink-2);
    font-weight: 700;
}

.guide-body li {
    margin-bottom: 0.4rem;
}

.guide-body li > ul,
.guide-body li > ol {
    margin: 0.4rem 0 0.2rem 0.5rem;
}

.guide-body h3,
.guide-body h4 {
    margin: 1.9rem 0 0.7rem;
    font-size: 1.00rem;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--ink);
    font-weight: 500;
}

.guide-body h3 {
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--rule);
}

.guide-body h4 {
    margin-top: 1.4rem;
    font-size: 0.86rem;
    color: var(--ink-2);
}

.guide-body a {
    color: var(--link);
}

.guide-body a:hover {
    color: var(--ink);
}

.guide-body strong,
.guide-body b {
    color: var(--ink);
}

.guide-body code {
    padding: 0.05rem 0.35rem;
    border-radius: 0;
    background: var(--sheet-3);
    color: var(--ink);
    font-size: 0.9em;
}

.guide-body pre.guide-code {
    overflow-x: auto;
    padding: 0.8rem 1rem;
    border: 1px solid var(--rule);
    border-radius: 0;
    background: var(--sheet-2);
}

.guide-body pre.guide-code code {
    padding: 0;
    background: none;
}

.guide-body hr {
    margin: 1.6rem 0;
    border: 0;
    border-top: 1px dashed var(--rule-soft);
}

.guide-figure {
    margin: 1.2rem 0 1.4rem;
}

.guide-figure img {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border: 1px solid var(--rule);
    border-radius: 0;
    background: var(--sheet-3);
}

.guide-figure figcaption {
    margin-top: 0.45rem;
    padding-left: 0.7rem;
    border-left: 1px solid var(--accent);
    font-size: 0.88rem;
    color: var(--ink-2);
}

.guide-table-wrap {
    width: 100%;
    margin: 0.7rem 0 1.2rem;
    overflow-x: auto;
    border: 1px solid var(--rule);
    border-radius: 0;
    background: var(--sheet);
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

.guide-table th,
.guide-table td {
    padding: 0.55rem 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--rule-soft);
    text-align: left;
    vertical-align: top;
    color: var(--ink);
}

.guide-table tr:last-child td {
    border-bottom: 0;
}

.guide-table th {
    background: var(--sheet-3);
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
}

.guide-table tbody tr:nth-child(even) td {
    background: var(--sheet-2);
}

/* Call-out boxes: > [!TIP] / > [!WARNING] / > [!NOTE] */
.guide-callout {
    position: relative;
    margin: 1.1rem 0;
    padding: 0.85rem 1rem 0.85rem 1.2rem;
    border: 1px solid var(--rule);
    border-left-width: 8px;
    border-radius: 0;
    background: var(--sheet-2);
}

.guide-callout > :first-child { margin-top: 0; }
.guide-callout > :last-child { margin-bottom: 0; }

.guide-callout p,
.guide-callout li {
    color: var(--ink);
}

.guide-callout.is-tip {
    border-color: var(--good);
}

.guide-callout.is-warn {
    border-color: var(--bad);
}

.guide-callout.is-note {
    border-color: var(--warn);
}

/* Copy link + Close, side by side under the guide. */
.guide-panel-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--rule-soft);
}

.guide-close-btn {
    display: flex;
    margin: 1.75rem 0 0;
}

.guide-panel-foot .guide-close-btn {
    margin: 0;
}

.guide-close-x {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 0;
    background: var(--sheet);
    color: var(--ink);
    font-size: 16px;
    cursor: pointer;
}

.guide-close-x:hover,
.guide-close-x:focus-visible {
    background: var(--sheet-3);
}

@media screen and (max-width: 480px) {
    .guide-panel-inner {
        padding: 1.1rem 1rem;
    }

    .guide-panel-foot .os-btn {
        flex: 1 1 100%;
    }
}

/* ------------------------------------------------------------ roster */

.guides-roster {
    padding: 1.4rem 1.6rem;
    background: var(--sheet);
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: 0 0 0 transparent;
    max-width: calc(var(--page-w) - 2 * var(--gutter));
}

.guides-roster-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.guides-roster .guides-section-title {
    margin-bottom: 0.9rem;
}

.guides-roster .guide-body > p:last-child {
    margin-bottom: 0;
    font-size: 0.88rem;
    color: var(--ink-2);
}

@media screen and (max-width: 1250px) {
    .guides-roster {
        width: auto;
        margin-inline: var(--gutter);
    }
}

@media screen and (max-width: 480px) {
    .guides-roster {
        padding: 1rem;
    }
}

/* ------------------------------------------------------------ admin */

.guides-admin[hidden] {
    display: none;
}

/* The Admin tab: three equal buttons in a row. An <a> and a <button> size
   differently by default, so the box model, height and width are set here. */
.guides-admin-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 900px;
    margin: 0;
}

.guides-admin-bar .os-btn {
    box-sizing: border-box;
    width: 100%;
    height: var(--control-h);
    min-height: 0;
    margin: 0;
    padding: 0 1rem;
    line-height: 1;
    white-space: nowrap;
}

.guides-admin > .guides-admin-line,
.guides-admin > .guides-admin-warn {
    text-align: left;
}

@media screen and (max-width: 700px) {
    .guides-admin-bar {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The Admin tab lights up when the guides may be out of date. */
.os-tab.has-alert {
    position: relative;
}

.os-tab.has-alert::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 7px;
    width: 9px;
    height: 9px;
    border-radius: 0;
    background: var(--warn);
    box-shadow: 0 0 0 2px var(--sheet-3);
}

.guides-admin-line {
    margin: 0.7rem 0 0;
    font-size: 0.92rem;
    color: var(--ink-2);
}

.guides-admin-warn {
    margin: 0.7rem 0 0;
    padding-left: 0.7rem;
    border-left: 4px solid var(--bad);
    font-size: 0.95rem;
    color: var(--ink);
}

.guides-update {
    max-width: 900px;
    margin: 1.2rem 0 0;
    box-sizing: border-box;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--rule);
    border-left: 8px solid var(--warn);
    border-radius: 0;
    background: var(--sheet);
    color: var(--ink);
}

.guides-update-title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ink);
    font-weight: 500;
}

.guides-update p,
.guides-update li {
    font-size: 0.95rem;
    color: var(--ink);
}

.guides-news-head {
    font-weight: 700;
}

.guides-news {
    margin: 0.2rem 0 0.9rem 1.2rem;
}

.guides-news a {
    color: var(--link);
}

.guides-news-date {
    color: var(--ink-3);
    font-size: 0.85rem;
}

/* Edit / move / delete on each card (admins only). */
.guides-card-tools {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
    z-index: 2;
}

.guides-card-tools.is-inline {
    position: static;
}

/* The empty part of the tool strip lets clicks through to the card. */
.guides-card-tools:not(.is-inline) {
    pointer-events: none;
}

.guides-card-tools:not(.is-inline) > * {
    pointer-events: auto;
}

/* Narrow cards (two to a row on a phone): the four buttons wrap instead of
   running off the card's left edge. */
.guides-card-tools:not(.is-inline) {
    left: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.guides-icon-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 0;
    background: var(--sheet);
    color: var(--ink);
    font-size: 0.8rem;
    cursor: pointer;
}

.guides-icon-btn:hover,
.guides-icon-btn:focus-visible {
    background: var(--sheet-3);
}

.guides-icon-btn.is-danger:hover {
    border-color: var(--bad);
    color: var(--bad);
}

.guides-icon-btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.guide-card.guide-card-add {
    border-style: dashed;
    box-shadow: none;
    background: transparent;
}

.guide-card-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--accent);
    background: var(--sheet-2);
    border: 1px dashed var(--rule-soft);
    box-sizing: border-box;
}

.guides-admin .guides-hidden {
    margin: 2rem 0 0;
    padding: 0;
}

.guides-admin .guides-hidden > .guides-admin-line {
    text-align: left;
}

.guides-hidden-list {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.guides-hidden-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1rem;
    margin-bottom: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: var(--sheet);
    border: 1px solid var(--rule-soft);
    border-radius: 0;
    font-size: 1rem;
}

.guides-hidden-title {
    flex: 1 1 14rem;
    font-weight: 700;
}

.guides-hidden-meta {
    color: var(--ink-3);
    font-size: 0.85rem;
}

/* ------------------------------------------------------------ editor popup
   z-index 1200 = the popups layer on the scale at the top of root.css. */

.guides-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: calc(var(--nav-height, 46px) + 1rem) 1rem 2rem;
    overflow-y: auto;
    background: rgba(5, 6, 8, 0.6);
    box-sizing: border-box;
}

body.guides-modal-open {
    overflow: hidden;
}

.guides-modal {
    position: relative;
    width: 100%;
    max-width: 820px;
    padding: 1.9rem 1.6rem 1.4rem;
    box-sizing: border-box;
    background: var(--sheet);
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: 0 0 0 transparent, 0 30px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.guides-modal-title {
    margin: 0 2.75rem 1.1rem 0;
    font-size: 1.05rem;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ink);
    font-weight: 500;
}

.guides-modal .guide-close-x {
    top: 1.4rem;
}

.guides-field {
    display: block;
    margin-bottom: 1rem;
}

.guides-file {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.55rem;
    box-sizing: border-box;
    border: 2px dashed var(--ink-3);
    border-radius: 0;
    background: var(--sheet-2);
    color: var(--ink);
    font-size: 0.9rem;
}

.guides-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--ink-2);
}

.guides-hint a {
    color: var(--link);
}

.guides-paste {
    margin: -0.4rem 0 1rem;
    font-size: 0.9rem;
    color: var(--ink-2);
}

.guides-paste summary {
    cursor: pointer;
    color: var(--link);
    font-weight: 600;
}

.guides-textarea {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.65rem;
    box-sizing: border-box;
    border: 1px solid var(--rule);
    border-radius: 0;
    background: var(--sheet);
    color: var(--ink);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.9rem;
    resize: vertical;
}

.guides-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.guides-warnings {
    margin: 0 0 0.9rem;
    padding: 0.65rem 0.9rem 0.65rem 1.9rem;
    border: 1px solid var(--rule);
    border-left: 8px solid var(--warn);
    border-radius: 0;
    background: var(--sheet-2);
}

.guides-warnings[hidden],
.guides-preview[hidden] {
    display: none;
}

.guides-warnings li {
    font-size: 0.9rem;
    color: var(--ink);
}

.guides-preview {
    margin-top: 1.3rem;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--rule-soft);
}

.guides-preview-card {
    max-width: 280px;
    margin: 0 0 1rem;
}

.guides-preview .guide-panel-inner {
    padding: 1rem 1.1rem;
}

/* App mode: "Read offline: get the app" in the picture band. */
.guides-page .guides-app,
.bg-guides .guides-app {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.7rem;
    padding: 0.35rem 0.9rem;
    border: 2px solid #F2F4F7;
    border-radius: 0;
    background: rgba(5, 6, 8, 0.6);
    color: #F2F4F7;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
}

.bg-guides .guides-app:hover,
.bg-guides .guides-app:focus-visible {
    background: #F2F4F7;
    color: #07090C;
}

/* ------------------------------------------------------------ high contrast */
.theme-contrast .guides-live {
    background: #000;
    box-shadow: inset 0 0 0 2px #fff;
    text-shadow: none;
}

.theme-contrast .guide-card.is-active {
    background: #FFE000;
    color: #000;
}

.theme-contrast .guide-card.is-active .guide-card-title::before {
    color: #000;
}

/* ------------------------------------------------------------ phones */
@media screen and (max-width: 600px) {
    /* The picture band grows with its text (title, subtitle plate, live
       version, app link) instead of cutting the title off at the top. */
    .bg-container.bg-guides {
        height: auto;
        min-height: 220px;
        padding-top: 3.5rem;
    }

    .bg-guides .bg-container-text p {
        font-size: 0.62rem;
    }

    /* The three tabs stay on one row. */
    body[data-page="guides"] main > .os-tabs {
        flex-wrap: nowrap;
        max-width: calc(100% - 2 * var(--gutter));
        overflow-x: auto;
    }

    body[data-page="guides"] main > .os-tabs .os-tab {
        padding-inline: 0.85rem;
        font-size: 0.6rem;
        white-space: nowrap;
    }
}

/* ==========================================================================
   22 Oct 2026 (Matt: "the guide cards to be down the side and the guide pop
   up on the right of the page - like how the loadout builder looks for ships
   ... please make this a global theme change"): the list of guides down the
   left, staying in view and scrolling by itself, the open guide on the right
   so it shows straight away. Site tokens only, so every theme follows; the
   maker themes' own card and panel shapes still apply. Phones and narrow
   windows: the list (shorter, scrolling), then the guide below it.
   ========================================================================== */
.guides-split {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
    width: 100%;
    max-width: var(--page-w);
    margin: 1.5rem auto;
    padding: 0 var(--gutter);
    box-sizing: border-box;
}

.guides-split .guides-container,
.guides-split .guide-panel {
    max-width: none;
    margin: 0;
    padding: 0;
}

.guides-list-col {
    position: sticky;
    top: 1rem;
    min-width: 0;
    padding-top: 0.9rem;
    background: var(--sheet);
    border: 1px solid var(--rule);
    color: var(--ink);
}

.guides-list-col .guides-manual-head {
    margin: 0 0 0.7rem;
    padding: 0 0.9rem;
}

.guides-list-col .guides-section-title {
    font-size: 1.1rem;
}

.guides-list-col .guides-grid {
    display: block;
    max-height: calc(100vh - 150px);
    min-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--rule-soft);
    scrollbar-width: thin;
    scrollbar-color: var(--rule) transparent;
}

.guides-list-col .guide-card {
    border: 0;
    border-bottom: 1px solid var(--rule-soft);
    background: transparent;
    transform: none;
}

.guides-list-col .guide-card:hover {
    background: var(--sheet-2);
}

.guides-list-col .guide-card.is-active {
    background: var(--solid);
    color: var(--on-solid);
}

.guides-list-col .guide-card-open {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
}

.guides-list-col .guide-card-img {
    width: 72px;
    aspect-ratio: 16 / 10;
}

.guides-list-col .guide-card-title {
    margin-top: 0;
    padding: 0;
    font-size: 0.74rem;
}

/* Admins: a guide's tools sit under its name in the list, not over it. */
.guides-list-col .guides-card-tools:not(.is-inline) {
    position: static;
    justify-content: flex-start;
    padding: 0 0.9rem 0.6rem calc(0.9rem + 72px + 0.75rem);
    pointer-events: auto;
}

.guides-list-col .guide-card.guide-card-add {
    border-bottom-style: dashed;
}

.guides-list-col .guide-card-plus {
    font-size: 1.4rem;
}

.guides-read-col {
    min-width: 0;
}

.guides-pick-hint {
    margin: 0;
    padding: 2.5rem 1.5rem;
    border: 1px dashed var(--rule);
    background: var(--sheet);
    color: var(--ink-2);
    text-align: center;
}

.guides-pick-hint[hidden] {
    display: none;
}

.guides-pick-hint .fa {
    margin-right: 0.4rem;
    color: var(--accent);
}

@media (max-width: 900px) {
    .guides-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .guides-list-col {
        position: static;
    }

    .guides-list-col .guides-grid {
        max-height: min(22rem, 55vh);
        min-height: 0;
    }
}

/* The picked guide's "CH 01" reads on its lit background. */
.guides-list-col .guide-card.is-active .guide-card-title::before {
    color: inherit;
}
