/**
 * OnlySecurity course-archive (.os-a) + trainers (.os-t) light kit.
 *
 * Shares the tokens with .os-c / .os-d / .os-h so the v4 dark toggle
 * is a single :root variable swap when that lands.
 *
 * .os-a, course archive (/courses/, /course-category/<slug>/)
 * .os-t, trainers archive (/trainers/)
 *
 * Both pages reuse the toolbar / pagination / sticky-sidebar
 * patterns from the course-single page kit.
 */

/* ===== Shared tokens ===== */
/* .os-p is the public profile, whose course grid reuses .os-a-card
   without an .os-a wrapper. It takes the tokens but not the text colour. */
.os-a,
.os-t,
.os-p {
    --os-a-bg: #f7f8fb;
    --os-a-bg-soft: #fafbfd;
    --os-a-panel: #ffffff;
    --os-a-border: #e5e7eb;
    --os-a-text: #1e293b;
    --os-a-muted: #64748b;
    --os-a-subtle: #94a3b8;
    --os-a-primary: #2F62AF;
    --os-a-primary-soft: rgba(47, 98, 175, 0.10);
    --os-a-gold: #fcb900;
    --os-a-up: #15803d; /* 5:1 on white; #22c55e was 2.3:1 on the card price */
    --os-a-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --os-a-shadow-lg: 0 6px 24px rgba(15, 23, 42, 0.10);
}
.os-a,
.os-t { color: var(--os-a-text); }
.os-a a, .os-t a { color: var(--os-a-primary); text-decoration: none; }
.os-a a:hover, .os-t a:hover { text-decoration: underline; }

/* Defeat Gutenberg constrained-child max-width on /trainers/ page wrapper */
.os-t.is-layout-constrained > *,
.os-t .is-layout-constrained > * { max-width: 100%; }

/* ===== Shared parent-overflow override (sticky needs visible ancestors) ===== */
body.tax-course-category #page,
body.tax-course-category #content,
body.tax-course-category .shoptimizer-archive,
body.tax-course-category .col-full,
body.post-type-archive-courses #page,
body.post-type-archive-courses #content,
body.post-type-archive-courses .shoptimizer-archive,
body.post-type-archive-courses .col-full {
    overflow: visible !important;
}

/* ============================================================
 * COURSE ARCHIVE (.os-a)
 * ============================================================ */

.os-a-page { padding: 32px 24px 80px; max-width: 1500px; margin: 0 auto; }

