/**
 * PLR Resource Navigator - Clean workspace redesign.
 *
 * Direction:
 * - ClickUp-inspired workspace clarity
 * - PLR-controlled legal-tech identity
 * - Minimal gradients
 * - Color used structurally for branches and active states
 * - White cards, soft shadows, readable tree
 */

.plr-rn {
    --plr-rn-bg: #f7f8fb;
    --plr-rn-surface: #ffffff;
    --plr-rn-surface-soft: #fbfcfe;
    --plr-rn-border: #e7ebf0;
    --plr-rn-border-strong: #d9e0e8;

    --plr-rn-navy: #0c2c43;
    --plr-rn-heading: #202938;
    --plr-rn-text: #475467;
    --plr-rn-muted: #667085;
    --plr-rn-orange: #f37748;

    --plr-rn-purple: #7c6ff6;
    --plr-rn-green: #55b77a;
    --plr-rn-blue: #5597dc;
    --plr-rn-red: #e85d64;
    --plr-rn-gold: #ef9f3d;
    --plr-rn-charcoal: #2d3440;

    --plr-rn-radius-xl: 22px;
    --plr-rn-radius-lg: 16px;
    --plr-rn-radius-md: 12px;

    --plr-rn-shadow-card: 0 8px 22px rgba(16, 24, 40, 0.07);
    --plr-rn-shadow-float: 0 14px 36px rgba(16, 24, 40, 0.08);

    position: relative;
    width: 100%;
    max-width: 1240px;
    min-height: 680px;
    margin: 0 auto;
    padding: 0;
    color: var(--plr-rn-text);
    background: var(--plr-rn-bg);
    border: 1px solid var(--plr-rn-border);
    border-radius: var(--plr-rn-radius-xl);
    overflow: hidden;
}

.plr-rn,
.plr-rn * {
    box-sizing: border-box;
}

.plr-rn a {
    color: inherit;
    text-decoration: none;
}

.plr-rn button,
.plr-rn input {
    font: inherit;
}

/* =========================================================
   Header: quiet app-style top bar
   ========================================================= */

.plr-rn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--plr-rn-border);
}

.plr-rn-header-copy {
    min-width: 0;
}

