/* ==========================================================================
   PAT Section Layout — Frontend Styles
   ========================================================================== */

body {
    overflow-y: hidden !important;
}

.pat-sl-container {
    font-family: inherit;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 142px);
}
/* the site header drops from ~100px to 50px below 1000px, so the container gains that height back */
@media (max-width: 1000px) {
    .pat-sl-container { height: calc(100vh - 92px); }
    .pat-sl-tab-content[data-tab="insights"] .comparison-wrapper { height: calc(100vh - 240px); }
}

/* ---------- Header: title + tabs ---------- */
.pat-sl-header {
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(
315deg, #cbe0f30f, #EFF6FB);
}

/* Header photo: diagonal cut on the container (116°, feather 11→80%) and a
   left→right opacity ramp on the photo itself (58%→100% from 19%), with a
   light wash of the header colour on its left edge. */
.pat-sl-hero {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 30%;
    pointer-events: none;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(116deg, transparent 11%, #000 80%);
            mask-image: linear-gradient(116deg, transparent 11%, #000 80%);
}
.pat-sl-container .pat-sl-hero img,
.entry-content .pat-sl-hero img,
.pat-sl-hero img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    object-position: center 55% !important;
    -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.58) 19%, #000 100%);
            mask-image: linear-gradient(90deg, rgba(0,0,0,.58) 19%, #000 100%);
}
.pat-sl-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(116deg, rgba(239,246,251,.52) 30%, rgba(239,246,251,0) 55%);
}
.pat-sl-header .pat-sl-scheme-title,
.pat-sl-header .pat-sl-tabs { position: relative; z-index: 1; }
@media (max-width: 900px) { .pat-sl-hero { display: none; } }

.pat-sl-scheme-title {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 25px 0px 25px;
}

.pat-sl-tail-image {
    height: 80px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    display: none;
}

.pat-sl-scheme-title .pat-sl-scheme-title-text {
    margin: 0 0 0 3%;
    font-size: 25px;
    font-weight: 600;
}

.pat-sl-scheme-title .pat-sl-scheme-title-text span {
    font-weight: 400;
    color: #495361;
}

/* ---------- Experience level filter bar ---------- */
.pat-sl-level-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 3%; /* same gutter as the tabs and content so the toolbar lines up */
    background: linear-gradient(180deg, #ffffff 60%, #f3f5f7 100%); /* gentle white → grey so the toolbar reads as its own row */
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.pat-sl-level-bar-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin-right: 4px;
}

.pat-sl-level-pill {
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 16px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pat-sl-level-pill:hover {
    background: #e2e8f0;
    color: #334155;
}

.pat-sl-level-pill.active {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b;
}

.pat-sl-level-help-wrap {
    position: relative;
    display: inline-flex;
    margin-left: 4px;
}

.pat-sl-level-help {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    border: none;
    font-family: inherit;
    transition: background 0.15s;
}

.pat-sl-level-help-wrap:hover .pat-sl-level-help {
    background: #cbd5e1;
}

.pat-sl-level-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 340px;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 100;
    font-size: 12.5px;
    line-height: 1.5;
}

.pat-sl-level-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #1e293b;
    border-radius: 2px;
    transform: translateX(-50%) rotate(45deg);
}

.pat-sl-level-help-wrap:hover .pat-sl-level-tooltip {
    display: block;
}

.pat-sl-level-tooltip-item {
    margin-bottom: 12px;
}

.pat-sl-level-tooltip-item:last-child {
    margin-bottom: 0;
}

.pat-sl-level-tooltip-item strong {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
}

.pat-sl-level-tooltip-item p {
    margin: 0;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}

