/* ree-source.com /best-practices/ (v10.2). Loaded after site.css. Uses site.css variables only. */
.bp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bp-hero { padding: 64px 0 28px; }
.bp-hero-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 40px; align-items: center; }
.bp-hero h1 { font-size: clamp(2rem, 4.6vw, 3.5rem); max-width: 20ch; }
.bp-lead { margin-top: 20px; max-width: 58ch; color: var(--body); font-size: 1.05rem; line-height: 1.6; text-wrap: pretty; }
.bp-hero-video { justify-self: end; width: 100%; max-width: 360px; }
.bp-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; border: 1px solid var(--hairline); background: var(--card); overflow: hidden; }
.bp-frame video, .bp-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bp-soon img { opacity: 0.72; }
.bp-soon-label { position: absolute; left: 12px; bottom: 12px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--hairline); background: rgba(10,10,10,0.78); color: var(--body); font-size: 0.76rem; letter-spacing: 0.04em; }
.bp-updated { margin-top: 14px; color: var(--mute); font-size: 0.85rem; }
.bp-section h2.bp-kicker { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.72rem; font-weight: 400; letter-spacing: 0.12em; line-height: 1.5; text-transform: uppercase; margin-top: 0; max-width: none; }
.bp-video-cap { margin-top: 8px; color: var(--mute); font-size: 0.85rem; }

/* Search and category tabs */
.bp-tools { padding: 18px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: var(--void-soft); }
.bp-search { display: block; }
.bp-search input { width: 100%; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--card); color: var(--ink); font: inherit; font-size: 0.98rem; }
.bp-search input:focus { outline: 2px solid var(--pulse); outline-offset: 1px; border-color: transparent; }
.bp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bp-tab { cursor: pointer; border: 1px solid var(--hairline); background: transparent; color: var(--body); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 0.86rem; }
.bp-tab:hover { color: var(--ink); border-color: rgba(255,255,255,0.35); }
.bp-tab.is-active { background: var(--pulse); border-color: var(--pulse); color: #0a0a0a; font-weight: 600; }
.bp-count { opacity: 0.7; font-size: 0.78rem; margin-left: 2px; }

/* Layout: cards plus events sidebar */
.bp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; padding: 36px 0 56px; }
.bp-main { min-width: 0; }
.bp-section { padding: 0; margin-bottom: 48px; scroll-margin-top: 90px; }
.bp-section h2, .bp-side-title { max-width: none; }
.bp-section h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 6px; }
.bp-section-intro { margin-top: 10px; color: var(--body); max-width: 70ch; }
.bp-also-top { margin-top: 10px; color: var(--mute); font-size: 0.9rem; }
.bp-also-top a { color: var(--pulse-soft); }
.bp-cards { display: grid; gap: 12px; margin-top: 18px; }
.bp-empty { padding: 20px; border: 1px dashed var(--hairline); border-radius: 14px; color: var(--body); margin-bottom: 24px; }