/* Hero */
.os-a-hero { margin-bottom: 28px; }
.os-a-crumb { color: var(--os-a-muted); font-size: 13px; margin-bottom: 10px; }
.os-a-crumb a { color: var(--os-a-muted); }
.os-a-hero h1 {
    font-size: 40px;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 8px;
    color: var(--os-a-text);
}
.os-a-hero p {
    color: var(--os-a-muted);
    font-size: 16px;
    max-width: 1400px;
    margin: 0;
    line-height: 1.6;
}
.os-a-hero .count {
    display: inline-block;
    background: var(--os-a-primary-soft);
    color: var(--os-a-primary);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

/* Toolbar */
.os-a-toolbar {
    background: var(--os-a-panel);
    border: 1px solid var(--os-a-border);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    box-shadow: var(--os-a-shadow);
}
.os-a-search {
    background: #fafbfd;
    border: 1px solid var(--os-a-border);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    min-width: 280px;
    color: var(--os-a-text);
    flex: 1;
    max-width: 480px;
}
.os-a-search:focus { outline: none; border-color: var(--os-a-primary); }
/* The Shoptimizer theme styles input[type="search"] (specificity 0,1,1) with
   0 vertical padding and a 43px left inset for a magnifier icon it never draws
   on our plain input, beating the .os-a-search class (0,1,0) and collapsing the
   box to ~19px. Pin an explicit height and even inset from a higher-specificity
   selector so the search box always matches the sort select's 40px. */
.os-a-toolbar .os-a-search { height: 40px; padding: 0 12px; box-sizing: border-box; }

/* AWS search form integration: the [aws_search_form] shortcode renders
 * its own <form class="aws-search-form"> with input + button + clear-x.
 * We're slotting it into the toolbar where our old plain <input> sat,
 * so style its wrapper to match, same width/height/colors. The
 * dropdown panel positioning is handled by AWS's own CSS; we only own
 * the visible input. */
.os-a-search-wrap {
    flex: 1;
    min-width: 280px;
    max-width: 480px;
}
.os-a-search-wrap .aws-search-form,
.os-a-search-wrap .aws-wrapper { width: 100%; }
.os-a-search-wrap .aws-search-form .aws-search-field {
    background: #fafbfd;
    border: 1px solid var(--os-a-border);
    border-radius: 8px;
    padding: 9px 38px 9px 12px;
    font-size: 14px;
    color: var(--os-a-text);
    width: 100%;
    height: 40px;
    box-sizing: border-box;
}
.os-a-search-wrap .aws-search-form .aws-search-field:focus {
    outline: none;
    border-color: var(--os-a-primary);
}
/* AWS draws a magnifier icon in its own positioned div, keep it
 * visible on the right edge of the input. */
.os-a-search-wrap .aws-search-btn {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}
.os-a-search-wrap .aws-search-btn_icon svg { fill: var(--os-a-muted); }
.os-a-search-wrap .aws-search-clear { right: 32px; }
.os-a-toolbar-filters { display: contents; }
.os-a-tb-right { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-wrap: nowrap; min-width: 0; }
/* Keep "Sort by" on one line, was wrapping to "Sort / by" when adjacent to a long select. */
.os-a-tb-label { color: var(--os-a-muted); font-size: 13px; white-space: nowrap; }
.os-a-select {
    background: var(--os-a-panel);
    border: 1px solid var(--os-a-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--os-a-text);
    cursor: pointer;
}
.os-a-view {
    display: flex;
    border: 1px solid var(--os-a-border);
    border-radius: 8px;
    overflow: hidden;
    height: 40px;
    box-sizing: border-box;
}
.os-a-view button,
.os-a-view a {
    background: var(--os-a-panel);
    border: 0;
    padding: 8px 12px;
    color: var(--os-a-muted);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.os-a-view .active {
    background: var(--os-a-primary-soft);
    color: var(--os-a-primary);
}

/* Body grid */
.os-a-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

/* Filter sidebar */
.os-a-filters {
    background: var(--os-a-panel);
    border: 1px solid var(--os-a-border);
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--os-a-shadow);
    position: sticky;
    top: 100px;
    align-self: start;
}
.os-a-fblock {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--os-a-border);
}
.os-a-fblock:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}
.os-a-fblock h3 {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--os-a-muted);
    margin: 0 0 12px;
}
.os-a-fblock ul { list-style: none; margin: 0; padding: 0; }
.os-a-fblock li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--os-a-text);
}
.os-a-fblock input[type="checkbox"] { accent-color: var(--os-a-primary); }
.os-a-fblock li .ct {
    color: var(--os-a-muted);
    margin-left: auto;
    font-size: 12px;
}
.os-a-fblock li.active {
    font-weight: 700;
    color: var(--os-a-primary);
}
.os-a-fmore {
    color: var(--os-a-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    display: inline-block;
}
.os-a-clear {
    display: block;
    background: transparent;
    border: 1px solid var(--os-a-border);
    color: var(--os-a-muted);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    width: 100%;
    text-align: center;
    text-decoration: none;
}
.os-a-clear:hover { background: var(--os-a-bg-soft); text-decoration: none; }

/* Mobile filter sheet chrome. Desktop keeps the plain sidebar, so all of
   this is hidden here and switched on in the max-width: 900px block. */
.os-a-filters-toggle,
.os-a-sheet-head,
.os-a-sheet-done { display: none; }

/* Course grid */
.os-a-grid-wrap { min-width: 0; }
.os-a-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.os-a-card {
    background: var(--os-a-panel);
    border: 1px solid var(--os-a-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--os-a-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: block;
    color: inherit;
    text-decoration: none;
}
/* The card is one link, so `.os-a a:hover` (0,2,1) would underline every
   line of it; this reset has to outrank that rule. */
.os-a a.os-a-card:hover,
.os-a-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--os-a-shadow-lg);
    text-decoration: none;
    color: inherit;
}
.os-a-card .thumb {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1e3a6f, #2F62AF);
    position: relative;
    overflow: hidden;
}
.os-a-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.os-a-card .level-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 999px;
}
/* State badges (NEW / Partner course / etc.) own the top-left; when present,
   move the level chip to the top-right so the two don't overlap. */