/* ---------- Main layout ---------- */
.pat-sl-layout {
    display: flex;
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ---------- Sidebar ---------- */
.pat-sl-sidebar {
    width: 280px;
    min-width: 280px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                min-width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.pat-sl-sidebar.collapsed {
    width: 0;
    min-width: 0;
    border-right: none;
}

.pat-sl-sidebar-header {
    padding: 18px 16px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.pat-sl-sidebar-overline {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.pat-sl-sidebar-scheme-name {
    font-size: 12px;
    color: #64748b;
}

.pat-sl-sidebar-stages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* Stage item in sidebar */
.pat-sl-sidebar-stage {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
    transition: background 0.2s ease;
}

.pat-sl-sidebar-stage.no-content {
    opacity: 0.5;
    cursor: default;
}

.pat-sl-sidebar-stage.has-content:hover {
    background: #f8fafc;
}

.pat-sl-sidebar-stage.active {
    background: #f0f7ff;
}

.pat-sl-sidebar-stage.active .pat-sl-stage-circle {
    border-width: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.pat-sl-sidebar-stage.active .pat-sl-stage-label {
    font-weight: 700;
}

/* Connector line */
.pat-sl-stage-connector {
    position: absolute;
    left: 23px;
    top: 40px;
    width: 2px;
    height: calc(100% - 28px);
    z-index: 0;
}

/* Circle */
.pat-sl-stage-circle {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.2s ease;
}

.pat-sl-stage-icon {
    font-size: 12px;
}

/* Stage info */
.pat-sl-stage-info {
    min-width: 0;
}

.pat-sl-stage-label {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: font-weight 0.2s ease;
}

.pat-sl-stage-count {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 1px;
}

/* Sidebar footer */
.pat-sl-sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid #f1f5f9;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
}

/* ---------- Sidebar toggle ---------- */
.pat-sl-sidebar-toggle {
    position: absolute;
    left: 268px;
    top: 16px;
    z-index: 20;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #64748b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.pat-sl-sidebar-toggle.collapsed {
    left: 0;
}

/* ---------- Main content ---------- */
.pat-sl-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

/* ---------- Tabs (inside header) ---------- */
.pat-sl-tabs {
    display: flex;
    border-bottom: 1px solid #dfe6ea;
    padding: 0 3%;
    flex-shrink: 0;
    background: transparent;
}

.pat-sl-tab {
    padding: 8px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Open Sans' !important;
    font-weight: 500;
    color: #a0a5ab;
    border-top: 3px solid transparent;
    margin-bottom: -1px;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.pat-sl-tab:hover {
    color: #646970;
}

.pat-sl-tab.active {
    color: #596974 !important;
    background: #fff;
    border-top-color: var(--pat-sl-brand, #9b59b6);
    border-bottom-color: #fff;
    border-left: 1px solid #dfe6ea;
    border-right: 1px solid #dfe6ea;
    box-shadow: 0 -3px 7px #d6dde2;
}

.pat-sl-tab[data-tab="insights"].active {
    background: #e0f0ff;
    border-bottom: #e0f0ff;
    color: #424f57
}

.pat-sl-tab-icon {
    font-size: 14px;
    display: none;
}

.pat-sl-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    margin-left: 4px;
}

/* Disabled tabs (shared mode): dimmed, with a padlock */
.pat-sl-tab-disabled {
    opacity: 0.7;
    cursor: not-allowed !important;
    pointer-events: none;
}
.pat-sl-tab-disabled::after {
    content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 7px; vertical-align: -1px; background: #1d3461;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 10V8a6 6 0 0 1 12 0v2h1a1 1 0 0 1 1 1v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-9a1 1 0 0 1 1-1h1zm2 0h8V8a4 4 0 0 0-8 0v2z'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 10V8a6 6 0 0 1 12 0v2h1a1 1 0 0 1 1 1v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-9a1 1 0 0 1 1-1h1zm2 0h8V8a4 4 0 0 0-8 0v2z'/></svg>") no-repeat center / contain;
}

/* Shared mode: reduce nav prominence */
body.pat-shared-mode .site-header,
body.pat-shared-mode .site-navigation,
body.pat-shared-mode #masthead,
body.pat-shared-mode .main-navigation {
    opacity: 0.5;
    pointer-events: none;
}

.pat-sl-tabs-meta {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ---------- Tab content ---------- */
.pat-sl-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px 3%;
    background: white;
    /* background: linear-gradient(180deg, #fff, #EFF6FB); */
}

/* Insights tab needs edge-to-edge chart — strip content padding */
.pat-sl-content:has(.pat-sl-tab-content[data-tab="insights"].active) {
    padding: 0;
}

.pat-sl-tab-content {
    display: none;
}

.pat-sl-tab-content.active {
    display: block;
}

/* ---------- Activity stages ---------- */
.pat-sl-activity-stage {
    margin-bottom: 36px;
}
/* 2.9.5 — clearer break between stages: the next stage header starts well
   below the last card row (cards carry their own 20px bottom margin). */
.pat-sl-activity-stage + .pat-sl-activity-stage {
    margin-top: 72px;
    padding-top: 36px;
    /* 2.9.15: no rule between stages; the stage heading carries the only line */
}
.pat-sl-activity-stage + .pat-sl-activity-stage .pat-sl-stage-header:first-child { margin-top: 0; }
@media (max-width: 900px) {
    .pat-sl-activity-stage + .pat-sl-activity-stage { margin-top: 48px; padding-top: 24px; }
}

.pat-sl-stage-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dfdfdf91;
}

.pat-sl-stage-header:first-child {
    margin-top: 20px;
}

.pat-sl-stage-subtitle {
    margin: 0;
    font-size: 19px;
    color: #596981;
    font-weight: 400;
    font-family: 'Inter';
}

.pat-sl-stage-leadin { color: #545d6a; font-weight: 500; font-family: 'Open Sans'; }

.pat-sl-stage-subtitle strong {
    font-style: normal;
    font-weight: 700;
    font-size: 19px;
}

.pat-sl-stage-header-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 15px;
    vertical-align: middle;
    margin-right: 6px;
}

.pat-sl-stage-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.pat-sl-stage-desc {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

/* Stage subtitle (one-liner under heading) */
.pat-sl-stage-subtitle-text {
    margin: 5px 0 0 !important;
    font-size: 13px !important;
    color: #9ea2a7;
    font-weight: 500;
    font-family: 'Inter';
}

/* Collapsible note block */
.pat-sl-stage-note {
    margin-bottom: 25px;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.pat-sl-stage-note summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 11px 55px;
    font-size: 16px;
    font-weight: 500;
    color: #2b465687;
    cursor: pointer;
    background: #edf4f9;
    border: 1px solid #dfe6ea;
    list-style: none;
    user-select: none;
    background-image: url(/parts/recommended-articles-icon-dark-blue.svg);
    background-repeat: no-repeat;
    background-size: 26px;
    background-position: 15px 50%;
}

.pat-sl-stage-note summary::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid #bad2e1;
    border-bottom: 2px solid #bad2e1;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
    top: -1px;
    position: relative;
}

.pat-sl-stage-note[open] summary {
    border-bottom: 1px solid #e3edf5;
    /* box-shadow: 0 0px 4px #dfdfdf; */
}

.pat-sl-stage-note[open] summary::after {
    transform: rotate(-135deg);
    top: 3px;
}

.pat-sl-stage-note summary span {
    font-size: 15px;
    font-weight: 500;
    color: #2b465687;
}

.pat-sl-stage-note summary span b {
    color: #2c4351
}

.pat-sl-stage-note-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.pat-sl-stage-note-title {
    flex: 1;
    text-align: left;
    color: #596981f5;
    font-family: 'Open Sans';
    font-weight: 600;
    font-size: 1.25em;
    margin-bottom: 10px;
}

.pat-sl-stage-note-chevron {
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.pat-sl-stage-note.open .pat-sl-stage-note-chevron {
    transform: rotate(180deg);
}

.pat-sl-stage-note-content {
    font-size: 13px;
    color: #848484ed;
    line-height: 1.6;
    border-top: none !important;
    padding-top: 12px;
    padding: 20px 24px 20px 24px;
    border: 1px solid #e0e0e0e6;
    /* background-image: url(/parts/recommended-articles-icon.svg); */
    background-repeat: no-repeat;
    background-size: 115px;
    background-position: 97.5% 101%;
    border-radius: 0 0 4px 4px;
}

.pat-sl-stage-note-inner {
    border-left: 1px solid #4f53564d !important;
    margin-left: 10px;
    padding-left: 30px;
}
/* 2.9.24: second "Useful Information" block within one stage — its heading
   renders as a sub-heading (smaller cousin of the note title) */
.pat-sl-stage-note-body .pat-sl-note-sub {
    display: block;
    font-weight: 600;
    font-size: 1.1em;
    color: #636669;
    margin: 28px 0 4px;
}

/* Activity grid */
.pat-sl-activity-grid {
}

.pat-sl-activity-grid .activity_prog_type {
    overflow: hidden !important;
}

/* Empty stage message */
.pat-sl-stage-empty {
    padding: 28px 32px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.pat-sl-stage-empty strong {
    color: #334155;
}

.pat-sl-stage-empty a {
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
}

/* ---------- Tab fallback ---------- */
.pat-sl-tab-fallback {
    padding: 60px 40px;
    text-align: center;
}

.pat-sl-fallback-icon {
    font-size: 48px;
    margin-bottom: 35px;
}

.pat-sl-tab-fallback .pat-sl-tab-fallback-title {
    color: #34424C;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    font-family: 'Inter';
}

.pat-sl-tab-fallback p {
    color: #596974c7;
    font-size: 14px;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---------- Admin-only notice ---------- */
.pat-sl-admin-notice {
    padding: 14px 18px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    font-size: 13px;
    color: #664d03;
}

.pat-sl-admin-notice code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .pat-sl-sidebar {
        display: none;
    }

    .pat-sl-sidebar-toggle {
        display: none;
    }

    .pat-sl-tabs {
        padding: 0 12px;
    }

    .pat-sl-tab {
        padding: 12px 14px;
        font-size: 15px;
    }

    .pat-sl-content {
        padding: 16px;
    }

    .pat-sl-scheme-title {
        gap: 10px;
    }

    .pat-sl-tail-image {
        height: 36px;
    }

    .pat-sl-scheme-title .pat-sl-scheme-title-text {
        font-size: 21px;
    }

    .pat-sl-level-bar {
        padding: 8px 16px;
        gap: 6px;
    }

    .pat-sl-level-pill {
        font-size: 12px;
        padding: 4px 10px;
    }
}


/* ==========================================================================
   PAT Resources Tab — Accordion
   ========================================================================== */

.pat-res-container {
    padding: 6px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pat-sl-resources-title {
        margin-top: 20px;
        font-size: 19px !important;
        color: #596981;
        font-weight: 400 !important;
        font-family: 'Inter' !important;
        margin-bottom: 20px;
        padding-bottom: 4px;
        border-bottom: 1px solid #dfdfdf91;
}

.pat-sl-container .pat-sl-resources-title-name {
    color: var(--pat-sl-brand, #3793d1) !important;
    font-style: normal;
    font-weight: 700;
    font-size: 19px;
}

/* ---------- Accordion wrapper ---------- */
.pat-res-accordion {
    border: 1px solid #dfdfdf;
    border-radius: 3px;
    overflow: hidden;
    transition: border-color 0.2s;
    background: #fff;
}

.pat-res-accordion.is-open {
    /* border-color: var(--res-color, #3b82f6); */
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

/* ---------- Header button ---------- */
.pat-res-accordion-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 14px 18px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 12px;
    transition: background 0.15s;
}

.pat-res-accordion:hover {
    box-shadow: rgb(50 50 50 / 15%) 0px 0px 6px 1px !important;
    border: 1px solid #00acdd;
}

.pat-res-accordion.is-open .pat-res-accordion-header {
    background: #edf4f947;
    border-bottom: 1px solid #e9edf1;
}

.pat-res-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.pat-res-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: inset 0px 0px 4px #5555551f;
}

.pat-res-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pat-res-label {
    font-size: 17px;
    font-weight: 600;
    color: #435560;
    text-decoration: none !important;
    font-family: 'Inter', sans-serif;
    line-height: 1.4em;
}

.pat-res-description {
    font-weight: 400;
    color: #777;
    font-size: 13px;
}

.pat-res-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.pat-res-count {
    font-size: 14px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    line-height: 1.4;
    box-shadow: 0 0 2px;
}

.pat-res-chevron {
    font-size: 20px;
    color: #94a3b8;
    line-height: 1;
    transition: transform 0.25s;
    display: inline-block;
}

.pat-res-accordion.is-open .pat-res-chevron {
    transform: rotate(90deg);
}

/* ---------- Accordion body ---------- */
.pat-res-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.pat-res-accordion.is-open .pat-res-accordion-body {
    max-height: 2000px;
}

.pat-res-items {
    padding: 12px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---------- Resource item ---------- */
.pat-res-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 3px;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
    cursor: pointer;
    background: #fafcfd;
    border: 1px solid #dfdfdf7a;
    border-left: 3px solid #60717d;
}

.pat-res-item:hover {
    background: #f0f7fbcf;
    text-decoration: none;
    color: inherit;
    transform: scale(1.005);
}

.pat-res-item-content {
    flex: 1;
    min-width: 0;
}

.pat-res-item-title {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter';
    color: #666;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pat-res-item:hover .pat-res-item-title {
    ;
}

.pat-res-item-excerpt {
    font-size: 13px;
    color: #878787;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    margin-bottom: 5px;
    margin-top: 7.5px;
    padding-top: 10px;
    border-top: 1px solid #edf1f4;
}

.pat-res-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pat-res-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
    line-height: 1.5;
    box-shadow: 0 0 2px;
    margin-top: 10px;
}

.pat-res-date {
    font-size: 11px;
    color: #94a3b8;
    margin-left: auto;
}

.pat-res-item-arrow {
    flex-shrink: 0;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    transition: color 0.15s, transform 0.15s;
}

.pat-res-item:hover .pat-res-item-arrow {
    color: #6d7e8b;
    transform: translateX(2px);
}

/* ---------- Coming-soon accordion state ---------- */
.pat-res-accordion.pat-res-coming-soon {
    opacity: 0.55;
    pointer-events: none;
}

.pat-res-accordion.pat-res-coming-soon .pat-res-accordion-header {
    cursor: default;
    pointer-events: none;
}

.pat-res-coming-soon-badge {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 3px 9px;
    border-radius: 20px;
    line-height: 1.4;
    white-space: nowrap;
}

.pat-res-accordion.pat-res-coming-soon .pat-res-chevron {
    opacity: 0.3;
}

/* ============================================================
   INSIGHTS TAB
   ============================================================ */

/* comparison-wrapper: use the same calc as the container minus header+tabs */
.pat-sl-tab-content[data-tab="insights"] .comparison-wrapper {
    height: calc(100vh - 290px);
    min-height: 400px;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* ── Toggle bar */
.pat-sl-tab-content[data-tab="insights"] .comparison-toggle {
    background-color: #ededed;
    padding: 10px 10px 10px 15px;
    border: 1px solid #dddbdb;
    border-radius: 6px;
    box-shadow: 0 0px 6px -2px #82b2df;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.pat-sl-tab-content[data-tab="insights"] .toggle-switch {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pat-sl-tab-content[data-tab="insights"] .toggle-label {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.pat-sl-assessment-label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    background: #fff;
    border: 1px solid #cccbcb;
    border-radius: 4px;
    padding: 4px 14px;
    box-shadow: 0 0 6px 1px #dbdbdb;
    white-space: nowrap;
    opacity: 0.4;
    /* 2.11.20: a long organisation name is cut with an ellipsis instead of running under the controls on the right */
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 2.11.20: the box may shrink; section-insights.js sets its exact limit from where the right-hand controls start */
.pat-sl-tab-content[data-tab="insights"] .comparison-toggle { max-width: calc(100% - 30px); }
.pat-sl-tab-content[data-tab="insights"] .comparison-toggle .toggle-switch { flex: 0 1 auto; min-width: 0; }
.pat-sl-tab-content[data-tab="insights"] .comparison-toggle .pat-sl-insights-info-wrap { flex: none; }

/* ── Info ? button (sits next to the label in the toggle bar) */
.pat-sl-insights-info-btn {
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #e9e9e9;
    color: #a3a3a3;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    cursor: help;
    border: 1px solid #ddd;
    font-family: inherit;
    line-height: 1;
    padding: 1px 1px 0px 2px ;
    transition: background 0.15s;
    flex-shrink: 0;
    box-shadow: 0 0 4px #ddd
}

.pat-sl-insights-info-btn:hover {
    background: #777777;
    color: #ffffff;
}

/* ── Tooltip: appended to <body> by JS, so position:fixed always works */
.pat-sl-insights-tooltip {
    display: none;
    position: fixed;
    width: 296px;
    background: #263238;
    color: #f3f5f8;
    font-size: 12px;
    font-family: 'Inter';
    line-height: 1.4;
    padding: 12px 14px;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    line-height: 1.55;
    pointer-events: auto;
}

.pat-sl-insights-tooltip.pat-sl-tooltip-visible {
    display: block;
}

.pat-sl-insights-tooltip-arrow {
    position: absolute;
    top: -4px;
    left: 9px;
    width: 12px;
    height: 12px;
    background: #263238;
    border-radius: 1px;
    transform: rotate(45deg);
}

.pat-sl-insights-tooltip-title {
    font-size: 14px;
    font-weight: 500;
    color: #f3f5f8;
    margin-bottom: 8px;
}

.pat-sl-insights-tooltip-body {
    margin: 0 0 10px;
    color: #94a3b8;
    font-size: 12px !important;
    font-family: 'Inter' !important;
    line-height: 1.55;
    font-weight: 400;
}

.pat-sl-insights-tooltip-body strong {
    color: #f0f0f0;
    font-weight: 500;
}

.pat-sl-insights-tooltip-body span {
    color: #c3cbd6;
    font-weight: 500;
}

.pat-sl-insights-tooltip-link {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    line-height: 1.45;
}

.pat-sl-insights-tooltip-link strong {
    color: #ffffff;
    font-weight: 500;
}

.pat-sl-insights-tooltip-link:hover {
    color: #94a3b8;
    text-decoration: none !important;
}

/* ── chart-section fills remaining wrapper height */
.pat-sl-tab-content[data-tab="insights"] .chart-section {
    flex: 1;
    position: relative;
    min-height: 0;
}

.pat-sl-tab-content[data-tab="insights"] .chart-section > div[id^="comparison-scatter-"] {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, #e0f0ff, #fff);
}

.pat-sl-tab-content[data-tab="insights"] .loading-spinner-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Insights: small-screen message (≤500px) ── */
.pat-sl-insights-small-screen {
    display: none;
    padding: 48px 24px;
    text-align: center;
}

.pat-sl-insights-ss-icon {
    color: #e74c3c;
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
}

.pat-sl-insights-ss-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.pat-sl-insights-ss-text {
    font-size: 14px;
    line-height: 1.65;
    color: #64748b;
    max-width: 300px;
    margin: 0 auto;
}

.pat-sl-insights-ss-text strong {
    color: #1e293b;
}

@media (max-width: 500px) {
    .pat-sl-insights-small-screen {
        display: block;
    }
    .pat-sl-tab-content[data-tab="insights"] .comparison-wrapper {
        display: none;
    }
}


/* The level bar / toolbar belongs to the Activities tab only */
.pat-sl-container[data-active-tab]:not([data-active-tab="activities"]) .pat-sl-level-bar { display: none; }

/* ==========================================================================
   Activities tools (Decoder / sort / dim) — pill controls in the level bar,
   styled after the Performance page's sort + focus controls.
   ========================================================================== */
.pat-sl-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pat-sl-level-bar--tools-only .pat-sl-tools { margin-left: 0; }
.pat-sl-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: #fff; border: 1px solid #dfe3e7; box-shadow: 0 1px 2px rgba(52,66,76,.06); }
.pat-sl-seg-icon { display: inline-flex; color: #a8a8a8; padding: 0 6px 0 10px; }
.pat-sl-seg-text { font: 500 13px/1 'Inter', sans-serif; color: #959595; padding-right: 4px; }
.pat-sl-seg-opt { font: 500 13px/1 'Inter', sans-serif; color: #959595; background: transparent; border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.pat-sl-seg-opt small { color: #bfbfbf; font-size: 12px; }
.pat-sl-seg-opt:hover { color: #34424C; }
.pat-sl-seg-opt.active { background: #34424C; color: #fff; }
.pat-sl-seg-opt.active small { color: #cfd6dc; }
.pat-sl-decoder .pat-sl-seg-opt.active { background: #3793D1; }
/* Decoder parked as "coming soon": dimmed, non-interactive (Sections → Display → Decoder) */
.pat-sl-decoder--soon { --pat-sl-decoder-soon-opacity: .45; opacity: var(--pat-sl-decoder-soon-opacity); filter: grayscale(1); }
.pat-sl-decoder--soon .pat-sl-seg-opt { cursor: default; pointer-events: none; }
.pat-sl-decoder--soon .pat-sl-seg-opt.active { background: #8a949c; }
.pat-sl-decoder--soon .pat-sl-tools-info-wrap { pointer-events: none; }
.pat-sl-tools-info-wrap { display: inline-flex; align-items: center; margin: 0 6px 0 4px; }
.pat-sl-tools-info-wrap .pat-sl-insights-info-btn { background: #e3e6ea; color: #6b6b6b; border-color: #d3d8dd; box-shadow: none; }
.pat-sl-tools-info-wrap .pat-sl-insights-info-btn:hover { background: #34424C; color: #fff; border-color: #34424C; }
.pat-sl-pilltoggle { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 3px 3px 3px 14px; border-radius: 999px; background: #fff; border: 1px solid #dfe3e7; box-shadow: 0 1px 2px rgba(52,66,76,.06); cursor: pointer; user-select: none; }
.pat-sl-pilltoggle-icon { display: inline-flex; color: #8a8a8a; }
.pat-sl-pilltoggle-label { font: 500 13px/1 'Inter', sans-serif; color: #959595; white-space: nowrap; }
.pat-sl-pilltoggle-input { position: absolute; opacity: 0; pointer-events: none; }
.pat-sl-pilltoggle-switch { position: relative; width: 66px; height: 30px; border-radius: 999px; background: #c9c9c9; transition: background .2s; }
.pat-sl-pilltoggle-switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
.pat-sl-pilltoggle-switch b { position: absolute; right: 10px; top: 0; font: 700 11px/30px 'Inter', sans-serif; color: #fff; letter-spacing: .3px; }
.pat-sl-pilltoggle-input:checked + .pat-sl-pilltoggle-switch { background: #3793D1; }
.pat-sl-pilltoggle-input:checked + .pat-sl-pilltoggle-switch i { left: 39px; }
.pat-sl-pilltoggle-input:checked + .pat-sl-pilltoggle-switch b { right: auto; left: 12px; }
/* decoder: swapped title */
.pat-sl-activity-grid .activity_title .pat-sl-ours { display: block; font-size: 12px; font-weight: 500; color: #9aa3ad; margin-top: 2px; }
/* dim attempted */
.pat-sl-activity-grid.pat-sl-dim-on .activity_prog_type_container[data-runs]:not([data-runs="0"]) { opacity: .4; transition: opacity .25s; }
.pat-sl-activity-grid.pat-sl-dim-on .activity_prog_type_container[data-runs]:not([data-runs="0"]):hover { opacity: 1; }
@media (max-width: 900px) {
    .pat-sl-tools { margin-left: 0; width: 100%; }
    .pat-sl-pilltoggle-label { display: none; }
    .pat-sl-seg-opt { padding: 7px 10px; font-size: 12px; }
}
/* 2.11.19: below 430px the sort pill ran past the edge of the screen and made the page scroll sideways.
   "Stage Order" is dropped there (it is the default; tapping the selected option again returns to it),
   and the pill can never be wider than the bar. */
@media (max-width: 429.98px) {
    .pat-sl-sort .pat-sl-seg-opt[data-sort="order"] { display: none; }
    .pat-sl-tools .pat-sl-seg { max-width: 100%; }
    .pat-sl-tools .pat-sl-sort { overflow-x: auto; scrollbar-width: none; }
    .pat-sl-tools .pat-sl-sort::-webkit-scrollbar { display: none; }
}

/* "Coming soon" placeholder (Resources tab, while parked) */
.pat-sl-coming-soon {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
    padding: 40px 24px;
}
.pat-sl-coming-soon-title { font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 500; color: #64748b; }
.pat-sl-coming-soon p { margin: 0; font-size: 14px; max-width: 460px; line-height: 1.6; }

/* ==========================================================================
   2.9.0 — Stage tail circle + E-Learning sub-sections
   ========================================================================== */
.pat-sl-stage-header.has-tail {
    display: flex;
    align-items: center;
    gap: 16px;
}
.pat-sl-stage-head-text { min-width: 0; flex: 1; }
.pat-sl-stage-tail {
    /* tuned against the artwork; live tail PNGs carry ~6% transparent canvas, hence 52px */
    --tc-d: 52px; --tc-w: 54px; --tc-x: -11px; --tc-y: 55%;
    --tc-bg: 10%; --tc-sb: 6px; --tc-sa: .12;
    width: var(--tc-d);
    height: var(--tc-d);
    border-radius: 50%;
    flex: none;
    position: relative;
    overflow: hidden;
    display: block;
    background: color-mix(in srgb, var(--pat-sl-brand, #1e293b) var(--tc-bg), #fff);
    box-shadow: inset 0 0 var(--tc-sb) 0 rgba(0, 0, 0, var(--tc-sa));
}
.pat-sl-stage-tail img {
    position: absolute;
    left: var(--tc-x);
    top: var(--tc-y);
    transform: translateY(-50%);
    width: var(--tc-w) !important;
    height: auto !important;
    max-width: none;
    object-fit: contain;
    object-position: left center;
    margin: 0;
    box-shadow: none;
    border: 0;
}
@supports not (background: color-mix(in srgb, #000 10%, #fff)) {
    .pat-sl-stage-tail { background: #f3f5f7; }
}

.pat-sl-learn-section { margin-top: 44px; }
.pat-sl-learn-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 400;
    color: #596981;
    border-bottom: 1px solid #dfdfdf91;
    padding-bottom: 8px;
    margin: 0 0 24px;
}
.pat-sl-learn-heading strong { font-weight: 700; font-size: 17px; }
.pat-sl-learn-leadin { color: #545d6a; font-weight: 500; font-family: 'Open Sans'; }
.pat-sl-learn-text { display: inline; }
.pat-sl-learn-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
    background: var(--pat-sl-brand, #1e293b);
    margin: 0 2px 0 1px;
}
@media (max-width: 900px) {
    .pat-sl-stage-tail { --tc-d: 44px; --tc-w: 46px; --tc-x: -9px; }
    .pat-sl-stage-header.has-tail { gap: 12px; align-items: flex-start; }
    .pat-sl-stage-header.has-tail .pat-sl-stage-tail { margin-top: 2px; }
}
@media (max-width: 600px) {
    .pat-sl-stage-tail { --tc-d: 38px; --tc-w: 40px; --tc-x: -8px; }
    .pat-sl-stage-subtitle, .pat-sl-stage-subtitle strong { font-size: 17px; }
    .pat-sl-learn-heading, .pat-sl-learn-heading strong { font-size: 15px; }
}
@media (max-width: 420px) {
    .pat-sl-stage-tail { --tc-d: 34px; --tc-w: 36px; --tc-x: -7px; }
    .pat-sl-stage-subtitle, .pat-sl-stage-subtitle strong { font-size: 16px; }
}

/* ==========================================================================
   2.10.0 — One-time "We've made some improvements…" popover
   ========================================================================== */
.pat-sl-welcome { position: fixed; inset: 0; z-index: 100000; background: rgba(27,37,44,.45); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; animation: pat-sl-welcome-in .35s ease forwards; animation-delay: .4s; font-family: 'Open Sans', sans-serif; }
@keyframes pat-sl-welcome-in { to { opacity: 1; } }
.pat-sl-welcome-card { background: #fff; border-radius: 6px; width: 100%; max-width: 750px; box-shadow: 0 30px 80px rgba(0,0,0,.3); overflow: hidden; position: relative; max-height: calc(100vh - 40px); overflow-y: auto; }
.pat-sl-welcome-band { position: relative; height: 104px; background: linear-gradient(90deg,#3793d1 0%,#5fb0e4 100%); color: #fff; padding: 20px 32px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; }
.pat-sl-welcome-l2 { font-size: 28px; font-weight: 600; line-height: 1.2; max-width: 80%; position: relative; z-index: 1; }
.pat-sl-welcome-corner { position: absolute; right: -24px; bottom: -36px; width: 110px; height: 110px; transform: rotate(-22deg); opacity: .9; filter: drop-shadow(0 6px 14px rgba(0,0,0,.18)); }
.pat-sl-welcome-body { padding: 26px 32px 24px; }
.pat-sl-welcome-body p { font-size: 14px; color: #596981; line-height: 1.7; margin: 0 0 14px; }
.pat-sl-welcome-intro { font-size: 15px !important; color: #34424C !important; line-height: 1.9 !important; margin-bottom: 26px !important; }
.pat-sl-ul { display: inline-block; position: relative; font-weight: 600; color: #34424C; padding-bottom: 9px; white-space: nowrap; }
.pat-sl-ul svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 12px; overflow: visible; pointer-events: none; }
.pat-sl-welcome-rep { border: 1px solid #e4e9ee; border-radius: 10px; overflow: hidden; background: #fff; }
.pat-sl-welcome-tabs { display: flex; border-bottom: 1px solid #dfe6ea; padding: 10px 3% 0; background: #f6f8fa; }
.pat-sl-welcome-tab { position: relative; padding: 8px 20px; border: 1px solid transparent; border-top: 3px solid transparent; border-bottom: 1px solid transparent; background: none; cursor: pointer; font: 600 14px 'Open Sans', sans-serif !important; color: #a0a5ab; margin-bottom: -1px; border-radius: 4px 4px 0 0; }
.pat-sl-welcome-tab:hover { color: #646970; }
.pat-sl-welcome-tab.active { color: #596974; background: #fff; border-color: #dfe6ea; border-top-color: #34424C; border-bottom-color: #fff; box-shadow: 0 -3px 7px #d6dde2; }
.pat-sl-welcome-tab[data-t="insights"].active { background: #e0f0ff; border-bottom-color: #e0f0ff; color: #424f57; }
.pat-sl-welcome-panel { display: flex; gap: 16px; align-items: center; padding: 14px 16px; min-height: 92px; animation: pat-sl-welcome-fade .25s; }
.pat-sl-welcome-panel[hidden] { display: none; }
@keyframes pat-sl-welcome-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.pat-sl-welcome-panel[data-t="insights"] { background: linear-gradient(180deg,#e0f0ff 0,#f3f9ff 100%); }
.pat-sl-welcome-panel[data-t="insights"] .pat-sl-welcome-art { background: rgba(255,255,255,.25); }
.pat-sl-welcome-art { flex: none; width: 120px; height: 64px; display: flex; gap: 6px; align-items: flex-end; justify-content: center; background: #f6f8fa; border-radius: 8px; padding: 8px; box-sizing: border-box; }
.pat-sl-welcome-card-ic { width: 30px; height: 44px; border-radius: 4px; background: #fff; border: 1px solid #e4e9ee; position: relative; }
.pat-sl-welcome-card-ic:after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #7ce027; border-radius: 0 0 4px 4px; }
.pat-sl-welcome-card-ic:nth-child(2):after { background: #f4da21; } .pat-sl-welcome-card-ic:nth-child(3):after { background: #e4e9ee; }
.pat-sl-welcome-art-lines { flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; padding: 12px 14px; }
.pat-sl-welcome-art-lines span { height: 6px; border-radius: 3px; background: #cfd8e0; display: block; }
.pat-sl-welcome-art-bubbles span { width: 54px; height: 26px; border-radius: 12px 12px 12px 3px; background: #e8f6fc; align-self: flex-start; margin-top: 4px; display: block; }
.pat-sl-welcome-art-bubbles span.r { border-radius: 12px 12px 3px 12px; background: #7ce027; opacity: .6; align-self: flex-end; }
.pat-sl-welcome-art-bars span { width: 14px; border-radius: 3px 3px 0 0; background: #00acdd; display: block; }
.pat-sl-welcome-art-bars span:nth-child(2) { background: #7ce027; } .pat-sl-welcome-art-bars span:nth-child(3) { background: #f4da21; }
.pat-sl-welcome-text { font-size: 13px; color: #596981; line-height: 1.6; }
.pat-sl-welcome-text b { color: #384B56; font-weight: 600; }
.pat-sl-welcome-foot { display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 6px 32px 26px; }
.pat-sl-welcome-faint { margin-right: auto; font: 400 12.5px 'Open Sans', sans-serif; color: #b0b8c1; }
.pat-sl-welcome-go { background: #36454f; color: #fff; border: 0; border-radius: 30px; padding: 14px 28px; font: 600 15px 'Inter', sans-serif; cursor: pointer; }
.pat-sl-welcome-go:hover { background: #2b3740; }
@media (max-width: 560px) {
    .pat-sl-welcome { padding: 0; align-items: flex-end; }
    .pat-sl-welcome-card { border-radius: 14px 14px 0 0; max-height: 92vh; }
    .pat-sl-welcome-band { height: 92px; padding: 16px 22px; } .pat-sl-welcome-l2 { font-size: 22px; }
    .pat-sl-welcome-body { padding: 20px 22px 18px; }
    .pat-sl-welcome-intro { font-size: 13.5px !important; line-height: 1.8 !important; }
    .pat-sl-welcome-tab { padding: 7px 9px; font-size: 12.5px !important; }
    .pat-sl-welcome-panel { padding: 12px; } .pat-sl-welcome-art { display: none; } .pat-sl-welcome-text { font-size: 12.5px; }
    .pat-sl-welcome-foot { padding: 4px 22px 22px; flex-wrap: wrap; gap: 12px; }
    .pat-sl-welcome-faint { flex-basis: 100%; margin: 0; } .pat-sl-welcome-go { width: 100%; }
}

/* ==========================================================================
   2.11.0 — Sub-group tabs inside a stage (e.g. Numerical Reasoning: Simple / Complex)
   Mirrors the main tabs; the active tab's top border takes the section's secondary colour.
   ========================================================================== */
.pat-sl-subgroups { margin-top: 4px; }
.pat-sl-activity-grid + .pat-sl-subgroups { margin-top: 30px; }
.pat-sl-subtabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid #dfe6ea; margin: 0 0 24px; padding: 0 4px; }
.pat-sl-subtab {
    position: relative; display: flex; align-items: center; gap: 8px;
    padding: 8px 16px 8px 20px; cursor: pointer; user-select: none;
    font-family: 'Open Sans', sans-serif !important; font-size: 16px; font-weight: 500; color: #a0a5ab;
    border: 1px solid transparent; border-top: 3px solid transparent; border-bottom: 1px solid transparent;
    margin-bottom: -1px; border-radius: 4px 4px 0 0; transition: color .2s ease;
}
.pat-sl-subtab:hover { color: #646970; }
.pat-sl-subtab.active {
    color: #596974; background: #fff; border-color: #dfe6ea;
    border-top-color: var(--pat-sl-sub, #3793D1); border-bottom-color: #fff;
    box-shadow: 0 -3px 7px #d6dde2;
}
.pat-sl-subtab:focus-visible { outline: 2px solid var(--pat-sl-sub, #3793D1); outline-offset: 2px; }
.pat-sl-subtab-help {
    width: 18px; height: 18px; border-radius: 50%; border: 0; padding: 0; flex: none;
    background: #e2e8f0; color: #64748b; font: 700 11px/18px 'Inter', sans-serif; text-align: center; cursor: help;
}
.pat-sl-subtab-help:hover, .pat-sl-subtab.active .pat-sl-subtab-help { background: #cbd5e1; }
/* Tooltip: the exact values of the Discussions tooltip (.pat-disc-share-tooltip / .pat-disc-settings-tooltip):
   #263238 ground, #f3f5f8 Inter 12px/1.4 400, 6px 12px padding, 6px radius, 5px border-triangle arrow,
   9px gap, .25s fade-and-drop entry. Text only, no title. */
.pat-sl-subtab-tip {
    display: none; position: fixed; z-index: 100000; box-sizing: border-box;
    width: max-content; max-width: min(330px, calc(100vw - 32px)); white-space: normal; text-align: left;
    background: #263238; color: #f3f5f8 !important;
    font-family: 'Inter', sans-serif !important; font-size: 12px !important; line-height: 1.4 !important;
    font-weight: 400 !important; letter-spacing: 0 !important; text-transform: none !important;
    padding: 6px 12px; border-radius: 6px; pointer-events: none; cursor: default;
}
.pat-sl-subtab-tip.show { display: block; animation: patSlTipIn .25s ease; }
@keyframes patSlTipIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }
.pat-sl-subtab-tip::after {
    content: ''; position: absolute; left: var(--ax, 11px); bottom: 100%;
    border: 5px solid transparent; border-bottom-color: #263238;
}
.pat-sl-subtab-tip.above::after { bottom: auto; top: 100%; border-bottom-color: transparent; border-top-color: #263238; }
.pat-sl-subpanel[hidden] { display: none !important; }
@media (max-width: 600px) {
    .pat-sl-subtab { padding: 8px 10px 8px 12px; font-size: 15px; }
}