/* Cards */
.bp-card { border: 1px solid var(--hairline); border-radius: 14px; background: var(--card); scroll-margin-top: 90px; }
.bp-card[open] { border-color: rgba(255, 99, 8, 0.45); }
.bp-card summary { list-style: none; cursor: pointer; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.bp-card summary::-webkit-details-marker { display: none; }
.bp-card summary:focus-visible { outline: 2px solid var(--pulse); outline-offset: 2px; border-radius: 14px; }
.bp-rank { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,99,8,0.14); color: var(--pulse); font-family: "IBM Plex Mono", monospace; font-size: 0.85rem; font-weight: 500; }
.bp-sum { display: grid; gap: 4px; flex: 1; min-width: 0; }
.bp-meta { font-size: 0.66rem; }
.bp-title { font-family: "IBM Plex Sans", Inter, sans-serif; font-weight: 500; font-size: 1.08rem; color: var(--ink); line-height: 1.3; }
.bp-problem { color: var(--body); font-size: 0.93rem; line-height: 1.5; }
.bp-problem strong, .bp-why strong { color: var(--ink); font-weight: 500; }
.bp-toggle { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 4px; position: relative; }
.bp-toggle::before, .bp-toggle::after { content: ""; position: absolute; left: 4px; right: 4px; top: 10px; height: 2px; background: var(--mute); border-radius: 2px; transition: transform .2s; }
.bp-toggle::after { transform: rotate(90deg); }
.bp-card[open] > summary .bp-toggle::after { transform: rotate(0deg); }
.bp-body { padding: 0 18px 18px 18px; border-top: 1px solid var(--hairline); margin: 0 0 0; }
.bp-body > *:first-child { margin-top: 16px; }
.bp-body p { color: var(--body); margin-top: 12px; }
.bp-body h3 { font-size: 1.05rem; margin-top: 22px; color: var(--ink); }
.bp-why { color: var(--body); }
.bp-prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.bp-prompt-head .mono { margin: 0; }
.bp-copy { cursor: pointer; border: 1px solid var(--hairline); background: var(--pill); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 0.82rem; }
.bp-copy:hover { border-color: var(--pulse); }
.bp-copy.is-done { background: var(--spark); color: #0a0a0a; border-color: var(--spark); }
.bp-prompt { margin-top: 8px; padding: 14px 16px; border-radius: 10px; background: #0d0d0f; border: 1px solid var(--hairline); white-space: pre-wrap; word-wrap: break-word; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.84rem; line-height: 1.6; color: #e6e7ea; }
.bp-setup-label { margin-top: 18px !important; }
.bp-setup, .bp-list { margin: 8px 0 0 20px; color: var(--body); }
.bp-setup li, .bp-list li { margin-top: 6px; line-height: 1.55; }
.bp-source { font-size: 0.88rem; margin-top: 16px !important; color: var(--mute) !important; }
.bp-source a { color: var(--pulse-soft); }

/* Deep dive */
.bp-flagship { border-color: rgba(255, 99, 8, 0.45); background: linear-gradient(180deg, rgba(255,99,8,0.07), var(--card) 140px); margin-top: 10px; }
.bp-flagship .bp-title { font-size: 1.3rem; }
.bp-evolution { border-left: 3px solid var(--pulse); padding-left: 12px; color: var(--ink) !important; }
.bp-table-wrap { overflow-x: auto; margin-top: 12px; }
.bp-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 560px; }
.bp-table th, .bp-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--hairline); vertical-align: top; color: var(--body); }
.bp-table th { color: var(--ink); font-weight: 500; font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.bp-table td strong { color: var(--ink); font-weight: 500; }

/* Sidebar */
.bp-side { position: sticky; top: 140px; display: grid; gap: 16px; max-height: calc(100vh - 156px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; }
.bp-side-box { border: 1px solid var(--hairline); border-radius: 14px; background: var(--card); padding: 18px; }
.bp-side-title { font-size: 1.15rem; }
.bp-side-sub { margin-top: 14px; }
.bp-side-note { margin-top: 6px; color: var(--mute); font-size: 0.84rem; }
.bp-events { list-style: none; margin-top: 8px; display: grid; gap: 12px; }
.bp-events li { display: grid; gap: 2px; font-size: 0.9rem; line-height: 1.4; }
.bp-events li > a { color: var(--ink); text-decoration: none; font-weight: 500; }
.bp-events li > a:hover { color: var(--pulse-soft); }
.bp-events span { color: var(--mute); font-size: 0.8rem; }
.bp-events span a { color: var(--body); }

/* Subsections (v3) */
.bp-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--body); text-decoration: none; font-size: 0.8rem; line-height: 1.3; background: transparent; }
.bp-chip:hover { color: var(--ink); border-color: rgba(255,255,255,0.35); }
.bp-chip.is-active { border-color: var(--pulse); color: var(--ink); background: rgba(255,99,8,0.12); }
.bp-chip .bp-count { margin-left: 0; }
.bp-subsec { margin-top: 26px; scroll-margin-top: 90px; }
.bp-subhead { font-family: "IBM Plex Mono", monospace; font-weight: 500; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pulse-soft); padding-bottom: 8px; border-bottom: 1px solid var(--hairline); max-width: none; }
.bp-subintro { margin-top: 8px; color: var(--body); font-size: 0.92rem; }
.bp-subsec .bp-cards { margin-top: 12px; }