.os-a-card .thumb:has(.os-course-badges) .level-badge { left: auto; right: 10px; }
.os-a-card .level-badge { z-index: 2; }
/* The profile's Featured pill keeps the top layer over the level chip and
   the hover preview. */
.os-a-card .thumb .os-p-card-featured { z-index: 3; }
/* Trailer badge and autoplay preview. The <video> is created by
   onlysecurity-card-preview.js once the card nears the viewport after page
   load; until then the card carries only data-preview. */
.os-a-card .trailer-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    padding: 3px 8px;
    border-radius: 999px;
    transition: opacity 0.2s ease;
}
.os-a-card .thumb .os-a-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.os-a-card.is-playing .thumb .os-a-preview { opacity: 1; }
.os-a-card.is-playing .trailer-badge { opacity: 0; }
.os-a-card .body { padding: 16px; }
.os-a-card .cat {
    color: var(--os-a-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.os-a-card .title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--os-a-text);
    /* Two lines at most, and always two lines tall, so footers line up (G4). */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    min-height: calc(2 * 1.35em);
}
/* Trainer footer (G4). */
.os-a-card .trainer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--os-a-border);
    font-size: 13px;
    color: var(--os-a-text);
    min-width: 0;
}
.os-a-card .trainer-av {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0d1b2e;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.os-a-card .trainer-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.os-a-card .trainer-name {
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.os-a-card .trainer-tick { flex: none; }
.os-a-card .meta-row1 {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    color: var(--os-a-muted);
    margin-bottom: 10px;
    flex-wrap: wrap;
}
/* Gold on the star glyph only: as text it was 1.7:1 on white. */
.os-a-card .meta-row1 .stars { color: var(--os-a-text); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.os-a-card .meta-row1 .stars .star-icon { color: var(--os-a-gold); font-size: 14px; line-height: 1; }
.os-a-card .meta-row1 .stars .rating-count { color: var(--os-a-muted); font-weight: 400; }
/* The theme's .screen-reader-text sets visibility:hidden, which hides it from
   screen readers too, so the card carries its own. */
.os-a-card .os-a-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.os-a-card .meta-row1 .dot { color: var(--os-a-subtle); }
:root:not([data-tutor-theme="dark"]) .os-a-card .meta-row1 .dot { color: #64748b; }
.os-a-card .meta-row2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--os-a-border);
}
.os-a-card .price { font-weight: 700; color: var(--os-a-text); font-variant-numeric: tabular-nums; }
.os-a-card .price.free { color: var(--os-a-up); }
/* DEV-530: Plus and Max chip on a held course card. Colours are the shipped shield chip tokens. One sheen on first view, off for reduced motion. */
.os-a-card .price.os-a-lvl { display: inline-flex; align-items: center; gap: 5px; position: relative; overflow: hidden; padding: 5px 10px; border-radius: 999px; font-size: 13px; line-height: 1; white-space: nowrap; }
.os-a-card .price.os-a-lvl svg { width: 13px; height: 13px; fill: currentColor; flex: none; }
.os-a-card .os-a-lvl--plus { background: #e8f0fc; color: #1d4f9a; box-shadow: inset 0 0 0 1px #9dbbe8; }
.os-a-card .os-a-lvl--max { background: #fff4cc; color: #6b5200; box-shadow: inset 0 0 0 1px #e0b400; }
[data-tutor-theme="dark"] .os-a-card .os-a-lvl--plus { background: #1b2a47; color: #b9d0f7; box-shadow: inset 0 0 0 1px #3c5f9c; }
[data-tutor-theme="dark"] .os-a-card .os-a-lvl--max { background: #3a3000; color: #ffe27a; box-shadow: inset 0 0 0 1px #8a6d00; }
/* DEV-644 B1: Included in Max, or buy it for the price. Wraps under the chip on a narrow card. */
.os-a-card .os-a-buy { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.os-a-card .os-a-or { font-size: 13px; opacity: .8; }
.os-a-card .os-a-buy .was { margin-left: 2px; font-size: 13px; font-weight: 400; opacity: .7; }
.os-a-card .os-a-lvl::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.6) 50%, transparent 65%); transform: translateX(-120%); animation: os-a-lvl-sheen 1.4s ease-out .4s 1 forwards; pointer-events: none; }
@keyframes os-a-lvl-sheen { to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .os-a-card .os-a-lvl::after { animation: none; } }
/* The chip and the link share a row at the real card width and wrap (chip first) on a narrower card. */
.os-a-card .meta-row2:has(.os-a-lvl) { flex-wrap: wrap; gap: 6px 10px; }
/* DEV-485: the regular price struck beside a sale price (Ultimates), in place of the Premium tag. */
.os-a-card .price .was { margin-left: 5px; font-size: .85em; font-weight: 500; color: var(--os-a-muted); text-decoration-thickness: 1.5px; }
.os-a-card .price.is-sale + .enrol-cta { white-space: nowrap; }
.os-a-card .price .prem-tag { margin-left: 6px; padding: 1px 7px; border: 1px solid var(--os-a-border); border-radius: 99px; font-size: 11px; font-weight: 600; color: var(--os-a-muted); vertical-align: 1px; }
.os-a-card .enrol-cta {
    color: var(--os-a-primary);
    font-weight: 600;
    font-size: 13px;
}

/* List view */
.os-a-grid.list { grid-template-columns: 1fr; }
.os-a-grid.list .os-a-card {
    display: grid;
    grid-template-columns: 280px 1fr;
}
.os-a-grid.list .thumb { aspect-ratio: 16 / 9; height: 100%; }

/* Pagination */
.os-a-pagination,
.os-t-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.os-a-pagination a,
.os-a-pagination span,
.os-t-pagination a,
.os-t-pagination span {
    padding: 8px 14px;
    border: 1px solid var(--os-a-border);
    border-radius: 8px;
    background: var(--os-a-panel);
    color: var(--os-a-text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}
.os-a-pagination .current,
.os-t-pagination .current {
    background: var(--os-a-primary);
    color: #fff;
    border-color: var(--os-a-primary);
}
.os-a-pagination .disabled,
.os-t-pagination .disabled {
    color: var(--os-a-subtle);
    pointer-events: none;
}

/* AJAX loading state, applied to the grid wrapper while fetch is in flight */
.os-a-grid-wrap.os-a-loading {
    position: relative;
    min-height: 200px;
}
.os-a-grid-wrap.os-a-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(247, 248, 251, 0.7);
    backdrop-filter: blur(2px);
    z-index: 5;
    pointer-events: none;
}
.os-a-grid-wrap.os-a-loading::before {
    content: "";
    position: absolute;
    top: 60px;
    left: 50%;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    border: 3px solid var(--os-a-border);
    border-top-color: var(--os-a-primary);
    border-radius: 50%;
    z-index: 6;
    animation: os-a-spin 0.8s linear infinite;
}
@keyframes os-a-spin { to { transform: rotate(360deg); } }

/* Empty state */
.os-a-empty,
.os-t-empty {
    background: var(--os-a-panel);
    border: 1px dashed var(--os-a-border);
    border-radius: 14px;
    padding: 64px 24px;
    text-align: center;
    color: var(--os-a-muted);
}
.os-a-empty h3,
.os-t-empty h3 {
    color: var(--os-a-text);
    margin: 0 0 8px;
    font-size: 18px;
}
.os-a-empty p,
.os-t-empty p { margin: 0; font-size: 14px; }

/* ============================================================
 * TRAINERS (.os-t)
 * ============================================================ */

.os-t-page { padding: 32px 24px 80px; max-width: 1500px; margin: 0 auto; }
.os-t-narrow { max-width: 1500px; margin: 0 auto; }

/* Hero */
.os-t-hero { text-align: center; padding: 24px 0 48px; }
.os-t-hero .eyebrow {
    color: var(--os-a-primary);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 10px;
}
.os-t-hero h1 {
    font-size: 44px;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 12px;
    color: var(--os-a-text);
}
.os-t-hero p {
    color: var(--os-a-muted);
    font-size: 17px;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Stats strip */
.os-t-stats {
    background: var(--os-a-panel);
    border: 1px solid var(--os-a-border);
    border-radius: 16px;
    padding: 28px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    box-shadow: var(--os-a-shadow);
    margin-bottom: 32px;
}
.os-t-stats .stat { text-align: center; }
.os-t-stats .stat .v {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--os-a-primary);
    line-height: 1;
}
.os-t-stats .stat .l {
    color: var(--os-a-muted);
    font-size: 13px;
    margin-top: 6px;
}

/* Toolbar (trainers reuses archive toolbar styles via the same classes
 * if we want, but here we use .os-t variants for namespace clarity). */
.os-t-toolbar {
    background: var(--os-a-panel);
    border: 1px solid var(--os-a-border);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    box-shadow: var(--os-a-shadow);
}

/* Theme the [tutor_instructor_list] shortcode output. Tutor emits:
 *   .tutor-instructor-list-wrapper
 *     .tutor-instructor-list
 *       .tutor-grid.tutor-grid-N (the column grid)
 *         .tutor-instructor-list-item.tutor-instructor-layout-cover.tutor-card
 *           .tutor-instructor-cover (banner)
 *           .os-t-cover__img / .os-t-cover__initials (cover image, initials only if the default is filtered off)
 *           .tutor-instructor-title (name)
 *           .tutor-instructor-courses (course count)
 */
.os-t .tutor-instructor-list-wrapper { background: transparent; }
.os-t .tutor-instructor-list .tutor-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}
.os-t .tutor-instructor-list-item {
    background: var(--os-a-panel) !important;
    border: 1px solid var(--os-a-border) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: var(--os-a-shadow) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    color: inherit;
}
.os-t .tutor-instructor-list-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--os-a-shadow-lg) !important;
}
.os-t .tutor-instructor-cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1e3a6f, #2F62AF) !important;
    position: relative;
}
/* Trainer cover (G5): an uploaded cover, or the OnlySecurity default cover
 * where none is set, fills the 16:9 box. Navy with initials is only the escape
 * hatch if os_trainer_default_cover is filtered to ''. .tutor-ratio makes the
 * img and the span fill the box. */
