.plr-bsh {
    --plr-bsh-navy: #0C2C43;
    --plr-bsh-orange: #F37748;
    --plr-bsh-orange-soft: rgba(243, 119, 72, 0.10);
    --plr-bsh-ink: #243447;
    --plr-bsh-muted: #667085;
    --plr-bsh-border: rgba(12, 44, 67, 0.12);
    --plr-bsh-border-strong: rgba(12, 44, 67, 0.20);
    --plr-bsh-card: #ffffff;
    --plr-bsh-soft: #fbfcfd;
    --plr-bsh-warm-soft: #fff8f2;
    --plr-bsh-shadow: none;
    --plr-bsh-radius: 18px;
    --plr-bsh-radius-sm: 12px;

    color: var(--plr-bsh-ink);
    font-family: inherit;
}

.plr-bsh * {
    box-sizing: border-box;
}

.plr-bsh a {
    color: inherit;
}

/* =========================================================
   Header: quieter study workspace, not a landing-page hero
   ========================================================= */

.plr-bsh-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 14px;
    padding: clamp(18px, 3vw, 26px);
    border: 1px solid var(--plr-bsh-border);
    border-radius: var(--plr-bsh-radius);
    background: #ffffff;
    box-shadow: none;
}

.plr-bsh-eyebrow {
    margin: 0 0 8px;
    color: var(--plr-bsh-orange);
    font-size: 11px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.plr-bsh-title {
    margin: 0;
    color: var(--plr-bsh-navy);
    font-size: clamp(26px, 3.2vw, 38px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.018em;
}

.plr-bsh-subtitle {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--plr-bsh-muted);
    font-size: 14.5px;
    line-height: 1.65;
}

.plr-bsh-header-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    min-width: 170px;
}

.plr-bsh-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid var(--plr-bsh-border);
    border-radius: 999px;
    background: #fbfcfd;
    color: var(--plr-bsh-navy);
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

/* =========================================================
   Subject selector: simple subject switching
   ========================================================= */

.plr-bsh-subjects-wrap {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--plr-bsh-border);
    border-radius: var(--plr-bsh-radius-sm);
    background: #ffffff;
}

.plr-bsh-subjects-label {
    margin: 0 0 8px;
    color: var(--plr-bsh-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.plr-bsh-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.plr-bsh-subject-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid var(--plr-bsh-border);
    border-radius: 999px;
    background: #fbfcfd;
    color: var(--plr-bsh-navy);
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.plr-bsh-subject-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(243, 119, 72, 0.35);
    background: var(--plr-bsh-orange-soft);
    color: var(--plr-bsh-navy);
}

.plr-bsh-subject-pill.is-active {
    border-color: var(--plr-bsh-navy);
    background: var(--plr-bsh-navy);
    color: #ffffff;
}

/* =========================================================
   Filters: search-first, advanced controls tucked away
   ========================================================= */

.plr-bsh-filters {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--plr-bsh-border);
    border-radius: var(--plr-bsh-radius-sm);
    background: #ffffff;
    box-shadow: none;
}

.plr-bsh-primary-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
}

.plr-bsh-search-wrap {
    display: block;
    min-width: 0;
}

.plr-bsh-search {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--plr-bsh-border-strong);
    border-radius: 12px;
    background: #fbfcfd;
    color: var(--plr-bsh-ink);
    font-size: 14px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.plr-bsh-search:focus {
    border-color: var(--plr-bsh-orange);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(243, 119, 72, 0.10);
}

.plr-bsh-filter-action,
.plr-bsh-tree-control,
.plr-bsh-filter-pill {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid var(--plr-bsh-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--plr-bsh-navy);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.plr-bsh-filter-action:hover,
.plr-bsh-tree-control:hover,
.plr-bsh-filter-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(243, 119, 72, 0.35);
    background: var(--plr-bsh-orange-soft);
    color: var(--plr-bsh-navy);
}

.plr-bsh-filter-pill.is-active {
    border-color: var(--plr-bsh-navy);
    background: var(--plr-bsh-navy);
    color: #ffffff;
}

.plr-bsh-essential-toggles,
.plr-bsh-filter-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.plr-bsh-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--plr-bsh-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.plr-bsh-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--plr-bsh-orange);
}

.plr-bsh-advanced-filters {
    display: grid;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(12, 44, 67, 0.13);
}

.plr-bsh-advanced-filters.is-hidden {
    display: none;
}

.plr-bsh-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* =========================================================
   Main body and tree shell
   ========================================================= */

.plr-bsh-body {
    display: grid;
    gap: 14px;
}