.plr-rn-eyebrow {
    margin-bottom: 2px;
    color: var(--plr-rn-orange);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.plr-rn-title {
    margin: 0;
    color: var(--plr-rn-heading);
    font-family: "Roboto Slab", Georgia, serif;
    font-size: clamp(1.25rem, 1.7vw, 1.7rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.plr-rn-subtitle {
    max-width: 760px;
    margin: 5px 0 0;
    color: var(--plr-rn-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.plr-rn-header-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.plr-rn-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid var(--plr-rn-border);
    border-radius: 999px;
    background: var(--plr-rn-surface-soft);
    color: var(--plr-rn-muted);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

/* =========================================================
   Toggle: restrained segmented control
   ========================================================= */

.plr-rn-toggle-wrap {
    display: inline-flex;
    gap: 4px;
    margin: 16px 24px 0;
    padding: 4px;
    border: 1px solid var(--plr-rn-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.04);
}

.plr-rn-toggle {
    min-width: 148px;
    padding: 9px 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--plr-rn-muted);
    cursor: pointer;
    text-align: left;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.plr-rn-toggle:hover {
    background: #f5f7fa;
    color: var(--plr-rn-heading);
}

.plr-rn-toggle.is-active {
    background: #f0f3f8;
    color: var(--plr-rn-heading);
    box-shadow: inset 0 0 0 1px rgba(12, 44, 67, 0.05);
}

.plr-rn-toggle-kicker {
    display: none;
}

.plr-rn-toggle-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 800;
}

/* =========================================================
   Stage and panels
   ========================================================= */

.plr-rn-stage {
    position: relative;
    padding: 20px 24px 28px;
}

.plr-rn-panel {
    display: none;
}

.plr-rn-panel.is-active {
    display: block;
}

.plr-rn-is-ready .plr-rn-panel.is-active {
    animation: plrRnSoftIn 280ms ease both;
}

@keyframes plrRnSoftIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Library Map: clean mind-map workspace
   ========================================================= */

.plr-rn-library {
    position: relative;
    min-height: 520px;
    padding: 44px 28px;
    background:
        linear-gradient(rgba(12, 44, 67, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(12, 44, 67, 0.035) 1px, transparent 1px),
        #f8f9fc;
    background-size: 36px 36px;
    border: 1px solid var(--plr-rn-border);
    border-radius: 22px;
    overflow: hidden;
}

.plr-rn-library-root {
    display: flex;
    justify-content: center;
    margin-bottom: 34px;
}

.plr-rn-root-card {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: 430px;
    padding: 15px 18px;
    border: 1px solid var(--plr-rn-border);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--plr-rn-shadow-float);
}

.plr-rn-root-orb {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border-radius: 999px;
    background: var(--plr-rn-navy);
    box-shadow: 0 0 0 5px rgba(12, 44, 67, 0.08);
}

.plr-rn-root-title {
    margin: 0;
    color: var(--plr-rn-heading);
    font-size: 1rem;
    font-weight: 900;
}

.plr-rn-root-caption {
    margin: 2px 0 0;
    color: var(--plr-rn-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.plr-rn-root-stat {
    display: none;
}

.plr-rn-library-branches {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 22px 44px;
    max-width: 1040px;
    margin: 0 auto;
}

.plr-rn-library-node {
    --branch-color: var(--plr-rn-green);
    position: relative;
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(1) {
    --branch-color: var(--plr-rn-purple);
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(2) {
    --branch-color: var(--plr-rn-green);
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(3) {
    --branch-color: var(--plr-rn-red);
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(4) {
    --branch-color: var(--plr-rn-gold);
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(5) {
    --branch-color: var(--plr-rn-blue);
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(6) {
    --branch-color: var(--plr-rn-charcoal);
}

.plr-rn-library-node-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--plr-rn-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--plr-rn-shadow-card);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.plr-rn-library-node-card:hover {
    transform: translateY(-1px);
    border-color: rgba(12, 44, 67, 0.16);
    box-shadow: 0 12px 26px rgba(16, 24, 40, 0.09);
}

.plr-rn-library-node-depth-0 > .plr-rn-library-node-card {
    width: fit-content;
    min-width: 210px;
}

.plr-rn-library-node-depth-0 > .plr-rn-library-node-card::before {
    content: "";
    width: 5px;
    align-self: stretch;
    border-radius: 999px;
    background: var(--branch-color);
}

.plr-rn-library-node-dot,
.plr-rn-library-node-icon {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 999px;
    background: var(--branch-color);
}

.plr-rn-library-node-main {
    min-width: 0;
    flex: 1;
}

.plr-rn-library-node-title {
    display: inline-flex;
    color: var(--plr-rn-heading);
    font-size: 0.87rem;
    font-weight: 800;
    line-height: 1.35;
}

a.plr-rn-library-node-title:hover {
    color: var(--branch-color);
}

.plr-rn-library-node-description {
    display: block;
    margin-top: 2px;
    color: var(--plr-rn-muted);
    font-size: 0.74rem;
    line-height: 1.35;
}

.plr-rn-library-node-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--branch-color) 14%, white);
    color: var(--branch-color);
    font-size: 0.7rem;
    font-weight: 850;
}

.plr-rn-library-collapse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: 0;
    border-radius: 8px;
    background: #f3f5f8;
    color: var(--plr-rn-muted);
    cursor: pointer;
}

.plr-rn-library-collapse span {
    transform: rotate(90deg);
    transition: transform 160ms ease;
}

.plr-rn-library-node.is-collapsed > .plr-rn-library-node-card .plr-rn-library-collapse span {
    transform: rotate(0deg);
}

.plr-rn-library-children {
    position: relative;
    display: grid;
    gap: 10px;
    margin: 12px 0 0 26px;
    padding-left: 22px;
    border-left: 2px solid color-mix(in srgb, var(--branch-color) 55%, transparent);
}

.plr-rn-library-node.is-collapsed > .plr-rn-library-children {
    display: none;
}

.plr-rn-library-children > .plr-rn-library-node::before {
    content: "";
    position: absolute;
    top: 23px;
    left: -22px;
    width: 18px;
    height: 2px;
    background: color-mix(in srgb, var(--branch-color) 55%, transparent);
}

.plr-rn-library-node-depth-1 > .plr-rn-library-node-card,
.plr-rn-library-node-depth-2 > .plr-rn-library-node-card,
.plr-rn-library-node-depth-3 > .plr-rn-library-node-card {
    width: fit-content;
    min-width: 190px;
    max-width: 100%;
    box-shadow: 0 6px 16px rgba(16, 24, 40, 0.055);
}

/* =========================================================
   Bar Review Map: app workspace
   ========================================================= */

.plr-rn-bar {
    display: grid;
    grid-template-columns: 278px minmax(0, 1fr);
    min-height: 560px;
    border: 1px solid var(--plr-rn-border);
    border-radius: 22px;
    background: var(--plr-rn-surface);
    overflow: hidden;
}

.plr-rn-bar-rail {
    background: #fafbfc;
    border-right: 1px solid var(--plr-rn-border);
    padding: 18px 14px;
}

.plr-rn-bar-rail-kicker,
.plr-rn-bar-panel-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--plr-rn-orange);
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.plr-rn-bar-rail-title {
    margin: 0 0 14px;
    color: var(--plr-rn-heading);
    font-size: 0.98rem;
    font-weight: 900;
}

.plr-rn-bar-subject-list {
    display: grid;
    gap: 6px;
}

.plr-rn-bar-subject {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--plr-rn-text);
    text-align: left;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease;
}

.plr-rn-bar-subject:hover {
    background: #f0f3f7;
    color: var(--plr-rn-heading);
}

.plr-rn-bar-subject.is-active {
    background: #edf2f7;
    color: var(--plr-rn-heading);
}

.plr-rn-bar-subject.is-active::before {
    content: "";
    position: absolute;
}

.plr-rn-bar-subject-title {
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
}

.plr-rn-bar-subject-count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--plr-rn-muted);
    font-size: 0.7rem;
    font-weight: 850;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.plr-rn-bar-subject.is-active .plr-rn-bar-subject-count {
    color: var(--plr-rn-orange);
}

.plr-rn-bar-main {
    min-width: 0;
    padding: 22px;
    background: #ffffff;
}

.plr-rn-bar-subject-panel {
    display: none;
}

.plr-rn-bar-subject-panel.is-active {
    display: block;
    animation: plrRnSoftIn 220ms ease both;
}

.plr-rn-bar-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 16px;
}

.plr-rn-bar-panel-title {
    margin: 0;
    color: var(--plr-rn-heading);
    font-family: "Roboto Slab", Georgia, serif;
    font-size: clamp(1.15rem, 1.6vw, 1.5rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.plr-rn-bar-panel-subtitle {
    max-width: 720px;
    margin: 6px 0 0;
    color: var(--plr-rn-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.plr-rn-bar-panel-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.plr-rn-bar-panel-stats span {
    min-height: 28px;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f5f7fa;
    color: var(--plr-rn-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

/* =========================================================
   Bar tools
   ========================================================= */

.plr-rn-bar-tools {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.plr-rn-bar-search-wrap {
    flex: 1;
    min-width: 220px;
}

.plr-rn-bar-search {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--plr-rn-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--plr-rn-heading);
    outline: none;
}

.plr-rn-bar-search:focus {
    border-color: #b9c4d2;
    box-shadow: 0 0 0 3px rgba(12, 44, 67, 0.06);
}

.plr-rn-bar-tool-actions {
    display: flex;
    gap: 6px;
}

.plr-rn-bar-tool {
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid var(--plr-rn-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--plr-rn-muted);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.plr-rn-bar-tool:hover {
    background: #f5f7fa;
    color: var(--plr-rn-heading);
}

/* =========================================================
   Bar outline tree
   ========================================================= */

.plr-rn .plr-bsh-outline-tree {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.plr-rn .plr-bsh-outline-node {
    position: relative;
    list-style: none;
}

.plr-rn .plr-bsh-outline-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--plr-rn-border);
    border-radius: 10px;
    background: #ffffff;
    transition: background 140ms ease, border-color 140ms ease;
}

.plr-rn .plr-bsh-outline-row:hover {
    background: #fbfcfe;
    border-color: var(--plr-rn-border-strong);
}

.plr-rn .plr-bsh-outline-toggle,
.plr-rn .plr-bsh-outline-spacer {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.plr-rn .plr-bsh-outline-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: #f2f5f8;
    color: var(--plr-rn-muted);
    cursor: pointer;
}

.plr-rn .plr-bsh-outline-toggle span {
    transform: rotate(90deg);
    transition: transform 150ms ease;
}

.plr-rn .plr-bsh-outline-node.is-collapsed > .plr-bsh-outline-row .plr-bsh-outline-toggle span {
    transform: rotate(0deg);
}

.plr-rn .plr-bsh-outline-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.plr-rn .plr-bsh-outline-title {
    min-width: 0;
    color: var(--plr-rn-heading);
    font-size: 0.86rem;
    font-weight: 780;
    line-height: 1.35;
}

.plr-rn .plr-bsh-outline-count {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f3f5f8;
    color: var(--plr-rn-muted);
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.plr-rn .plr-bsh-outline-children {
    display: grid;
    gap: 6px;
    margin: 7px 0 0 18px;
    padding-left: 16px;
    border-left: 1px solid #dce3ec;
    list-style: none;
}

.plr-rn .plr-bsh-outline-node.is-collapsed > .plr-bsh-outline-children {
    display: none;
}

.plr-rn .plr-bsh-outline-children > .plr-bsh-outline-node::before {
    content: "";
    position: absolute;
    top: 20px;
    left: -16px;
    width: 12px;
    border-top: 1px solid #dce3ec;
}

.plr-rn .is-rn-search-hidden {
    display: none !important;
}

.plr-rn .is-rn-search-match > .plr-bsh-outline-row {
    border-color: rgba(243, 119, 72, 0.45);
    background: #fff8f5;
}

.plr-rn-outline-no-results {
    margin-top: 12px;
    padding: 14px;
    border: 1px dashed var(--plr-rn-border-strong);
    border-radius: 12px;
    background: #fafbfc;
    color: var(--plr-rn-muted);
    font-size: 0.88rem;
    text-align: center;
}

/* =========================================================
   Empty / locked
   ========================================================= */

.plr-rn-empty,
.plr-rn-locked,
.plr-rn-locked-custom {
    max-width: 720px;
    margin: 26px auto;
    padding: 24px;
    border: 1px dashed var(--plr-rn-border-strong);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--plr-rn-muted);
    text-align: center;
}

.plr-rn-empty h3 {
    margin: 0 0 8px;
    color: var(--plr-rn-heading);
    font-size: 1rem;
    font-weight: 900;
}

.plr-rn-empty p,
.plr-rn-locked p,
.plr-rn-locked-custom p {
    margin: 0;
    line-height: 1.6;
}

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

@media (max-width: 1024px) {
    .plr-rn-library-branches {
        grid-template-columns: 1fr;
        max-width: 720px;
    }

    .plr-rn-bar {
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .plr-rn-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .plr-rn-toggle-wrap {
        margin-left: 18px;
        margin-right: 18px;
    }

    .plr-rn-stage {
        padding: 18px;
    }

    .plr-rn-bar {
        grid-template-columns: 1fr;
    }

    .plr-rn-bar-rail {
        border-right: 0;
        border-bottom: 1px solid var(--plr-rn-border);
    }

    .plr-rn-bar-subject-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .plr-rn-bar-subject {
        min-width: 210px;
    }

    .plr-rn-bar-panel-header,
    .plr-rn-bar-tools {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .plr-rn {
        border-radius: 18px;
    }

    .plr-rn-header {
        padding: 16px;
    }

    .plr-rn-toggle-wrap {
        display: grid;
        grid-template-columns: 1fr;
    }

    .plr-rn-toggle {
        min-width: 0;
    }

    .plr-rn-library {
        padding: 28px 16px;
    }

    .plr-rn-root-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .plr-rn-library-node-depth-0 > .plr-rn-library-node-card,
    .plr-rn-library-node-depth-1 > .plr-rn-library-node-card,
    .plr-rn-library-node-depth-2 > .plr-rn-library-node-card,
    .plr-rn-library-node-depth-3 > .plr-rn-library-node-card {
        width: 100%;
    }

    .plr-rn-library-children,
    .plr-rn .plr-bsh-outline-children {
        margin-left: 10px;
        padding-left: 13px;
    }

    .plr-rn-bar-main {
        padding: 16px;
    }

    .plr-rn .plr-bsh-outline-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .plr-rn *,
    .plr-rn *::before,
    .plr-rn *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================
   RESOURCE NAVIGATOR — PREMIUM POLISH
   ========================================= */

.plr-rn {
    max-width: 1520px;
    margin: 0 auto;
    padding: 0 18px 28px;
}

.plr-rn-header {
    border: none;
    padding: 34px 22px 20px;
    background: transparent;
}

.plr-rn-eyebrow {
    display: none !important;
}

.plr-rn-title {
    margin: 0 0 8px;
    font-size: clamp(2.1rem, 2.8vw, 3rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #1d2940;
}

.plr-rn-subtitle {
    margin: 0;
    max-width: 760px;
    font-size: 1.02rem;
    line-height: 1.65;
    color: #667085;
}

.plr-rn-header-meta {
    gap: 10px;
}

.plr-rn-meta-pill {
    border: 1px solid #d8dee8;
    background: #fbfcfe;
    color: #5f6c7b;
    box-shadow: none;
}

/* Main stage */
.plr-rn-stage {
    padding: 18px 22px 24px;
}

.plr-rn-library,
.plr-rn-bar {
    border-radius: 26px;
}

/* Toggle */
.plr-rn-toggle-wrap {
    margin: 0 22px 10px;
}

.plr-rn-toggle {
    min-width: 138px;
    border-radius: 14px;
}

/* =========================================
   ROOT / MAIN LIBRARY NODE
   ========================================= */

.plr-rn-library-root {
    margin-bottom: 26px;
}

.plr-rn-root-card {
    position: relative;
    max-width: 410px;
    margin: 0 auto;
    padding: 18px 18px 18px 18px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.05),
        0 2px 8px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

/* subtle rainbow gradient border only for the main node */
.plr-rn-root-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1.25px;
    border-radius: 22px;
    background: linear-gradient(
        135deg,
        #e97b7b,
        #e9b07b,
        #e9df7b,
        #86e0a3,
        #7fd7e6,
        #8aa7ea,
        #b59ae8,
        #e88fc9
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.75;
}

.plr-rn-root-title {
    margin: 0 0 6px;
    font-size: 1.55rem;
    line-height: 1.15;
    font-weight: 800;
    color: #1b2b44;
}

.plr-rn-root-caption {
    margin: 0;
    color: #667085;
    font-size: 0.98rem;
    line-height: 1.55;
}

.plr-rn-root-orb {
    box-shadow: 0 0 0 4px rgba(12, 44, 67, 0.05);
}

.plr-rn-root-stat {
    border: 1px solid #dde4ee;
    background: #fafcff;
    color: #5f6c7b;
}

/* =========================================
   LIBRARY MAP BOARD
   ========================================= */

.plr-rn-library {
    background: #f8fafc;
    border: 1px solid #e6ebf2;
    border-radius: 26px;
    padding: 24px 20px 26px;
}

.plr-rn-library-branches {
    position: relative;
    min-height: 420px;
    padding: 34px 16px 8px;
    border: 1px solid #e4e9f0;
    border-radius: 24px;
    background-color: #f8fafc;
    background-image:
        linear-gradient(to right, rgba(180, 190, 205, 0.14) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(180, 190, 205, 0.14) 1px, transparent 1px);
    background-size: 32px 32px;
    overflow: hidden;
}

/* vertical connector from root area */
.plr-rn-library-branches::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    height: 44px;
    border-left: 1.5px dashed #cfd7e3;
    transform: translateX(-50%);
    opacity: 0.95;
}

/* =========================================
   LIBRARY NODES
   ========================================= */

.plr-rn-library-node {
    position: relative;
}

.plr-rn-library-node-depth-0 {
    margin-top: 8px;
}

/* short dashed connector above each top-level card */
.plr-rn-library-node-depth-0::before {
    content: "";
    position: absolute;
    top: -18px;
    left: 50%;
    height: 18px;
    border-left: 1.5px dashed #cfd7e3;
    transform: translateX(-50%);
}

/* subtle horizontal branch */
.plr-rn-library-node-depth-0::after {
    content: "";
    position: absolute;
    top: -18px;
    left: calc(50% - 48px);
    width: 96px;
    border-top: 1.5px dashed #cfd7e3;
    opacity: 0.9;
}

.plr-rn-library-node-card {
    border: 1px solid #e4e9f0;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.plr-rn-library-node-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    border-color: #d6deea;
}

.plr-rn-library-node-title {
    font-weight: 700;
    color: #344054;
}

.plr-rn-library-node-description {
    color: #667085;
}

/* make colored side accents a little softer */
.plr-rn-library-node-dot,
.plr-rn-library-node-icon {
    opacity: 0.9;
}

/* =========================================================
   PLR Resource Navigator — Final library map refinements
   ========================================================= */

/* Main PLR Library/root card */
.plr-rn-root-card {
    border-radius: 23px;
}

/* Subtle rainbow gradient border only on the main PLR Library card */
.plr-rn-root-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1.15px;
    border-radius: 23px;
    background: linear-gradient(
        135deg,
        #e97b7b,
        #e9b07b,
        #e9df7b,
        #86e0a3,
        #7fd7e6,
        #8aa7ea,
        #b59ae8,
        #e88fc9
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.68;
}

/* Grey dashed child branches */
.plr-rn-library-children {
    border-left: 2px dashed color-mix(in srgb, #aeacac 55%, transparent);
}

.plr-rn-library-children > .plr-rn-library-node::before {
    background: color-mix(in srgb, #c5bfbf 55%, transparent);
}

/* Fallback in case color-mix is not supported */
@supports not (color: color-mix(in srgb, #000 50%, transparent)) {
    .plr-rn-library-children {
        border-left: 2px dashed rgba(174, 172, 172, 0.55);
    }

    .plr-rn-library-children > .plr-rn-library-node::before {
        background: rgba(197, 191, 191, 0.55);
    }
}

/* Use the PLR softened rainbow palette as branch accents */
.plr-rn-library-branches > .plr-rn-library-node:nth-child(1) {
    --branch-color: #e97b7b;
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(2) {
    --branch-color: #e9b07b;
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(3) {
    --branch-color: #e9df7b;
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(4) {
    --branch-color: #86e0a3;
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(5) {
    --branch-color: #7fd7e6;
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(6) {
    --branch-color: #8aa7ea;
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(7) {
    --branch-color: #b59ae8;
}

.plr-rn-library-branches > .plr-rn-library-node:nth-child(8) {
    --branch-color: #e88fc9;
}

/* These are the two parts you identified: side accent and node dot/icon */
.plr-rn-library-node-depth-0 > .plr-rn-library-node-card::before,
.plr-rn-library-node-dot,
.plr-rn-library-node-icon {
    background: var(--branch-color);
}

/* Keep the accent elegant, not neon */
.plr-rn-library-node-depth-0 > .plr-rn-library-node-card::before {
    opacity: 0.82;
}

.plr-rn-library-node-dot,
.plr-rn-library-node-icon {
    opacity: 0.88;
}

/* Bar Review Map — resources only toggle */
.plr-rn-resources-only-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid var(--plr-rn-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--plr-rn-muted);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.plr-rn-resources-only-toggle input {
    width: 14px;
    height: 14px;
    accent-color: var(--plr-rn-orange);
}

.plr-rn-resources-only-toggle:hover {
    background: #f5f7fa;
    color: var(--plr-rn-heading);
}

/* =========================================================
   Bar Review Map — sticky subject rail on desktop
   ========================================================= */

@media (min-width: 821px) {
    .plr-rn-bar {
        align-items: start;
        overflow: visible;
    }

    .plr-rn-bar-rail {
        position: sticky;
        top: 96px;
        align-self: start;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        scrollbar-width: thin;
        z-index: 2;
    }

    .plr-rn-bar-rail::-webkit-scrollbar {
        width: 7px;
    }

    .plr-rn-bar-rail::-webkit-scrollbar-track {
        background: transparent;
    }

    .plr-rn-bar-rail::-webkit-scrollbar-thumb {
        background: rgba(102, 112, 133, 0.22);
        border-radius: 999px;
    }

    .plr-rn-bar-rail::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 112, 133, 0.34);
    }
}

/* =========================================================
   Bar Review Map — Sticky left subject rail
   ========================================================= */

@media (min-width: 821px) {
    .plr-rn,
    .plr-rn-stage,
    .plr-rn-panel,
    .plr-rn-bar-panel,
    .plr-rn-bar {
        overflow: visible !important;
    }

    .plr-rn-bar {
        align-items: start;
    }

    .plr-rn-bar-rail {
        position: sticky !important;
        top: 96px;
        align-self: start;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        z-index: 5;
    }

    .plr-rn-bar-main {
        min-width: 0;
    }
}

/* =========================================================
   Remove floating top-level “T” connector marks
   ========================================================= */

/* Remove the disconnected connector from the library board */
.plr-rn-library-branches::before {
    display: none !important;
}

/* Remove floating top-level T-lines above parent cards */
.plr-rn-library-node-depth-0::before,
.plr-rn-library-node-depth-0::after {
    display: none !important;
}

/* Keep only child-level sitemap lines */
.plr-rn-library-children {
    border-left: 2px dashed color-mix(in srgb, #aeacac 55%, transparent);
}

.plr-rn-library-children > .plr-rn-library-node::before {
    content: "";
    position: absolute;
    top: 23px;
    left: -22px;
    width: 18px;
    height: 2px;
    background: color-mix(in srgb, #c5bfbf 55%, transparent);
}

/* Fallback for browsers without color-mix support */
@supports not (color: color-mix(in srgb, #000 50%, transparent)) {
    .plr-rn-library-children {
        border-left: 2px dashed rgba(174, 172, 172, 0.55);
    }

    .plr-rn-library-children > .plr-rn-library-node::before {
        background: rgba(197, 191, 191, 0.55);
    }
}

#content > div > div > div > div > div > section > div.plr-rn-stage > div.plr-rn-panel.plr-rn-bar-panel.is-active > div > div {
    border-radius:23px!important;
}

#content > div > div > div > div > div > section > div.plr-rn-stage > div.plr-rn-panel.plr-rn-bar-panel.is-active > div > aside {
    border-radius:23px!important;
}

#content > div > div > div > div > div > section > div.plr-rn-stage > div.plr-rn-panel.plr-rn-bar-panel.is-active > div > aside{
    max-height:calc(100vh - 94px)!important;
}

/* =========================================================
   Resource Navigator — subtle premium cue for Bar Review Map
   ========================================================= */

/* Make the Bar Review Map toggle feel slightly more premium */
.plr-rn-toggle[data-plr-rn-view-button="bar"] {
    position: relative;
    border: 1.5px solid transparent;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(
            135deg,
            #e97b7b,
            #e9b07b,
            #e9df7b,
            #86e0a3,
            #7fd7e6,
            #8aa7ea,
            #b59ae8,
            #e88fc9
        ) border-box;
}

/* Keep selected state soft and not too loud */
.plr-rn-toggle[data-plr-rn-view-button="bar"].is-active {
    background:
        linear-gradient(#f0f3f8, #f0f3f8) padding-box,
        linear-gradient(
            135deg,
            #e97b7b,
            #e9b07b,
            #e9df7b,
            #86e0a3,
            #7fd7e6,
            #8aa7ea,
            #b59ae8,
            #e88fc9
        ) border-box;
}

/* Optional: make the label just a little stronger */
.plr-rn-toggle[data-plr-rn-view-button="bar"] .plr-rn-toggle-label {
    color: #1d2940;
}

/* =========================================================
   Resource Navigator — clearer active toggle state
   ========================================================= */

.plr-rn-toggle.is-active {
    background:#f37748 !important;
    color: #f37748 !important;
    box-shadow:
        inset 0 0 0 1px rgba(243, 119, 72, 0.24),
        0 4px 12px rgba(243, 119, 72, 0.08);
}

.plr-rn-toggle.is-active .plr-rn-toggle-label {
    color: white !important;
    font-weight: 900;
}

/* =========================================================
   Bar Review Map — Linked readings under expanded nodes
   ========================================================= */

/*
 * These linked readings are intended to stay hidden while the node is collapsed,
 * then appear only when the immediate parent node is expanded.
 */

.plr-rn .plr-bsh-outline-resources {
    display: grid;
    gap: 9px;
    margin: 8px 0 12px 42px;
    padding: 11px 12px;
    border: 1px solid #e7ebf0;
    border-radius: 13px;
    background: #fbfcfe;
}

/* Hide readings when the immediate parent node is collapsed */
.plr-rn .plr-bsh-outline-node.is-collapsed > .plr-bsh-outline-resources,
.plr-rn .plr-bsh-outline-node[aria-expanded="false"] > .plr-bsh-outline-resources {
    display: none;
}

.plr-rn .plr-bsh-outline-resources-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plr-rn .plr-bsh-outline-resources-label::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #f37748;
    opacity: 0.75;
}

.plr-rn .plr-bsh-outline-resource-list {
    display: grid;
    gap: 8px;
}

/* Individual linked reading card */
.plr-rn .plr-bsh-outline-resource-item,
.plr-rn .plr-bsh-outline-resource-card {
    display: grid;
    gap: 6px;
    padding: 10px 11px;
    border: 1px solid #e5eaf1;
    border-radius: 11px;
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.035);
    transition:
        transform 140ms ease,
        border-color 140ms ease,
        background 140ms ease,
        box-shadow 140ms ease;
}

.plr-rn .plr-bsh-outline-resource-item:hover,
.plr-rn .plr-bsh-outline-resource-card:hover {
    transform: translateY(-1px);
    border-color: rgba(243, 119, 72, 0.26);
    background: #fffaf7;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
}

/* Main resource link row */
.plr-rn .plr-bsh-outline-resource-link {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: #344054;
    text-decoration: none;
}

.plr-rn .plr-bsh-outline-resource-link:hover {
    color: #1d2940;
}

/* Type / group pill, e.g. Case, Codal, Reviewer */
.plr-rn .plr-bsh-outline-resource-type,
.plr-rn .plr-bsh-outline-resource-mini-label {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(243, 119, 72, 0.10);
    color: #f37748;
    font-size: 0.65rem;
    font-weight: 850;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* Resource title */
.plr-rn .plr-bsh-outline-resource-title {
    min-width: 0;
    color: #344054;
    font-size: 0.84rem;
    font-weight: 780;
    line-height: 1.35;
}

/* Small contextual note */
.plr-rn .plr-bsh-outline-resource-note,
.plr-rn .plr-bsh-outline-resource-context {
    color: #667085;
    font-size: 0.75rem;
    line-height: 1.45;
}

.plr-rn .plr-bsh-outline-resource-note strong,
.plr-rn .plr-bsh-outline-resource-context strong {
    color: #475467;
    font-weight: 800;
}

/* Related tags / also relevant to pills */
.plr-rn .plr-bsh-outline-resource-tags,
.plr-rn .plr-bsh-outline-resource-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 1px;
}

.plr-rn .plr-bsh-outline-resource-tag,
.plr-rn .plr-bsh-outline-resource-tags span,
.plr-rn .plr-bsh-outline-resource-tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid #e3e8ef;
    border-radius: 999px;
    background: #f8fafc;
    color: #667085;
    font-size: 0.66rem;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

/* Locked non-premium state */
.plr-rn .plr-bsh-outline-resources-locked {
    border-style: dashed;
    background: #ffffff;
}

.plr-rn .plr-bsh-outline-resource-locked-pill {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(12, 44, 67, 0.06);
    color: #667085;
    font-size: 0.74rem;
    font-weight: 800;
}

.plr-rn .plr-bsh-outline-resource-locked-pill::before {
    content: "Premium";
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(243, 119, 72, 0.10);
    color: #f37748;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.02em;
}

/* Keep spacing cleaner on mobile */
@media (max-width: 640px) {
    .plr-rn .plr-bsh-outline-resources {
        margin-left: 18px;
        padding: 10px;
    }

    .plr-rn .plr-bsh-outline-resource-link {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .plr-rn .plr-bsh-outline-resource-type,
    .plr-rn .plr-bsh-outline-resource-mini-label {
        width: fit-content;
    }
}

/* =========================================================
   Resource Navigator — Mobile Bar Review Map Fix
   ========================================================= */

@media (max-width: 820px) {
    .plr-rn {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        overflow: hidden !important;
    }

    .plr-rn-header,
    .plr-rn-stage,
    .plr-rn-library,
    .plr-rn-bar-main {
        width: 100% !important;
        max-width: 100% !important;
    }

    .plr-rn-header {
        padding-left: 22px !important;
        padding-right: 22px !important;
    }

    .plr-rn-title {
        font-size: clamp(2rem, 10vw, 3rem) !important;
        line-height: 1.08 !important;
        word-break: normal;
    }

    .plr-rn-subtitle,
    .plr-rn-bar-panel-subtitle {
        max-width: 100% !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
    }

    .plr-rn-header-meta {
        justify-content: flex-start !important;
    }

    .plr-rn-toggle-wrap {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: calc(100% - 44px) !important;
        margin-left: 22px !important;
        margin-right: 22px !important;
    }

    .plr-rn-toggle {
        width: 100% !important;
        min-width: 0 !important;
        text-align: left !important;
    }

    .plr-rn-bar {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        border-radius: 22px !important;
    }

    .plr-rn-bar-rail {
        width: 100% !important;
        max-width: 100% !important;
        border-right: 0 !important;
        border-bottom: 1px solid var(--plr-rn-border, #e7ebf0) !important;
        overflow: hidden !important;
        position: relative !important;
        top: auto !important;
        max-height: none !important;
    }

    .plr-rn-bar-subject-list {
        display: flex !important;
        gap: 12px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 4px 2px 12px !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .plr-rn-bar-subject {
        flex: 0 0 min(78vw, 340px) !important;
        min-width: min(78vw, 340px) !important;
        max-width: min(78vw, 340px) !important;
        scroll-snap-align: start;
        white-space: normal !important;
    }

    .plr-rn-bar-subject-title {
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .plr-rn-bar-main {
        padding: 22px !important;
        overflow: hidden !important;
    }

    .plr-rn-bar-panel-header {
        display: block !important;
        margin-bottom: 22px !important;
    }

    .plr-rn-bar-panel-title {
        font-size: clamp(1.45rem, 7vw, 2rem) !important;
        line-height: 1.15 !important;
        overflow-wrap: anywhere;
    }

    .plr-rn-bar-tools {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .plr-rn-bar-search-wrap,
    .plr-rn-bar-search {
        width: 100% !important;
        min-width: 0 !important;
    }

    .plr-rn-bar-tool-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .plr-rn-resources-only-toggle {
        grid-column: 1 / -1;
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .plr-rn-bar-tool {
        width: 100% !important;
        min-width: 0 !important;
        justify-content: center !important;
    }

    .plr-rn-bar-outline,
    .plr-rn .plr-bsh-outline-tree {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .plr-rn .plr-bsh-outline-row {
        display: grid !important;
        grid-template-columns: 54px minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
    }

    .plr-rn .plr-bsh-outline-toggle,
    .plr-rn .plr-bsh-outline-spacer {
        width: 44px !important;
        height: 44px !important;
        flex: 0 0 44px !important;
    }

    .plr-rn .plr-bsh-outline-main {
        min-width: 0 !important;
        width: 100% !important;
        display: grid !important;
        gap: 7px !important;
    }

    .plr-rn .plr-bsh-outline-title {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.35 !important;
    }

    .plr-rn .plr-bsh-outline-count {
        width: fit-content !important;
    }

    .plr-rn .plr-bsh-outline-children {
        margin-left: 18px !important;
        padding-left: 14px !important;
    }

    .plr-rn .plr-bsh-outline-resources {
        margin-left: 18px !important;
        max-width: calc(100% - 18px) !important;
    }
}

@media (max-width: 480px) {
    .plr-rn-header {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .plr-rn-stage {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .plr-rn-bar-main {
        padding: 18px 14px !important;
    }

    .plr-rn-bar-subject {
        flex-basis: 82vw !important;
        min-width: 82vw !important;
        max-width: 82vw !important;
    }

    .plr-rn-bar-tool-actions {
        grid-template-columns: 1fr !important;
    }

    .plr-rn .plr-bsh-outline-row {
        grid-template-columns: 48px minmax(0, 1fr) !important;
    }

    .plr-rn .plr-bsh-outline-toggle,
    .plr-rn .plr-bsh-outline-spacer {
        width: 42px !important;
        height: 42px !important;
    }
}

/* Mobile swipe cue - hidden by default */
.plr-mobile-swipe-pill {
  display: none;
}

/* Mobile-only swipe cue for the Bar subject list */
@media (max-width: 767px) {
  .plr-mobile-swipe-pill--bar-subjects {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    margin: 8px 0 12px;
    padding: 7px 13px;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;

    color: #ffffff;
    background: #102a43;
    box-shadow: 0 6px 16px rgba(16, 42, 67, 0.18);

    animation:
    plrSwipePillNudge 1.7s ease-in-out 3,
    plrSwipeCueAutoHide 6.5s ease forwards;
    }

  .plr-mobile-swipe-pill--bar-subjects .plr-swipe-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
  }

  .plr-mobile-swipe-pill--bar-subjects .plr-swipe-arrow {
    display: inline-block;
    font-size: 14px;
    font-weight: 900;
    transform: translateX(0);
    animation: plrSwipeArrowMove 1.1s ease-in-out infinite;
  }

  @keyframes plrSwipePillNudge {
    0%, 100% {
      transform: translateX(0);
    }

    45% {
      transform: translateX(4px);
    }
  }

  @keyframes plrSwipeArrowMove {
    0%, 100% {
      transform: translateX(0);
      opacity: 0.75;
    }

    50% {
      transform: translateX(5px);
      opacity: 1;
    }
  }
}

/* =========================================================
   Resource Navigator — safer mobile layout
   ========================================================= */

@media (max-width: 820px) {
    .plr-rn {
        border-radius: 18px !important;
        overflow: hidden !important;
    }

    .plr-rn-header {
        padding: 26px 22px 18px !important;
    }

    .plr-rn-title {
        font-size: clamp(2rem, 9vw, 2.8rem) !important;
        line-height: 1.08 !important;
    }

    .plr-rn-subtitle,
    .plr-rn-bar-panel-subtitle {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
    }

    .plr-rn-header-meta {
        justify-content: flex-start !important;
    }

    .plr-rn-toggle-wrap {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: calc(100% - 44px) !important;
        margin: 0 22px 22px !important;
    }

    .plr-rn-toggle {
        width: 100% !important;
        min-width: 0 !important;
    }

    .plr-rn-stage {
        padding: 16px !important;
    }

    .plr-rn-bar {
        display: block !important;
        overflow: hidden !important;
    }

    .plr-rn-bar-rail {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
        overflow: hidden !important;
        border-right: 0 !important;
        border-bottom: 1px solid var(--plr-rn-border, #e7ebf0) !important;
    }

    .plr-rn-bar-subject-list {
        display: flex !important;
        gap: 10px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding-bottom: 12px !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .plr-rn-bar-subject {
        flex: 0 0 82% !important;
        max-width: 82% !important;
        min-width: 82% !important;
        scroll-snap-align: start;
        white-space: normal !important;
    }

    .plr-rn-bar-main {
        padding: 18px 14px !important;
    }

    .plr-rn-bar-panel-header {
        display: block !important;
    }

    .plr-rn-bar-panel-title {
        font-size: clamp(1.45rem, 7vw, 2rem) !important;
        line-height: 1.15 !important;
    }

    .plr-rn-bar-tools {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .plr-rn-bar-tool-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 9px !important;
    }

    .plr-rn-resources-only-toggle,
    .plr-rn-bar-tool {
        width: 100% !important;
        justify-content: center !important;
    }

    .plr-rn .plr-bsh-outline-row {
        display: grid !important;
        grid-template-columns: 48px minmax(0, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
        padding: 12px !important;
    }

    .plr-rn .plr-bsh-outline-main {
        min-width: 0 !important;
        width: 100% !important;
        display: grid !important;
        gap: 7px !important;
    }

    .plr-rn .plr-bsh-outline-title {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        line-height: 1.35 !important;
    }

    .plr-rn .plr-bsh-outline-count {
        width: fit-content !important;
    }

    .plr-rn .plr-bsh-outline-children {
        margin-left: 14px !important;
        padding-left: 12px !important;
    }
}

/* =========================================================
   Mobile subject rail — place swipe hint beside Subjects heading
   ========================================================= */

@media (max-width: 820px) {
    .plr-rn-bar-rail-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-areas:
            "kicker swipe"
            "title swipe";
        align-items: center !important;
        column-gap: 12px !important;
        row-gap: 2px !important;
        margin-bottom: 16px !important;
    }

    .plr-rn-bar-rail-kicker {
        grid-area: kicker !important;
        margin: 0 !important;
    }

    .plr-rn-bar-rail-title {
        grid-area: title !important;
        margin: 0 !important;
    }

    .plr-rn-swipe-hint,
    .plr-rn-mobile-swipe-hint,
    .plr-rn-bar-swipe-hint {
        grid-area: swipe !important;
        justify-self: end !important;
        align-self: center !important;
        margin: 0 !important;
        transform: none !important;
        white-space: nowrap !important;
    }
}

/* =========================================================
   Mobile subject rail — clearer container/card treatment
   ========================================================= */

@media (max-width: 820px) {
    .plr-rn-bar-rail {
        background:
            linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%) !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 24px !important;
        box-shadow:
            0 14px 34px rgba(15, 23, 42, 0.075),
            0 3px 10px rgba(15, 23, 42, 0.045) !important;
        padding: 22px 18px 20px !important;
        margin-bottom: 18px !important;
    }

    .plr-rn-bar-rail-header {
        padding-bottom: 12px !important;
        border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
    }

    .plr-rn-bar-subject-list {
        padding-top: 14px !important;
    }

    .plr-rn-bar-subject {
        background: #ffffff !important;
        border: 1px solid #e5eaf1 !important;
        border-radius: 18px !important;
        box-shadow:
            0 8px 22px rgba(15, 23, 42, 0.055),
            0 2px 7px rgba(15, 23, 42, 0.035) !important;
    }

    .plr-rn-bar-subject.is-active {
        background: #eef4f8 !important;
        border-color: rgba(243, 119, 72, 0.22) !important;
        box-shadow:
            0 12px 28px rgba(15, 23, 42, 0.075),
            0 0 0 1px rgba(243, 119, 72, 0.08) !important;
    }

    .plr-rn-bar-subject-count {
        background: #ffffff !important;
        color: #f37748 !important;
        box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06) !important;
    }
}