[hidden] { display: none !important; }

@media (max-width: 1000px) {
  .bp-layout { grid-template-columns: 1fr; }
  .bp-side { position: static; max-height: none; overflow: visible; padding-right: 0; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 860px) {
  .bp-hero-row { grid-template-columns: 1fr; gap: 24px; }
  .bp-hero-video { justify-self: start; max-width: 360px; }
}
@media (max-width: 560px) {
  .bp-hero { padding: 40px 0 20px; }
  .bp-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .bp-tab { flex: 0 0 auto; }
  .bp-subnav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .bp-chip { flex: 0 0 auto; }
  .bp-card summary { padding: 14px; gap: 10px; }
  .bp-body { padding: 0 14px 14px; }
  .bp-rank { width: 28px; height: 28px; font-size: 0.78rem; }
  .bp-prompt { font-size: 0.8rem; padding: 12px; }
}

/* v5: credit, vote and suggest buttons on cards */
.bp-credit { margin-top: 10px; color: var(--spark); font-size: 0.86rem; }
.bp-credit a { color: inherit; }
.bp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.bp-vote, .bp-suggest-btn:not(.btn) { cursor: pointer; font: inherit; font-size: 0.86rem; border-radius: 999px; padding: 7px 14px; border: 1px solid var(--hairline); background: transparent; color: var(--body); }
.bp-vote:hover, .bp-suggest-btn:not(.btn):hover { color: var(--ink); border-color: rgba(255,255,255,0.35); }
.bp-vote-count { display: inline-block; min-width: 1.6em; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--pill); color: var(--ink); font-size: 0.78rem; text-align: center; }
.bp-vote.is-voted { border-color: var(--spark); color: var(--spark); cursor: default; }
.bp-vote:disabled { opacity: 0.7; }

/* Community Picks */
.bp-community { border: 1px solid var(--hairline); border-radius: 16px; padding: 22px; background: var(--void-soft); }

.bp-note-ok { color: var(--spark); margin-top: 10px; }
.bp-note-err { color: var(--pulse-soft); margin-top: 10px; }

/* Suggest dialog */
.bp-modal { width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--hairline); border-radius: 16px; background: var(--card); color: var(--body); }
.bp-modal::backdrop { background: rgba(0,0,0,0.7); }
.bp-form { position: relative; display: grid; gap: 14px; padding: 26px; }
.bp-form h2 { font-size: 1.5rem; margin: 0; color: var(--ink); padding-right: 30px; }
.bp-form-lead, .bp-form-small { margin: 0; color: var(--mute); font-size: 0.9rem; }
.bp-form label { display: grid; gap: 6px; font-size: 0.88rem; color: var(--body); }
.bp-form input[type=text], .bp-form input[type=email], .bp-form textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--hairline); background: var(--void); color: var(--ink); font: inherit; font-size: 0.95rem; }
.bp-form input[readonly] { color: var(--mute); }
.bp-form input:focus, .bp-form textarea:focus { outline: 2px solid var(--pulse); outline-offset: 1px; border-color: transparent; }
.bp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bp-form .bp-check { display: flex; gap: 8px; align-items: center; justify-content: flex-start; text-align: left; }
.bp-form .bp-check input { flex: none; width: 18px; height: 18px; margin: 0; }
.bp-form .bp-check span { flex: 1; }
.bp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bp-modal-x { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--mute); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.bp-form-actions { display: flex; gap: 14px; align-items: center; }
.bp-link { background: none; border: 0; color: var(--mute); font: inherit; cursor: pointer; text-decoration: underline; }
.bp-form-status { margin: 0; min-height: 1.2em; font-size: 0.9rem; }
.bp-form-status.is-ok { color: var(--spark); }
.bp-form-status.is-err { color: var(--pulse-soft); }