.plr-bsh-tree-shell {
    border: 1px solid var(--plr-bsh-border);
    border-radius: var(--plr-bsh-radius);
    background: #ffffff;
    box-shadow: none;
    overflow: hidden;
}

.plr-bsh-tree-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--plr-bsh-border);
    background: #fbfcfd;
}

.plr-bsh-tree-summary {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.plr-bsh-tree-summary strong {
    color: var(--plr-bsh-navy);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
}

.plr-bsh-tree-summary span {
    color: var(--plr-bsh-muted);
    font-size: 12.5px;
    line-height: 1.35;
}

.plr-bsh-tree-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.plr-bsh-tree-control {
    min-height: 30px;
    padding: 5px 10px;
}

.plr-bsh-tree {
    margin: 0;
    padding: 6px;
    list-style: none;
}

.plr-bsh-node,
.plr-bsh-node-children {
    margin: 0;
    padding: 0;
    list-style: none;
}

.plr-bsh-node {
    position: relative;
}

.plr-bsh-node-row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-height: 40px;
    padding: 6px;
    border-radius: 12px;
    transition: background 160ms ease;
}

.plr-bsh-node-row:hover {
    background: rgba(12, 44, 67, 0.035);
}

.plr-bsh-node-toggle,
.plr-bsh-node-spacer {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    margin-top: 1px;
}

.plr-bsh-node-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--plr-bsh-border);
    border-radius: 999px;
    background: #fbfcfd;
    color: var(--plr-bsh-navy);
    font: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}

.plr-bsh-node-toggle span {
    display: block;
    transform: rotate(0deg);
    transition: transform 160ms ease;
}

.plr-bsh-node[aria-expanded="true"] > .plr-bsh-node-row .plr-bsh-node-toggle span {
    transform: rotate(90deg);
}

.plr-bsh-node-toggle:hover {
    border-color: rgba(243, 119, 72, 0.35);
    background: var(--plr-bsh-orange-soft);
}

.plr-bsh-node-main {
    min-width: 0;
    flex: 1 1 auto;
}

.plr-bsh-node-title-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.plr-bsh-node-title {
    color: var(--plr-bsh-navy);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 750;
}

.plr-bsh-node-level-subject > .plr-bsh-node-row .plr-bsh-node-title {
    font-size: 16px;
    font-weight: 850;
}

.plr-bsh-node-level-topic > .plr-bsh-node-row .plr-bsh-node-title {
    font-size: 15px;
    font-weight: 800;
}

.plr-bsh-node-reading-count,
.plr-bsh-count-badge,
.plr-bsh-resource-mini-label {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid var(--plr-bsh-border);
    border-radius: 999px;
    background: #fbfcfd;
    color: var(--plr-bsh-muted);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.2;
}

.plr-bsh-node-reading-count {
    color: var(--plr-bsh-navy);
}

.plr-bsh-node-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.plr-bsh-count-badge {
    background: #ffffff;
    color: var(--plr-bsh-muted);
}

.plr-bsh-node-children {
    margin-left: 18px;
    padding-left: 10px;
    border-left: 1px dashed rgba(12, 44, 67, 0.10);
}

.plr-bsh-is-collapsed-default .plr-bsh-node[aria-expanded="false"] > .plr-bsh-node-children,
.plr-bsh-node.is-collapsed > .plr-bsh-node-children {
    display: none;
}

.plr-bsh-node.is-hidden-by-filter,
.plr-bsh-resource-card.is-hidden-by-filter {
    display: none !important;
}

/* =========================================================
   Resources: reading links, not heavy cards
   ========================================================= */

.plr-bsh-resources {
    margin: 0 8px 9px 42px;
    padding: 12px;
    border: 1px solid rgba(12, 44, 67, 0.09);
    border-radius: 14px;
    background: #fbfcfd;
}

.plr-bsh-resource-section + .plr-bsh-resource-section {
    margin-top: 12px;
}

.plr-bsh-resource-heading {
    margin: 0 0 8px;
    color: var(--plr-bsh-navy);
    font-size: 11.5px;
    line-height: 1.3;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.plr-bsh-resource-list {
    display: grid;
    gap: 7px;
}

.plr-bsh-resource-card {
    position: relative;
    border: 1px solid rgba(12, 44, 67, 0.10);
    border-radius: 13px;
    background: #ffffff;
    box-shadow: none;
    overflow: hidden;
}

.plr-bsh-resource-card::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px 0;
    width: 2px;
    border-radius: 999px;
    background: var(--plr-bsh-orange);
    opacity: 0.55;
}

.plr-bsh-resource-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px 10px 14px;
    color: var(--plr-bsh-navy);
    text-decoration: none;
}

