/**
 * Guides section, /guides/ and every page under it (UX batch R).
 * Loaded in the head by everywhere/onlysecurity-guides-nav.php on those
 * pages only, and on a blog post carrying .osg--post (body.os-guides-page). The pages are block editor content:
 * Group blocks carry the osg-* classes, [os_guide_nav] prints the crumbs,
 * the section list and previous and next, [os_explainer] the players.
 * Layout approved on the review page _local/ux-os-guides/ (workspace).
 */

.osg {
    --osg-ink: #141a26;
    --osg-muted: #5b6475;
    --osg-line: #e3e6ea;
    --osg-link: #046bd2;
    --osg-navy: #0f1623;
    font-family: Inter, system-ui, sans-serif;
    color: var(--osg-ink);
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px 64px;
}
.osg a { color: var(--osg-link); text-decoration: none; }
.osg a:hover { text-decoration: underline; text-underline-offset: 3px; }
.osg p { margin: 0; }

/* Block gaps would push grid and flex items out of line. Prefixed with .osg
 * so it outranks core's :root :where(.is-layout-flow) > *, which has the same
 * specificity as a single class and prints later in the head (UX batch T5:
 * the first card of each row sat 24 px above the rest). */
.osg .osg-doors > *, .osg .osg-cards > *, .osg .osg-card > *, .osg .osg-art > *, .osg .osg-step > *,
.osg .osg-help > *, .osg .osg-door > *, .osg .osg-close > * { margin-block: 0; }

/* A hub whose own content sits below the guides wrapper (page 10870, the
 * trainer hub) wraps only the crumbs and hero, so the end-of-page padding
 * would leave a white gap above that content (UX batch T4). */
.osg.osg--head { padding-bottom: 0; }