.os-t .os-t-cover__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.os-t .tutor-instructor-cover.os-t-cover--navy { background: #0d1b2e !important; }
.os-t .os-t-cover__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
/* Unrated trainer (G1a): neutral pill in place of empty stars. */
.os-t .os-t-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #eef1f5;
    border: 1px solid #d8dee8;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.02em;
}
/* #526075 on white is 6.0:1 (the --os-a-muted grey is 4.48:1). */
.os-t .os-t-muted { color: #526075; font-size: 14px; }
/* Vetting line above the grid (G5). */
.os-t .os-t-vetting {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #c7d4ea;
    background: #eef3fb;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--os-a-text);
}
.os-t .os-t-empty-line { color: #526075; font-size: 15px; }
.os-t .os-t-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 32px;
}
.os-t .os-t-pagination .page-numbers {
    min-width: 40px;
    padding: 8px 12px;
    border: 1px solid var(--os-a-border);
    border-radius: 8px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.os-t .os-t-pagination .page-numbers.current {
    background: var(--os-a-primary);
    border-color: var(--os-a-primary);
    color: #fff;
}
.os-t .tutor-instructor-list-item .tutor-card-body,
.os-t .tutor-instructor-list-item .tutor-instructor-content {
    padding: 44px 20px 20px !important;
}
.os-t .tutor-instructor-title {
    font-weight: 700 !important;
    font-size: 17px !important;
    color: var(--os-a-text) !important;
    margin: 0 0 4px !important;
}
.os-t .tutor-instructor-courses {
    color: var(--os-a-muted);
    font-size: 13px;
    margin-top: 8px;
}
.os-t .tutor-instructor-courses b { color: var(--os-a-text); }

/* "Become a trainer" banner reuses the homepage trainer-banner look */
.os-t-become {
    background: linear-gradient(135deg, #16243d, #1e3a6f);
    border-radius: 18px;
    padding: 48px 40px;
    color: #fff;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
    margin-top: 64px;
}
.os-t-become h3 {
    margin: 0 0 8px;
    font-size: 26px;
    color: #fff;
    letter-spacing: -0.01em;
}
.os-t-become p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
    line-height: 1.5;
    max-width: 540px;
}
.os-t-become b { color: var(--os-a-gold); }
.os-t-become .cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.os-t-become .cta a {
    padding: 13px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}
.os-t-become .cta .primary { background: var(--os-a-gold); color: var(--os-a-text); }
.os-t-become .cta .ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.os-t-become .cta a:hover { text-decoration: none; opacity: 0.92; }

/* ============================================================
 * Mobile
 * ============================================================ */
@media (max-width: 1100px) {
    .os-t .tutor-instructor-list .tutor-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
/* Stack the archive toolbar across the whole tablet range, not just phones.
   Above 900px the desktop row layout (search flex:1 beside a margin-left:auto
   sort group) ran out of room and wrapped the sort group onto its own line
   ABOVE the search, then squeezed it until its label/select/toggles stacked
   vertically. The single-row layout only has genuine room past ~1024px, so
   stack everywhere below that: search on its own row, then the sort group
   full-width and left-aligned with the select filling the gap. */
@media (max-width: 1024px) {
    .os-a-toolbar { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px; }
    /* Drop the desktop `flex: 1`: in the stacked column it applies to the
       vertical axis and collapses the search height to min-content. */
    .os-a-search { min-width: 0; max-width: none; flex: none; }
    .os-a-tb-right { margin-left: 0; width: 100%; }
    .os-a-select { flex: 1; min-width: 0; }
}
@media (max-width: 900px) {
    .os-a-page,
    .os-t-page { padding: 16px; }
    .os-a-hero h1 { font-size: 30px; }
    .os-t-hero h1 { font-size: 30px; }
    .os-a-body { grid-template-columns: 1fr; gap: 16px; }
    .os-a-filters { position: static; }

    /* Filters collapse behind one button so courses come first. Every token
       carries its value as a literal fallback, so the sheet renders the same
       with or without the token block. */
    .os-a-filters-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-height: 44px;
        margin: 0 0 16px;
        padding: 10px 16px;
        background: var(--os-a-panel, #ffffff);
        border: 1px solid var(--os-a-border, #e5e7eb);
        border-radius: 10px;
        color: var(--os-a-text, #1e293b);
        font-size: 15px;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
    }
    .os-a-filters-count {
        min-width: 22px;
        padding: 1px 7px;
        border-radius: 11px;
        background: var(--os-a-primary, #2F62AF);
        color: #fff;
        font-size: 12px;
        line-height: 20px;
        text-align: center;
    }
    .os-a-filters-count[hidden] { display: none; }
    .os-a-filters {
        display: none;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100000;
        max-height: 85vh;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--os-a-panel, #ffffff);
        border-radius: 16px 16px 0 0;
        padding: 0 20px 20px;
        box-shadow: var(--os-a-shadow-lg, 0 6px 24px rgba(15, 23, 42, 0.10));
    }
    .os-a-filters.is-open { display: block; }
    .os-a-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 1;
        margin: 0 -20px 16px;
        padding: 8px 8px 8px 20px;
        background: var(--os-a-panel, #ffffff);
        border-bottom: 1px solid var(--os-a-border, #e5e7eb);
    }
    .os-a-sheet-head h2 { margin: 0; font-size: 17px; color: var(--os-a-text, #1e293b); }
    .os-a-sheet-close {
        width: 44px;
        height: 44px;
        background: transparent;
        border: 0;
        color: var(--os-a-muted, #64748b);
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }
    .os-a-fblock li { min-height: 44px; }
    .os-a-clear { min-height: 44px; line-height: 26px; }
    .os-a-sheet-done {
        display: block;
        width: 100%;
        min-height: 44px;
        margin-top: 12px;
        background: var(--os-a-primary, #2F62AF);
        border: 0;
        border-radius: 8px;
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
    }
    .os-a-sheet-backdrop {
        position: fixed;
        inset: 0;
        z-index: 99999;
        background: rgba(15, 23, 42, 0.45);
    }
    body.os-a-sheet-open { overflow: hidden; }
    /* The Rewards launcher floats above everything; keep it off the open sheet. */
    body.os-a-sheet-open #mycred-loyalty-widget-root { display: none; }
    .os-a-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .os-a-grid.list .os-a-card { grid-template-columns: 1fr; }
    .os-t-toolbar { padding: 12px; }
    .os-t-stats { grid-template-columns: repeat(2, 1fr); padding: 20px; }
    .os-t .tutor-instructor-list .tutor-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .os-t-become { grid-template-columns: 1fr; padding: 28px; }
}
@media (max-width: 560px) {
    .os-a-grid { grid-template-columns: 1fr; }
    .os-t .tutor-instructor-list .tutor-grid {
        grid-template-columns: 1fr !important;
    }
}

/* G4 QA fix (2026-10-12): pin the trainer footer to the bottom of grid cards,
 * so a card with no category label lines up with its row. List view keeps its
 * own grid layout. */
.os-a-grid:not(.list) .os-a-card { display: flex; flex-direction: column; }
.os-a-grid:not(.list) .os-a-card .body { flex: 1 1 auto; display: flex; flex-direction: column; }
.os-a-grid:not(.list) .os-a-card .body > .trainer { margin-top: auto; }
.os-a-grid:not(.list) .os-a-card .body > :has(+ .trainer) { margin-bottom: 12px; }

/* Tutor muted text (course count, rating count) on the trainers grid: #757c8e gave 4.17:1 on white. */
body .tutor-color-muted,
body .tutor-ratings-count { /* body prefix: Tutor's own sheet loads later at equal specificity */
    color: #5f6778;
}

/* All courses and New views on /courses/ (gap G14, UX review N1 and N2,
 * approved 2026-11-02). Two links in a segmented control; the current view is
 * filled, focus keeps its own outline so the two never look the same. */
.os-a-views {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin: -10px 0 18px;
    background: var(--os-a-panel);
    border: 1px solid var(--os-a-border);
    border-radius: 12px;
}
.os-a .os-a-views a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 15px;
    color: var(--os-a-text);
    text-decoration: none;
}
.os-a .os-a-views a:hover { background: var(--os-a-bg); text-decoration: none; }
.os-a .os-a-views a[aria-current="page"] { background: var(--os-a-primary); color: #fff; }
.os-a .os-a-views a:focus-visible { outline: 2px solid var(--os-a-primary); outline-offset: 2px; }
.os-a-views .n {
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: var(--os-a-primary-soft);
    color: var(--os-a-primary);
    font-variant-numeric: tabular-nums;
}
.os-a-views a[aria-current="page"] .n { background: rgba(255, 255, 255, 0.22); color: #fff; }
.os-a-newnote { margin: -6px 0 18px; color: var(--os-a-muted); font-size: 15px; }
/* Plans and passes view (DEV-228): one card per plan on sale, three across on
   a desktop, stacked on a phone. One button per card, at the foot of each so
   the buttons line up. The bottom margin lets the last button scroll clear of
   the fixed Rewards launcher and the Klaviyo strip on a phone (P6). */
.os-a-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0 0 24px; }
.os-a-plan { display: flex; flex-direction: column; background: var(--os-a-panel); border: 1px solid var(--os-a-border); border-radius: 12px; overflow: hidden; box-shadow: var(--os-a-shadow); }
/* overflow hidden: with overflow visible an aspect-ratio box still grows to its content, and the pass image is square. */
.os-a-plan-img { aspect-ratio: 16 / 9; overflow: hidden; background: #0e1726; }
.os-a-plan-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.os-a-plan-hd { padding: 18px 18px 0; }
.os-a .os-a-plan .kind { margin: 0 0 4px; color: var(--os-a-muted); font-size: 13px; }
.os-a .os-a-plan h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.25; color: var(--os-a-text); }
.os-a .os-a-plan .sub { margin: 0; color: var(--os-a-text); font-size: 15px; }
.os-a .os-a-plan ul { margin: 12px 18px 0; padding: 0 0 0 18px; color: var(--os-a-text); font-size: 14px; }
.os-a .os-a-plan li { margin: 0 0 4px; }
.os-a-plan-ft { margin-top: auto; padding: 16px 18px 18px; }
.os-a .os-a-plan .price { margin: 0; font-size: 22px; font-weight: 700; color: var(--os-a-text); font-variant-numeric: tabular-nums; }
.os-a .os-a-plan .price small { font-size: 14px; font-weight: 400; color: var(--os-a-muted); }
.os-a .os-a-plan .alt { margin: 2px 0 0; color: var(--os-a-muted); font-size: 13px; }
.os-a .os-a-plan .alt a { color: var(--os-a-primary); }
.os-a .os-a-plan .own { margin: 0; color: var(--os-a-text); font-size: 15px; font-weight: 600; }
.os-a .os-a-plan-btn { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 12px; padding: 0 16px; border-radius: 8px; background: var(--os-a-primary); color: #fff; font-weight: 600; text-decoration: none; }
.os-a .os-a-plan-btn:hover { color: #fff; text-decoration: none; filter: brightness(1.08); }
.os-a .os-a-plan-btn:focus-visible { outline: 2px solid var(--os-a-primary); outline-offset: 2px; }
.os-a-plans-tools { margin: -8px 0 16px; }
.os-a-plans-wrap { padding-bottom: 32px; }
.os-a-plans-more { margin: 0 0 8px; font-size: 15px; }
@media (max-width: 900px) {
    .os-a-plans { grid-template-columns: 1fr; }
    .os-a-plans-wrap { padding-bottom: 96px; }
}
.os-a-body--full { grid-template-columns: 1fr; }
@media (min-width: 1200px) {
    .os-a-body--full .os-a-grid:not(.list) { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 767px) {
    .os-a-views { display: flex; }
    .os-a .os-a-views a { flex: 1; }
}
/* Course types (UI point 7): the row grows past a phone's width, so it
   scrolls sideways rather than wrapping (tabs-system), with a fade on the
   right edge. Learning paths and Challenges leave the catalogue, so they sit
   after a divider in link colour with an arrow. */
.os-a-views { position: relative; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.os-a-views::-webkit-scrollbar { display: none; }
.os-a .os-a-views a { flex: 0 0 auto; white-space: nowrap; }
.os-a-views-sep { flex: 0 0 1px; align-self: stretch; margin: 8px 6px; background: var(--os-a-border); }
.os-a .os-a-views a.out { color: var(--os-a-primary); }
.os-a-views .arr { margin-left: 6px; }
/* Fade the right edge whenever the row overflows, at any width (a tablet or
   narrow window can overflow too); onlysecurity-archive.js sets the classes. */
.os-a-views.is-scroll:not(.is-end) {
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
}
@media (max-width: 767px) {
    .os-a .os-a-views a { flex: 0 0 auto; padding: 0 14px; }
}

/* Plans and passes round 2 (DEV-230, approved 2026-11-09 on _local/ux-os-plans-catalogue-2):
   rows with headings, the seller row (the course card's trainer row), and the
   plan picture drawn from the site icon on the /pricing/ plan colours. */
.os-a .os-a-plans-h { margin: 8px 0 4px; font-size: 22px; line-height: 1.25; color: var(--os-a-text); }
.os-a .os-a-plans-lede { margin: 0 0 16px; color: var(--os-a-muted); font-size: 15px; }
.os-a .os-a-plans + .os-a-plans-h { margin-top: 12px; }
.os-a-plan-by { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--os-a-border); font-size: 13px; color: var(--os-a-text); min-width: 0; }
.os-a-plan-by .av { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #fff; box-shadow: inset 0 0 0 1px var(--os-a-border); color: var(--os-a-text); font-size: 12px; font-weight: 700; }
.os-a-plan-by .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.os-a-plan-by .nm { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-a-plan-by .trainer-tick { flex: none; }
.os-a-plan-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--art, #16305c); color: var(--art-t, #fff); text-align: center; }
.os-a-plan-art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0, rgba(255, 255, 255, .22), transparent 60%); }
.os-a-plan-art img { position: relative; width: 68px; height: 68px; padding: 6px; border-radius: 16px; background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .22); }
.os-a-plan-art .nm { position: relative; font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.os-a-plan-art .chip { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 12px; font-weight: 700; }
.os-a-plan-art .chip svg { flex: none; }
.os-a-plan-art--plus { --art: #2F62AF; }
.os-a-plan-art--max { --art: #e0b400; --art-t: #3a2c00; }
.os-a-plan-art--max .chip { background: rgba(255, 255, 255, .45); }
.os-a-plan-art--team { --art: #0f766e; }
.os-a-plan-art--business { --art: #2F62AF; }
.os-a-plan-art--organisation { --art: #16305c; }
/* Tab switch in place (DEV-230): the view dims while the next one loads. */
.os-a.is-swapping .os-a-page { opacity: .55; transition: opacity .15s; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .os-a.is-swapping .os-a-page { transition: none; } }
.os-a-live { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