@media (max-width: 720px) {
  .bp-form-row { grid-template-columns: 1fr; }
  .bp-form { padding: 20px; }
}

/* v6: explainer video uses the homepage video look (same rules as home-vnext.css .hv-frame / .hv-play) */
.hv-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; border: 1px solid var(--hairline); background: var(--card); overflow: hidden; }
.hv-frame video, .hv-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hv-soon img { opacity: 0.72; }
.hv-soon-label { position: absolute; left: 14px; bottom: 14px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--hairline); background: rgba(10,10,10,0.78); color: var(--body); font-size: 0.76rem; letter-spacing: 0.04em; }
.hv-play { position: absolute; top: 50%; left: 50%; z-index: 2; width: 42px; height: 42px; margin: -21px 0 0 -21px; padding: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.9); background: #ff6300; box-shadow: 0 3px 14px rgba(255, 99, 0, 0.45); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.15s ease; }
.hv-play:hover, .hv-play:focus-visible { transform: scale(1.08); }
.hv-play > span { display: block; width: 0; height: 0; margin-left: 3px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; }
.hv-playing .hv-play { display: none; }
@media (max-width: 640px) {
  .hv-frame { border-radius: 12px; }
  .hv-soon-label { left: 10px; bottom: 10px; font-size: 0.72rem; }
  .hv-play { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
  .hv-play > span { border-width: 6px 0 6px 10px; margin-left: 2px; }
}

/* v6: department and subsection accordions. Content stays in the HTML; closed panels are only hidden once JS runs. */
.bp-acc-head { margin: 0; }
.bp-acc-btn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.bp-acc-btn:focus-visible { outline: 2px solid var(--pulse); outline-offset: 4px; border-radius: 6px; }
.bp-acc-btn:hover { color: var(--ink); }
.bp-acc-icon { position: relative; flex: none; width: 28px; height: 28px; border: 1px solid var(--hairline); border-radius: 50%; }
.bp-acc-icon::before, .bp-acc-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; margin: -1px 0 0 -5.5px; background: var(--pulse); transition: transform 0.2s ease; }
.bp-acc-icon::after { transform: rotate(90deg); }
.bp-acc-btn[aria-expanded="true"] .bp-acc-icon::after { transform: rotate(0deg); }
.bp-subhead .bp-acc-icon { width: 22px; height: 22px; }
.bp-subhead .bp-acc-icon::before, .bp-subhead .bp-acc-icon::after { width: 9px; margin-left: -4.5px; }
.bp-section.bp-acc { scroll-margin-top: 90px; }
.bp-section.bp-acc > .bp-acc-head { padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }
.bp-js .bp-acc-closed > .bp-acc-panel { display: none; }
.bp-section.bp-acc-closed { margin-bottom: -8px; }

/* v6: short desktop screens: let the sidebar scroll with the page instead of sticking */
@media (max-height: 640px) {
  .bp-side { position: static; max-height: none; overflow: visible; }
}
.bp-card, .bp-subsec, .bp-section, .bp-fields { scroll-margin-top: 150px; }