.osg-crumbs { font-size: 14px; color: var(--osg-muted); padding: 18px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.osg-crumbs span[aria-hidden] { color: #a3abb8; }
:root:not([data-tutor-theme="dark"]) .osg-crumbs span[aria-hidden] { color: #64748b; }
/* Tutor byline on the guides archive: #767c8e gave under 4.5:1. Body prefix beats Tutor's later sheet. */
:root:not([data-tutor-theme="dark"]) body .tutor-meta,
:root:not([data-tutor-theme="dark"]) body .tutor-meta > div { color: #5f6778; }

/* Hubs */
.osg .osg-hero { background: var(--osg-navy); color: #fff; border-radius: 14px; padding: 40px 28px; margin: 6px 0 32px; }
.osg .osg-hero h1 { color: #fff; font-size: clamp(30px, 5vw, 44px); line-height: 1.12; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.01em; }
.osg .osg-hero p { color: #c9d2e0; font-size: 18px; line-height: 1.55; max-width: 60ch; }
.osg-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 781px) { .osg-doors { grid-template-columns: 1fr; } }
.osg-door { border: 1px solid var(--osg-line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; background: #fff; }
.osg-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--osg-muted); }
.osg .osg-door h2 { font-size: 26px; line-height: 1.2; margin: 0; }
.osg-door p { color: var(--osg-muted); font-size: 16px; line-height: 1.55; }
.osg-door ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--osg-line); }
.osg-door li { border-bottom: 1px solid var(--osg-line); margin: 0; }
.osg-door li a { display: flex; justify-content: space-between; gap: 12px; padding: 13px 2px; min-height: 44px; box-sizing: border-box; align-items: center; font-weight: 500; }
.osg-door li a small { color: var(--osg-muted); font-weight: 400; font-size: 14px; white-space: nowrap; }
.osg .osg-btn a { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 8px; background: #2b2f36; color: #fff; font-weight: 600; }
.osg .osg-btn a:hover { text-decoration: none; background: #141a26; }
.osg-help { margin-top: 36px; border: 1px solid var(--osg-line); border-radius: 14px; padding: 20px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.osg-help p { font-size: 16px; }
.osg-help a { display: inline-flex; align-items: center; min-height: 44px; }

/* Member library sections */
.osg-sec { margin-top: 36px; scroll-margin-top: 100px; }
.osg .osg-sec h2 { font-size: 26px; margin: 0 0 6px; }
.osg-sec > p { margin: 0 0 18px; color: var(--osg-muted); }
.osg-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1024px) { .osg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .osg-cards { gap: 12px; } }
.osg-card { display: flex; flex-direction: column; gap: 8px; }
.osg-card .os-xv { width: 100%; }
.osg-card__title { font-size: 15px; line-height: 1.3; font-weight: 600; }
.osg-card__line { font-size: 13.5px; color: var(--osg-muted); line-height: 1.4; }
.osg-more { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.osg-more li { margin: 0; }
.osg-more a { display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--osg-line); border-radius: 10px; padding: 14px 16px; min-height: 48px; box-sizing: border-box; align-items: center; font-weight: 600; }
.osg-more a small { color: var(--osg-muted); font-weight: 400; }
.osg-lead { max-width: 440px; margin: 0 0 26px; }
.osg-lead--wide { max-width: 720px; }

/* Articles */
.osg-art { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 960px) { .osg-art { grid-template-columns: 1fr; gap: 0; } }
.osg-side { position: sticky; top: 100px; border-right: 1px solid var(--osg-line); padding-right: 20px; }
.osg-side__title { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--osg-muted); margin: 6px 0 10px !important; }
.osg-side ol, .osg-sectnav ol { list-style: none; margin: 0; padding: 0; }
.osg-side li, .osg-sectnav li { margin: 0; }
.osg-side a, .osg-sectnav a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--osg-ink); font-size: 15px; }
.osg-sectnav a { padding: 11px 16px; }
.osg-side a[aria-current], .osg-sectnav a[aria-current] { background: #eef3fb; color: var(--osg-link); font-weight: 600; }
@media (max-width: 960px) { .osg-side { display: none; } }
.osg-sectnav { display: none; border: 1px solid var(--osg-line); border-radius: 10px; margin: 4px 0 18px; }
.osg-sectnav summary { padding: 13px 16px; font-weight: 600; min-height: 48px; box-sizing: border-box; cursor: pointer; }
.osg-sectnav nav { padding: 0 0 8px; }
@media (max-width: 960px) { .osg-sectnav { display: block; } }
.osg .osg-main h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.12; margin: 0 0 10px; letter-spacing: -0.01em; }
.osg .osg-lede { font-size: 18px; line-height: 1.55; color: #394150; margin: 0 0 8px; max-width: 62ch; }
.osg .osg-meta { font-size: 14px; color: var(--osg-muted); margin: 0 0 20px; }
.osg-toc { background: #f6f8fb; border-radius: 12px; padding: 16px 18px; margin: 0 0 30px; }
.osg .osg-toc h2 { font-size: 15px; margin: 0 0 8px; }
.osg-toc ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 15.5px; }
.osg-toc li { margin: 0; }
.osg-step { border-top: 1px solid var(--osg-line); padding: 26px 0 8px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 28px; align-items: start; scroll-margin-top: 100px; }
@media (max-width: 781px) { .osg-step { grid-template-columns: 1fr; gap: 14px; } }
.osg .osg-step h2 { font-size: 22px; line-height: 1.25; margin: 0 0 8px; }
.osg-step h2 .n { color: var(--osg-link); margin-right: 6px; }
.osg .osg-step p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.6; color: #2c3340; }
.osg-step .os-xv--row { margin: 4px 0 8px; }
.osg-shot { margin: 0; }
.osg-shot img { width: 100%; height: auto; border-radius: 3.75%; display: block; box-shadow: 0 8px 28px rgba(15, 22, 35, 0.14); }
.osg-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 34px; }
.osg-pn a { border: 1px solid var(--osg-line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-height: 48px; box-sizing: border-box; }
.osg-pn a small { color: var(--osg-muted); font-size: 13px; }
.osg-pn a[rel="next"] { text-align: right; }

/* Blog post in the article layout (UX batch T7). No side list, so one
 * column at reading width; the theme prints the post title as the H1. A
 * section with no player drops the second column. */
.osg.osg--post { max-width: 1180px; }
/* Guides use the wide page (DEV-140, operator 2026-11-04: pages were squished). Reading text keeps a comfortable line length; tables, cards and video use the full width. */
.osg .osg-step--text .osg-step__text > p,
.osg .osg-step--text .osg-step__text > ul,
.osg .osg-step--text .osg-step__text > ol { max-width: 80ch; }
/* Intro: lede and meta on the left, the lead player on the right; stacked
 * on narrow screens (operator, 2026-09-30). */
.osg .osg-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 36px; align-items: center; margin: 0 0 30px; }
@media (max-width: 860px) { .osg .osg-intro { grid-template-columns: 1fr; gap: 16px; } }
.osg .osg-intro > * { margin-block: 0; }
.osg .osg-intro .osg-lead { max-width: none; margin: 0; }
.osg .osg-step--text { grid-template-columns: 1fr; }
.osg .osg-who, .osg .osg-step .osg-who { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--osg-muted); margin: 14px 0 4px; }
.osg .osg-step__text > .osg-who:nth-child(2) { margin-top: 0; }
.osg-compare { margin: 8px 0 28px; overflow-x: auto; }
.osg-compare table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.osg .osg-compare th, .osg .osg-compare td { text-align: left; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--osg-line); }
.osg-compare thead th { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--osg-muted); }
.osg-compare tbody th { font-weight: 600; width: 30%; }
@media (max-width: 600px) {
    .osg-compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .osg-compare tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--osg-line); }
    .osg .osg-compare th, .osg .osg-compare td { display: block; border: 0; padding: 2px 0; width: auto; }
    .osg-compare tbody th { margin-bottom: 4px; }
    .osg-compare td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--osg-muted); }
}
.osg .osg-src { font-size: 14px; color: var(--osg-muted); line-height: 1.6; border-top: 1px solid var(--osg-line); padding-top: 18px; margin-top: 30px; }
.osg .osg-src ul { margin: 6px 0 0; padding-left: 20px; }
.osg .osg-close { margin-top: 34px; background: #f6f8fb; border-radius: 12px; padding: 22px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.osg .osg-close p { font-size: 17px; }

/* Rewards launcher: icon only on phones, as on the trainer hub, so it keeps
 * clear of page content (the chat launcher left the guides 2026-10-14). The label is hidden visually, not
 * removed, so it keeps its accessible name. */
@media (max-width: 575.98px) {
    body.os-guides-page { padding-bottom: 96px; }
    body.os-guides-page #mycred-loyalty-widget-root > div > div:first-child p {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        white-space: nowrap !important;
    }
}