.plr-bsh-resource-link:hover {
    background: rgba(243, 119, 72, 0.045);
    color: var(--plr-bsh-navy);
}

.plr-bsh-resource-link:hover .plr-bsh-resource-title {
    color: var(--plr-bsh-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.plr-bsh-resource-mini-label {
    background: var(--plr-bsh-orange-soft);
    border-color: rgba(243, 119, 72, 0.20);
    color: var(--plr-bsh-navy);
    white-space: nowrap;
}

.plr-bsh-resource-title {
    min-width: 0;
    margin: 0;
    color: var(--plr-bsh-navy);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 760;
}

/* Legacy compatibility for older renderer markup */
.plr-bsh-resource-card-main {
    display: grid;
    gap: 6px;
}

.plr-bsh-resource-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.plr-bsh-resource-type,
.plr-bsh-resource-group {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid var(--plr-bsh-border);
    border-radius: 999px;
    background: #fbfcfd;
    color: var(--plr-bsh-muted);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.2;
}

.plr-bsh-resource-type {
    border-color: rgba(243, 119, 72, 0.20);
    background: var(--plr-bsh-orange-soft);
    color: var(--plr-bsh-navy);
}

/* =========================================================
   Notices, empty states, locked state
   ========================================================= */

.plr-bsh-empty,
.plr-bsh-notice,
.plr-bsh-locked-notice {
    margin: 0;
    padding: 20px;
    border: 1px solid var(--plr-bsh-border);
    border-radius: var(--plr-bsh-radius);
    background: #ffffff;
    color: var(--plr-bsh-ink);
    box-shadow: none;
}

.plr-bsh-empty h3,
.plr-bsh-locked-title {
    margin: 0 0 10px;
    color: var(--plr-bsh-navy);
    font-size: 21px;
    line-height: 1.18;
    font-weight: 850;
    letter-spacing: -0.015em;
}

.plr-bsh-empty p,
.plr-bsh-locked-text {
    margin: 0;
    color: var(--plr-bsh-muted);
    font-size: 14.5px;
    line-height: 1.65;
}

.plr-bsh-locked-notice {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    background: #ffffff;
}

.plr-bsh-locked-pill {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid rgba(243, 119, 72, 0.25);
    border-radius: 999px;
    background: var(--plr-bsh-orange-soft);
    color: var(--plr-bsh-orange);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.plr-bsh-locked-link-wrap {
    margin: 18px 0 0;
}

.plr-bsh-locked-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--plr-bsh-navy);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
}

.plr-bsh-locked-link:hover {
    background: var(--plr-bsh-orange);
    color: #ffffff !important;
}

.plr-bsh-no-results {
    display: none;
    padding: 18px;
    border-top: 1px solid var(--plr-bsh-border);
    color: var(--plr-bsh-muted);
    font-size: 14.5px;
    line-height: 1.6;
    text-align: center;
}

.plr-bsh.has-no-visible-results .plr-bsh-no-results {
    display: block;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
    .plr-bsh-header {
        display: block;
    }

    .plr-bsh-header-meta {
        justify-content: flex-start;
        margin-top: 16px;
    }

    .plr-bsh-node-children {
        margin-left: 14px;
        padding-left: 10px;
    }

    .plr-bsh-resources {
        margin-left: 36px;
    }
}

@media (max-width: 720px) {
    .plr-bsh-primary-tools {
        grid-template-columns: 1fr;
    }

    .plr-bsh-filter-action {
        width: 100%;
    }

    .plr-bsh-tree-toolbar {
        display: block;
    }

    .plr-bsh-tree-controls {
        justify-content: flex-start;
        margin-top: 10px;
    }
}

@media (max-width: 640px) {
    .plr-bsh-header {
        padding: 18px;
    }

    .plr-bsh-title {
        font-size: 27px;
    }

    .plr-bsh-filters,
    .plr-bsh-subjects-wrap {
        padding: 11px;
    }

    .plr-bsh-filter-pills,
    .plr-bsh-subjects {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .plr-bsh-filter-pill,
    .plr-bsh-subject-pill {
        white-space: nowrap;
    }

    .plr-bsh-tree {
        padding: 6px;
    }

    .plr-bsh-node-row {
        padding: 7px 5px;
    }

    .plr-bsh-node-toggle,
    .plr-bsh-node-spacer {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }

    .plr-bsh-node-title {
        font-size: 14px;
    }

    .plr-bsh-resources {
        margin: 0 4px 9px 30px;
        padding: 10px;
    }

    .plr-bsh-resource-link {
        grid-template-columns: 1fr;
        gap: 5px;
        align-items: flex-start;
    }

    .plr-bsh-resource-mini-label {
        width: fit-content;
    }
}