/* v6.1: "Pick your field" tiles */
.bp-fields { padding: 30px 0 26px; border-top: 1px solid var(--hairline); }
.bp-fields-title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); max-width: none; }
.bp-fields-intro { margin-top: 6px; color: var(--mute); font-size: 0.95rem; }
.bp-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.bp-tile { display: grid; gap: 4px; padding: 14px 14px 12px; border-radius: 14px; border: 1px solid var(--hairline); background: var(--card); color: var(--ink); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.bp-tile:hover, .bp-tile:focus-visible { border-color: var(--pulse); transform: translateY(-1px); outline: none; }
.bp-tile-icon { font-size: 1.5rem; line-height: 1; }
.bp-tile-name { font-weight: 600; font-size: 0.95rem; line-height: 1.25; }
.bp-tile-count { color: var(--mute); font-size: 0.8rem; }

/* v6.1: slim sticky find bar under the site header */
.bp-bar { position: sticky; top: 68px; z-index: 30; background: rgba(18,18,20,0.94); backdrop-filter: blur(12px); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.bp-bar-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.bp-field-pick select { appearance: none; -webkit-appearance: none; padding: 9px 34px 9px 14px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--ink); font: inherit; font-size: 0.9rem; cursor: pointer;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ff6308' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 13px center; }
.bp-bar .bp-search { flex: 1; min-width: 0; }
.bp-bar .bp-search input { padding: 9px 16px; font-size: 0.92rem; }
.bp-bar-links { display: flex; align-items: center; gap: 14px; flex: none; }
.bp-found { color: var(--spark); font-size: 0.84rem; }
.bp-found:empty { display: none; }
.bp-barlink { background: none; border: 0; padding: 0; color: var(--body); font: inherit; font-size: 0.84rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.bp-barlink:hover { color: var(--ink); }
.bp-chip { cursor: pointer; font: inherit; font-size: 0.8rem; }
.bp-chip-all { border-color: var(--pulse); color: var(--ink); }

@media (max-width: 1000px) { .bp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .bp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bp-tile { padding: 12px; }
  .bp-bar-row { flex-wrap: wrap; gap: 6px 8px; padding: 7px 0; }
  .bp-field-pick { flex: 0 0 42%; }
  .bp-field-pick select { width: 100%; font-size: 0.86rem; padding-left: 12px; }
  .bp-bar .bp-search { flex: 1 1 50%; }
  .bp-bar-links { width: 100%; justify-content: flex-end; gap: 14px; }
  .bp-barlink, .bp-found { font-size: 0.78rem; }
  .bp-card, .bp-subsec, .bp-section, .bp-fields { scroll-margin-top: 175px; }
}


/* v8: quieter, resource-style page. One accent (the orange pulse), fewer borders and pills, more space. */
.bp-hero { padding: 44px 0 26px; }
.bp-hero-row { grid-template-columns: minmax(0, 1fr) 240px; gap: 48px; }
.bp-hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); max-width: 26ch; line-height: 1.15; }
.bp-hero h1 em { color: var(--pulse); }
.bp-lead { margin-top: 12px; font-size: 1rem; }
.bp-updated { margin-top: 8px; font-size: 0.8rem; }
.bp-hero-video { max-width: 240px; }
.bp-video-cap { font-size: 0.78rem; }
.bp-bar { border: 0; background: rgba(10,10,10,0.92); }
.bp-bar-row { padding: 10px 0; }
.bp-bar .bp-search input { padding: 11px 18px; font-size: 0.98rem; }
.bp-fields { border-top: 0; padding: 22px 0 8px; }
.bp-fields-title { font-size: 0.95rem; font-weight: 500; color: var(--mute); }
.bp-tiles { margin-top: 12px; gap: 12px; }
.bp-tile { border-color: transparent; background: rgba(255,255,255,0.04); padding: 16px; }
.bp-tile:hover, .bp-tile:focus-visible { border-color: transparent; background: rgba(255,99,8,0.12); }
.bp-tile-name { font-weight: 500; }
.bp-layout { padding: 36px 0 40px; gap: 56px; grid-template-columns: minmax(0, 1fr) 240px; }
.bp-section { margin-bottom: 36px; }
.bp-section h2 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 500; }
.bp-section-intro, .bp-subintro { color: var(--mute); font-size: 0.9rem; margin-top: 6px; }
.bp-count { opacity: 1; color: var(--mute); font-weight: 400; font-size: 0.8rem; margin-left: 6px; }
.bp-section.bp-acc > .bp-acc-head { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.bp-section.bp-acc-closed { margin-bottom: 0; }
.bp-acc-icon { border: 0; width: 22px; height: 22px; }
.bp-subnav { gap: 4px 16px; margin-top: 12px; }
.bp-chip, .bp-chip.is-active { border: 0; background: none; padding: 2px 0; color: var(--mute); font-size: 0.84rem; border-radius: 0; }
.bp-chip:hover, .bp-chip.is-active { color: var(--ink); background: none; }
.bp-chip .bp-count { display: none; }
.bp-subhead { font-family: inherit; text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--ink); border-bottom: 0; padding-bottom: 4px; }
.bp-subsec { margin-top: 18px; }
.bp-cards { gap: 6px; margin-top: 10px; }
.bp-card { border: 0; border-radius: 10px; background: rgba(255,255,255,0.03); }
.bp-card[open] { border: 0; background: rgba(255,255,255,0.05); }
.bp-card summary { padding: 13px 16px; }
.bp-sum { gap: 2px; }
.bp-meta { font-size: 0.72rem; color: var(--mute); }
.bp-title { font-size: 1rem; }
.bp-problem { color: var(--mute); font-size: 0.88rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.bp-card[open] > summary .bp-problem { -webkit-line-clamp: unset; display: block; }
.bp-rank { width: 26px; height: 26px; background: none; color: var(--mute); font-size: 0.8rem; }
.bp-body { border-top: 0; padding: 0 16px 16px; }
.bp-body > *:first-child { margin-top: 4px; }
.bp-prompt { border: 0; background: #0b0b0d; }
.bp-copy { border: 0; background: none; color: var(--pulse); padding: 4px 0; }
.bp-copy.is-done { background: none; color: var(--pulse); }
.bp-actions { border-top: 0; padding-top: 4px; gap: 18px; }
.bp-vote, .bp-suggest-btn:not(.btn), .bp-textbtn { border: 0; padding: 2px 0; background: none; border-radius: 0; font-size: 0.8rem; color: var(--mute); cursor: pointer; font-family: inherit; }
.bp-vote:hover, .bp-suggest-btn:not(.btn):hover, .bp-textbtn:hover { color: var(--ink); }
.bp-vote-count { background: none; padding: 0; min-width: 0; color: inherit; font-size: inherit; margin-left: 2px; }
.bp-vote.is-voted { color: var(--pulse); }
.bp-textbtn { font-size: inherit; text-decoration: underline; text-underline-offset: 3px; color: var(--body); }
.bp-community { border: 0; padding: 0; background: none; }
/* Real-Life Case Study: a compact card */
.bp-case { margin-bottom: 28px; }
.bp-alias { display: block; height: 0; overflow: hidden; }
.bp-flagship { background: rgba(255,255,255,0.03); margin-top: 0; }
.bp-flagship .bp-title { font-size: 1.05rem; }
.bp-case-label { font-size: 0.75rem; color: var(--pulse); font-weight: 500; }
.bp-more { margin-top: 6px; font-size: 0.84rem; color: var(--pulse); }
.bp-more::after { content: attr(data-closed) " \2192"; }
.bp-flagship[open] .bp-more::after { content: attr(data-opened); }
.bp-meta-line { font-size: 0.82rem; color: var(--mute) !important; }
.bp-evolution { border-left: 0; padding-left: 0; }
.bp-table th, .bp-table td { border-bottom-color: rgba(255,255,255,0.06); }
/* Lighter events sidebar */
.bp-side { gap: 26px; }
.bp-side-box { border: 0; background: none; padding: 0; }
.bp-side-title { font-size: 0.95rem; font-weight: 500; }
.bp-side .mono.bp-side-sub { margin-top: 10px; font-family: inherit; text-transform: none; letter-spacing: 0; font-size: 0.78rem; color: var(--mute); }
.bp-side-note { font-size: 0.76rem; }
.bp-events { gap: 9px; margin-top: 6px; }
.bp-events li { font-size: 0.84rem; }
.bp-events span { font-size: 0.75rem; }
/* Bottom: two quiet lines */
.bp-end { padding: 28px 0 4px; border-top: 1px solid rgba(255,255,255,0.06); }
.bp-end p { color: var(--mute); font-size: 0.9rem; }
.bp-quiet-link { padding: 8px 0 48px; color: var(--mute); font-size: 0.9rem; }
.bp-quiet-link a { color: var(--body); text-decoration: underline; text-underline-offset: 3px; }
.bp-quiet-link a:hover { color: var(--pulse); }
@media (max-width: 1000px) { .bp-layout { grid-template-columns: 1fr; } .bp-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .bp-hero-row { grid-template-columns: 1fr; gap: 14px; }
  .bp-hero-video { display: flex; align-items: center; gap: 12px; max-width: none; }
  .bp-hero-video .hv-frame { width: 132px; flex: none; }
  .bp-video-cap { margin: 0; }
  .bp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .bp-hero { padding: 24px 0 14px; }
  .bp-hero h1 { font-size: 1.55rem; }
  .bp-lead { font-size: 0.92rem; }
  .bp-updated { display: none; }
  .bp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bp-tile { padding: 11px 12px; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
  .bp-tile-icon { font-size: 1.15rem; grid-row: span 2; }
  .bp-fields { padding-top: 14px; }
}

/* v9: latest news, three quiet lines */
.bp-news { padding: 20px 0 0; }
.bp-news-title { font-size: 0.95rem; font-weight: 500; color: var(--mute); max-width: none; }
.bp-news-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.bp-news-list li { display: flex; gap: 12px; align-items: baseline; font-size: 0.9rem; line-height: 1.4; min-width: 0; }
.bp-news-list time { flex: none; width: 3.6em; color: var(--mute); font-size: 0.8rem; }
.bp-news-h { color: var(--body); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-news-list a { flex: none; color: var(--mute); font-size: 0.8rem; text-decoration: underline; text-underline-offset: 3px; }
.bp-news-list a:hover { color: var(--pulse); }
@media (max-width: 720px) {
  .bp-news { padding-top: 14px; }
  .bp-news-list li { flex-wrap: wrap; gap: 2px 10px; }
  .bp-news-h { order: 3; flex-basis: 100%; white-space: normal; }
}

/* v10: a small set of case study cards */
.bp-cases-title { font-size: 0.95rem !important; font-weight: 500; color: var(--mute); margin: 0 0 10px; }
.bp-case { display: grid; gap: 6px; }
.bp-case-card .bp-title { font-size: 1.05rem; }
.bp-quote { margin: 16px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--pulse); }
.bp-quote p { margin: 0 !important; color: var(--ink) !important; font-style: italic; }
.bp-quote footer { margin-top: 6px; color: var(--mute); font-size: 0.82rem; }
.bp-quote footer { padding: 0; border: 0; background: none; margin: 6px 0 0; }
.bp-case-card[open] .bp-more::after { content: attr(data-opened); }

/* v10.1: case studies as one row of small boxes; the open story shows below the row */
.bp-case-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 4px; }
.bp-case-tile { display: grid; gap: 4px; padding: 14px 14px 12px; border-radius: 10px; background: rgba(255,255,255,0.04); color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.bp-case-tile:hover, .bp-case-tile:focus-visible { background: rgba(255,99,8,0.10); outline: none; }
.bp-case-tile.is-open { border-color: var(--pulse); background: rgba(255,99,8,0.08); }
.bp-case-short { font-weight: 500; font-size: 0.98rem; line-height: 1.25; }
.bp-case-hook { color: var(--mute); font-size: 0.8rem; line-height: 1.35; }
.bp-js .bp-case > details.bp-card > summary { display: none; }
.bp-js .bp-case > details.bp-card:not([open]) { display: none; }
.bp-js .bp-case > details.bp-card[open] { margin-top: 6px; }
.bp-js .bp-case > details.bp-card > .bp-body { padding-top: 14px; }
@media (max-width: 720px) {
  .bp-case-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bp-case-tile { padding: 12px; }
}

/* v10.2: five case boxes in one row on desktop, 2 columns on mobile */
.bp-case-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .bp-case-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .bp-case-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
