/* Layer-2 per-cancer landscape overlay + FTS additions. Uses styles.css tokens. */

.deepdive-button { display:block; width:100%; margin:12px 0 4px; text-align:left; }

.l2-overlay { position:fixed; inset:0; z-index:60; display:none; }
.l2-overlay[aria-hidden="false"] { display:block; }
.l2-backdrop { position:absolute; inset:0; background:rgba(15,23,42,.42); backdrop-filter:blur(3px); }
.l2-panel {
  position:absolute; top:0; right:0; height:100%; width:min(760px, 94vw);
  background:var(--panel-solid); border-left:1px solid var(--stroke-strong);
  box-shadow:var(--shadow); overflow-y:auto; padding:22px 26px 60px;
  animation:l2in .22s ease;
}
@keyframes l2in { from { transform:translateX(24px); opacity:.4 } to { transform:none; opacity:1 } }

.l2-overlay .l2-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; position:sticky; top:0;
  background:linear-gradient(var(--panel-solid), var(--panel-solid) 78%, transparent); padding-bottom:10px; z-index:2; }
.l2-kicker { color:var(--muted); font-size:12px; letter-spacing:.08em; text-transform:uppercase; margin:0 0 4px; }
.l2-head h2 { font-family:var(--serif); font-size:20px; font-weight:700; margin:0; color:var(--ink); }
.l2-head h2 small { font-size:14px; color:var(--faint); font-family:var(--sans); font-weight:400; }
.l2-close { background:var(--panel-soft); border:1px solid var(--stroke); color:var(--ink-soft);
  border-radius:10px; padding:7px 12px; cursor:pointer; font-size:13px; white-space:nowrap; }
.l2-close:hover { border-color:var(--stroke-strong); }
.l2-badge { display:inline-block; margin-left:8px; padding:2px 9px; border-radius:999px; font-size:11px;
  background:var(--accent-soft); color:var(--accent); border:1px solid rgba(139,92,246,.3); vertical-align:middle; }

.l2-banner { margin:0 0 18px; padding:1px 0 1px 13px; border-radius:0; font-size:12px; line-height:1.65;
  color:var(--muted); background:transparent; border:0; border-left:2px solid rgba(139,92,246,.58); }

.patient-context { display:grid; grid-template-columns:minmax(190px, .72fr) minmax(0, 1.8fr); column-gap:28px;
  margin:0 0 14px; padding:14px 0; border:0; border-top:1px solid var(--stroke); border-bottom:1px solid var(--stroke);
  border-radius:0; background:transparent; color:var(--ink-soft); }
.patient-context h3 { grid-column:1; margin:0 0 4px; color:var(--ink); font-size:13.5px; }
.patient-context p { grid-column:1; margin:0; color:var(--muted); font-size:12px; line-height:1.55; }
.patient-context ul { grid-column:2; grid-row:1 / span 2; align-self:center; display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 22px; list-style:none; margin:0; padding:0; }
.patient-context li { padding:2px 0; border:0; border-radius:0; background:transparent; color:var(--ink-soft); font-size:12px; }

.l2-sublabel { color:var(--muted); font-size:12px; margin:14px 0 6px; }
.l2-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.l2-chip { background:var(--panel-soft); border:1px solid var(--stroke); color:var(--ink-soft);
  border-radius:999px; padding:5px 11px; font-size:12px; cursor:pointer; }
.l2-chip:hover { border-color:var(--accent); color:var(--ink); }

.l2-sections { margin-top:10px; }
.l2-section { border:1px solid var(--stroke); border-radius:12px; margin-bottom:10px; overflow:hidden; background:var(--panel-soft); }
.l2-section > summary { cursor:pointer; padding:12px 15px; font-weight:600; font-size:14px; color:var(--ink);
  display:list-item; list-style-position:inside; }
.l2-section > summary > * { margin-left:6px; }
.l2-section-body { padding:4px 15px 16px; font-size:13.5px; line-height:1.62; color:var(--ink-soft); }
.l2-section-body h4 { color:var(--ink); font-size:14px; margin:12px 0 4px; }
.l2-section-body p { margin:6px 0; }
.l2-section-body ul { margin:6px 0; padding-left:18px; }
.l2-section-body li { margin:3px 0; }
.l2-section-body a { color:var(--therapy); }

.l2-table-wrap { overflow-x:auto; margin:8px 0; border:1px solid var(--stroke); border-radius:8px; }
.l2-table { border-collapse:collapse; width:100%; font-size:12.5px; min-width:480px; }
.l2-table th, .l2-table td { border-bottom:1px solid var(--stroke); padding:7px 10px; text-align:left; vertical-align:top; }
.l2-table th { background:rgba(15,23,42,.03); color:var(--ink); font-weight:600; position:sticky; top:0; }
.l2-table td { color:var(--ink-soft); }
.l2-table a { color:var(--therapy); }

.l2-disclaimer { margin-top:16px; font-size:12px; color:var(--faint); line-height:1.55; }
.l2-loading { color:var(--muted); padding:40px 0; text-align:center; }
.l2-state { min-height:55dvh; display:grid; align-content:center; justify-items:center; gap:8px; text-align:center; }
.l2-state h2 { margin:0; color:var(--ink); font:700 18px/1.3 var(--serif); }
.l2-state p { max-width:42em; margin:0; color:var(--muted); font-size:13px; line-height:1.6; }
.l2-state-actions { display:flex; justify-content:center; gap:8px; margin-top:12px; }
.search-fts-state { cursor:default; }

/* FTS group inside the search results dropdown */
.search-fts-group { border-top:1px dashed var(--stroke); margin-top:4px; }
.search-fts-label { font-size:11px; color:var(--muted); padding:6px 12px 2px; letter-spacing:.05em; }

@media (max-width:640px) {
  .l2-panel { width:100vw; padding:18px 16px 50px; }
  .l2-head h2 { font-size:22px; }
}

/* ---- Evidence gate + progressive disclosure (delivery review fixes) ---- */
.unverified-banner { margin:10px 0; padding:9px 12px; border-radius:10px; font-size:12.5px; font-weight:600;
  color:var(--red); background:rgba(220,38,38,.07); border:1px solid rgba(220,38,38,.3); }

/* §A 标准治疗概览 — NCCN-anchored standard-of-care path (decision anchor, shown first). */
.stp-section { border-color:var(--stroke-strong); background:rgba(31,122,90,.05); }
.stp-section > summary { color:var(--ink); font-size:15px; }
.stp-anchor-tag { display:inline-block; margin-left:8px; font-size:11px; font-weight:600; color:#1f7a5a;
  border:1px solid rgba(31,122,90,.4); border-radius:999px; padding:1px 8px; }
.stp-oneliner { font-size:15px; line-height:1.7; color:var(--ink); margin:6px 0 12px; font-weight:500; }
.stp-review { display:grid; grid-template-columns:auto 1fr; gap:3px 10px; align-items:start; margin:6px 0 12px;
  padding:10px 12px; border:1px solid var(--stroke); border-radius:10px; font-size:12px; }
.stp-review strong { white-space:nowrap; }
.stp-review span { color:var(--ink-soft); line-height:1.5; }
.stp-review small { grid-column:2; color:var(--muted); line-height:1.45; }
.stp-review.review-pending { border-color:rgba(154,100,32,.38); background:rgba(154,100,32,.08); }
.stp-review.review-pending strong { color:#9a6420; }
.stp-review.review-changes { border-color:rgba(220,38,38,.32); background:rgba(220,38,38,.05); }
.stp-review.review-changes strong { color:var(--red); }
.stp-review.review-approved { border-color:rgba(31,122,90,.4); background:rgba(31,122,90,.08); }
.stp-review.review-approved strong { color:#1f7a5a; }
.stp-context-filter { display:block; min-width:0; margin:10px 0 12px; padding:12px 14px;
  border:1px solid var(--stroke); border-radius:10px; background:var(--panel-soft); }
.stp-context-filter legend { padding:0; color:var(--ink); font-size:12.5px; font-weight:650; }
.stp-context-help { margin:2px 0 10px; color:var(--muted); font-size:11.5px; line-height:1.5; }
.stp-context-options { display:flex; flex-wrap:wrap; gap:7px; }
.stp-context-option { min-height:34px; max-width:100%; padding:7px 11px; border:1px solid var(--stroke);
  border-radius:8px; background:rgba(248,250,252,.8); color:var(--ink-soft); font:12px/1.35 var(--sans);
  text-align:left; white-space:normal; cursor:pointer; transition:border-color .12s ease, background-color .12s ease, color .12s ease; }
.stp-context-option:hover { border-color:var(--stroke-strong); color:var(--ink); }
.stp-context-option.on { border-color:rgba(139,92,246,.5); background:var(--accent-soft); color:var(--ink); }
.stp-context-status { margin:9px 0 0; color:var(--faint); font-size:11px; line-height:1.45; }
.stp-source { font-size:11.5px; color:var(--faint); margin-top:12px; font-style:italic; }
.stp-musttest { margin:10px 0; padding:10px 12px; border:1px solid var(--stroke); border-radius:10px; background:var(--panel-soft); }
.stp-musttest h4, .stp-floor h4 { margin:0 0 6px; font-size:13px; color:var(--ink); }
.stp-musttest ul { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.stp-musttest li { font-size:13px; color:var(--ink-soft); }
.stp-why { color:var(--muted); font-size:12.5px; }
.stp-stages { display:grid; gap:12px; margin:6px 0; }
.stp-stage { border:1px solid var(--stroke); border-radius:11px; overflow:hidden; }
.stp-stage-head { background:rgba(15,23,42,.04); padding:8px 12px; font-weight:600; font-size:13.5px; color:var(--ink);
  display:flex; align-items:center; gap:10px; }
.stp-intent { font-size:11px; font-weight:600; color:var(--muted); border:1px solid var(--stroke-strong); border-radius:999px; padding:1px 8px; }
.stp-line { padding:9px 12px; border-top:1px solid var(--stroke); }
.stp-line:first-of-type { border-top:none; }
.stp-line-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.stp-line-label { font-weight:600; font-size:13px; color:var(--ink); }
.stp-regimen { font-size:13px; color:var(--ink-soft); margin-top:3px; }
.stp-note { font-size:12px; color:var(--muted); margin-top:2px; }
.stp-branches { list-style:none; margin:6px 0 0; padding:0; display:grid; gap:5px; }
.stp-branches li { font-size:12.5px; color:var(--ink-soft); padding-left:10px; border-left:2px solid var(--stroke-strong); }
.stp-if { color:var(--muted); }
.stp-arrow { color:var(--faint); }
.stp-then { color:var(--ink); }
.stp-cat { display:inline-block; font-size:10.5px; font-weight:600; border-radius:999px; padding:0 6px; border:1px solid transparent; white-space:nowrap; }
.stp-cat--one { color:#1f7a5a; background:rgba(31,122,90,.13); border-color:rgba(31,122,90,.35); }
.stp-cat--twoa { color:#315070; background:rgba(49,80,112,.13); border-color:rgba(49,80,112,.35); }
.stp-cat--twob { color:#9a6420; background:rgba(154,100,32,.13); border-color:rgba(154,100,32,.35); }
.stp-cat--three { color:var(--muted); background:var(--panel-soft); border-color:var(--stroke-strong); }
.stp-floor { margin-top:12px; padding:10px 12px; border:1px dashed var(--stroke-strong); border-radius:10px; }
.stp-floor p { margin:0; font-size:13px; line-height:1.65; color:var(--ink-soft); }
.stp-floor-plain > summary { cursor:pointer; color:var(--ink); font-size:13px; font-weight:600; }
.stp-floor-plain[open] > summary { margin-bottom:7px; }
.stp-plain-disclosure { margin:10px 0; padding:10px 12px; border:1px solid var(--stroke); border-radius:10px; background:var(--panel-soft); }
.stp-plain-disclosure > summary { cursor:pointer; color:var(--ink); font-size:13px; font-weight:600; }
.stp-plain-disclosure ul { list-style:none; margin:10px 0 0; padding:0; display:grid; gap:8px; }
.stp-plain-disclosure li { display:grid; gap:2px; }
.stp-plain-disclosure li span { color:var(--muted); font-size:12px; }
.stp-stage[hidden] { display:none !important; }
.stp-stage-plain > summary { cursor:pointer; }
.stp-stage-plain[open] > summary { border-bottom:1px solid var(--stroke); }
.stp-plain-lines { margin:0; padding:8px 12px 10px 34px; display:grid; gap:8px; }
.stp-plain-lines > li { color:var(--ink-soft); font-size:12.5px; }
.stp-plain-lines > li > strong, .stp-plain-lines > li > span { display:block; }
.stp-plain-lines > li > span { margin-top:2px; line-height:1.5; }
.stp-plain-lines ul { margin:5px 0 0; padding-left:17px; color:var(--muted); }

/* §B 标准之外的真选项 — hope-stratified graded options (from treatment_uses). */
.bo-wrap { display:grid; gap:16px; margin:6px 0 4px; }
.bo-filter { display:flex; flex-wrap:wrap; gap:7px; align-items:center; padding:2px 0 2px; }
.bo-filter-label { font-size:12.5px; color:var(--muted); margin-right:2px; }
.bo-fchip { background:var(--panel-soft); border:1px solid var(--stroke); color:var(--ink-soft); border-radius:999px; padding:4px 12px; font-size:12.5px; cursor:pointer; }
.bo-fchip:hover { border-color:var(--stroke-strong); color:var(--ink); }
.bo-fchip.on { background:var(--accent-soft); color:var(--accent); border-color:rgba(139,92,246,.4); font-weight:600; }
.bo-tier-title { margin:0 0 2px; font-size:14px; color:var(--ink); display:flex; align-items:center; gap:8px; }
.bo-tier-n { font-size:11px; color:var(--muted); border:1px solid var(--stroke-strong); border-radius:999px; padding:0 7px; font-weight:600; }
.bo-tier-lead { margin:0 0 9px; font-size:12.5px; color:var(--muted); line-height:1.55; }
.bo-tier-mode { border:1px solid var(--stroke); border-radius:11px; overflow:hidden; background:var(--panel-soft); }
.bo-tier-mode > summary { cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:11px 13px; color:var(--ink); font-size:13.5px; font-weight:600; }
.bo-tier-mode > .bo-tier-lead { padding:0 13px; margin-top:0; }
.bo-tier-mode > .bo-cards { padding:0 10px 10px; }
body[data-lang="pro"] .bo-tier-mode { border:0; border-radius:0; overflow:visible; background:transparent; }
body[data-lang="pro"] .bo-tier-mode > summary { padding:0 0 5px; list-style:none; pointer-events:none; }
body[data-lang="pro"] .bo-tier-mode > summary::-webkit-details-marker { display:none; }
body[data-lang="pro"] .bo-tier-mode > .bo-tier-lead { padding:0; }
body[data-lang="pro"] .bo-tier-mode > .bo-cards { padding:0; }
.bo-cards { display:grid; gap:9px; }
.bo-card { border:1px solid var(--stroke); border-radius:11px; padding:11px 13px; background:var(--panel-soft); }
.bo-head { display:flex; align-items:center; gap:9px; flex-wrap:wrap; justify-content:space-between; }
.bo-name { font-weight:600; font-size:14px; color:var(--ink); }
.bo-why { font-size:12.5px; color:var(--muted); margin-top:3px; }
.bo-note { font-size:12.5px; color:var(--ink-soft); margin-top:6px; line-height:1.55; }
.bo-ev { font-size:12.5px; color:var(--ink-soft); margin-top:6px; line-height:1.55; padding-left:9px; border-left:2px solid var(--stroke-strong); }
.bo-lim { font-size:11.5px; color:var(--faint); margin-top:3px; }
.bo-cn { margin-top:8px; display:flex; flex-wrap:wrap; gap:5px; align-items:center; }
.cn-label { font-size:11.5px; color:var(--muted); }
.cn-chip { font-size:11px; color:var(--ink-soft); background:rgba(15,23,42,.03); border:1px solid var(--stroke); border-radius:7px; padding:1px 7px; }
.cn-chip b { color:var(--muted); font-weight:600; }
.cn-unknown { color:var(--faint); }
.bo-src { margin-top:7px; font-size:11.5px; color:var(--muted); }
.bo-src a { color:var(--therapy); }
/* quiet tags — repeated down a tier (esp. flat pro lists) they should read as a calm column,
   not a loud color band; the tier heading + each card's note carry the full meaning */
.hope-badge { display:inline-block; font-size:10.5px; font-weight:550; border-radius:999px; padding:1px 8px; border:1px solid transparent; white-space:nowrap; }
.hope-mod { color:#9a6420; background:rgba(154,100,32,.07); border-color:rgba(154,100,32,.2); }
.hope-early { color:#315070; background:rgba(49,80,112,.07); border-color:rgba(49,80,112,.2); }
.hope-spec { color:var(--muted); background:rgba(100,116,139,.06); border-color:var(--stroke); }
.bo-excluded { border:1px dashed rgba(154,100,32,.38); border-radius:11px; padding:0 12px; background:rgba(154,100,32,.05); }
.bo-excluded > summary { cursor:pointer; padding:10px 0; color:#9a6420; font-size:12.5px; font-weight:600; }
.bo-excluded > summary span { margin-left:6px; color:var(--muted); }
.bo-excluded p { margin:0 0 9px; color:var(--muted); font-size:12px; line-height:1.55; }
.bo-excluded button { margin:0 0 11px; padding:6px 10px; border:1px solid var(--stroke-strong); border-radius:8px;
  background:var(--panel-soft); color:var(--ink-soft); font:12px var(--sans); cursor:pointer; }
.bo-excluded button:hover { border-color:var(--accent); color:var(--ink); }

/* Non-treatment bucket: mechanism-related, no per-cancer evidence (phantom-edge gate). */
.l2-gap { border-style:dashed; opacity:.9; background:transparent; }
.l2-gap > summary { color:var(--muted); font-weight:600; }
.l2-gap-tag { display:inline-block; font-size:11px; font-weight:600; color:var(--muted);
  border:1px solid var(--stroke-strong); border-radius:999px; padding:1px 7px; }
.inline-warn { color:var(--red); font-weight:600; font-size:12px; }
.row-warn { color:var(--red); margin-left:5px; font-weight:700; }

.role-badge { display:inline-block; padding:1px 7px; border-radius:999px; font-size:11px; border:1px solid transparent; }
.role-standard      { color:#1f7a5a; background:rgba(31,122,90,.13); border-color:rgba(31,122,90,.35); }
.role-agnostic      { color:#315070; background:rgba(49,80,112,.13); border-color:rgba(49,80,112,.35); }
.role-investigational { color:#9a6420; background:rgba(154,100,32,.13); border-color:rgba(154,100,32,.35); }
.role-theoretical   { color:#7c3aed; background:rgba(124,58,237,.13); border-color:rgba(124,58,237,.32); }
.role-negative      { color:#b91c1c; background:rgba(220,38,38,.07); border-color:rgba(220,38,38,.3); }
.role-selected      { color:#0f766e; background:rgba(15,118,110,.13); border-color:rgba(15,118,110,.35); }

.multi-mech { font-size:12px; color:var(--muted); margin:6px 0; }
.multi-mech code { background:var(--panel-soft); border:1px solid var(--stroke); border-radius:5px; padding:1px 5px; margin:0 2px; color:var(--ink-soft); }

.role-legend, .grp-roles { display:flex; flex-wrap:wrap; gap:5px; }
.role-legend { margin:8px 0; }
.role-dot { font-size:10.5px; padding:1px 6px; border-radius:999px; border:1px solid var(--stroke); }
.role-dot.role-standard { color:#1f7a5a; } .role-dot.role-agnostic { color:#315070; }
.role-dot.role-investigational { color:#9a6420; } .role-dot.role-theoretical { color:#7c3aed; }
.role-dot.role-negative { color:#b91c1c; } .role-dot.role-selected { color:#0f766e; }

.cancer-group-list { display:flex; flex-direction:column; gap:4px; max-height:none; }
.cancer-group { display:flex; align-items:center; gap:8px; width:100%; text-align:left; cursor:pointer;
  background:var(--panel-soft); border:1px solid var(--stroke); border-radius:9px; padding:8px 11px; color:var(--ink-soft); }
.cancer-group:hover { border-color:var(--stroke-strong); }
.cancer-group.on { border-color:var(--accent); background:var(--accent-soft); }
.cancer-group > strong { color:var(--ink); font-size:13px; flex:0 0 auto; }
.grp-count { font:600 11px var(--mono); color:var(--faint); }
.grp-roles { margin-left:auto; }
.story-drill { margin-top:8px; }
.story-drill .use-row strong { color:var(--ink); }
.evidence-boundaries { margin:14px 0 4px; padding:10px 11px; border:1px solid rgba(15,23,42,.14);
  border-radius:11px; background:#ffffff; }
.evidence-boundaries summary { color:var(--ink-soft); font-size:11px; font-weight:720; cursor:pointer; }
.evidence-boundaries > p { margin:9px 0; color:var(--muted); font-size:10px; line-height:1.55; }
.boundary-list { display:grid; gap:6px; }
.boundary-item { display:grid; gap:4px; padding:8px 9px; border:1px solid rgba(15,23,42,.1);
  border-radius:9px; background:rgba(248,250,252,.85); }
.boundary-item strong { color:var(--ink-soft); font-size:10.5px; line-height:1.4; }
.boundary-item span { color:var(--muted); font-size:9.5px; line-height:1.5; }

/* structured next-checks + axes (delivery review round 2) */
.next-checks { margin:6px 0 10px; padding-left:20px; font-size:13px; color:var(--ink-soft); }
.next-checks li { margin:4px 0; }

/* off_label role colour (was missing from ROLE_ORDER/legend) */
.role-off_label { color:#b45309; background:rgba(180,83,9,.13); border-color:rgba(180,83,9,.35); }
.role-dot.role-off_label { color:#b45309; }

/* ---- mobile hardening (≤640px): dock must not cover the passport; buttons visible ---- */
@media (max-width: 640px) {
  .topbar { z-index: 46; }
  .top-actions { z-index: 46 !important; }
  .search-wrap { z-index: 44; }
  /* mechanism dock: single horizontally-scrolling row, capped height, below the passport */
  .story-dock {
    max-height: 58px; overflow-x: auto; overflow-y: hidden; white-space: nowrap;
    display: flex; gap: 8px; z-index: 30 !important;
  }
  /* passport = bottom sheet pinned ABOVE the dock (dock is ~58px at bottom:8px) */
  .passport {
    position: fixed !important; left: 8px !important; right: 8px !important;
    top: auto !important; bottom: 74px !important; margin: 0 !important;
    width: auto !important; max-height: 46dvh; overflow-y: auto; z-index: 40;
  }
  .l2-panel { width: 100vw; }
  .l2-table { min-width: 0; }
  .next-checks { padding-left: 16px; }
  .cancer-group { flex-wrap: wrap; }
  .grp-roles { margin-left: 0; width: 100%; }
  .patient-context { grid-template-columns:1fr; gap:8px; }
  .patient-context h3, .patient-context p, .patient-context ul { grid-column:1; grid-row:auto; }
  .patient-context ul { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stp-review { grid-template-columns:1fr; }
  .stp-review small { grid-column:1; }
  .stp-context-option { flex:1 1 46%; }  /* 2-up on phones, not a full-width wall of ~18 rows */
  /* comfortable touch targets on phones */
  .bo-fchip { min-height:40px; padding:8px 14px; display:inline-flex; align-items:center; }
  .l2-chip { min-height:40px; display:inline-flex; align-items:center; }
}

/* Layer-2 full inventory */
.l2-inventory > summary { color:var(--accent); }
.inv-targeted { color:#b91c1c; font-size:11.5px; }
.inv-role { color:var(--muted); font-size:11.5px; }

/* ---- iteration 2: unified disclosure chevrons + interactive micro-states ----
   Every cancer-doc accordion gets the same quiet chevron at its right edge;
   it rotates 180° on [open]. Selectors are prefixed with `details` so they win
   over the base rules above (and over shell.css, which loads later). */
details.l2-section > summary,
details.stp-floor-plain > summary,
details.stp-plain-disclosure > summary,
details.stp-stage-plain > summary,
details.bo-tier-mode > summary,
details.bo-excluded > summary,
details.l2-more > summary,
details.evidence-boundaries > summary,
.evidence-boundaries > summary {
  list-style: none;
  position: relative;
}
details.l2-section > summary::-webkit-details-marker,
details.stp-floor-plain > summary::-webkit-details-marker,
details.stp-plain-disclosure > summary::-webkit-details-marker,
details.stp-stage-plain > summary::-webkit-details-marker,
details.bo-tier-mode > summary::-webkit-details-marker,
details.bo-excluded > summary::-webkit-details-marker,
details.l2-more > summary::-webkit-details-marker,
details.evidence-boundaries > summary::-webkit-details-marker,
.evidence-boundaries > summary::-webkit-details-marker { display: none; }

details.l2-section > summary::after,
details.stp-floor-plain > summary::after,
details.stp-plain-disclosure > summary::after,
details.stp-stage-plain > summary::after,
details.bo-tier-mode > summary::after,
details.bo-excluded > summary::after,
details.l2-more > summary::after,
details.evidence-boundaries > summary::after,
.evidence-boundaries > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 7px;
  height: 7px;
  margin-top: -5px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.18s var(--ease-out), border-color 0.15s ease;
  pointer-events: none;
}
details.l2-section > summary:hover::after,
details.stp-floor-plain > summary:hover::after,
details.stp-plain-disclosure > summary:hover::after,
details.stp-stage-plain > summary:hover::after,
details.bo-tier-mode > summary:hover::after,
details.bo-excluded > summary:hover::after,
details.l2-more > summary:hover::after,
details.evidence-boundaries > summary:hover::after,
.evidence-boundaries > summary:hover::after { border-color: var(--ink); }

details.l2-section[open] > summary::after,
details.stp-floor-plain[open] > summary::after,
details.stp-plain-disclosure[open] > summary::after,
details.stp-stage-plain[open] > summary::after,
details.bo-tier-mode[open] > summary::after,
details.bo-excluded[open] > summary::after,
details.l2-more[open] > summary::after,
details.evidence-boundaries[open] > summary::after,
.evidence-boundaries[open] > summary::after { transform: rotate(225deg); border-color: var(--ink-soft); }

/* room for the chevron (specificity tuned against the base rules + shell.css) */
details.l2-section > summary { padding-right: 34px; }
details.stp-stage-plain > summary.stp-stage-head { padding-right: 36px; }
#cancerMain details.stp-stage-plain > summary.stp-stage-head { padding-right: 36px; }
details.bo-tier-mode > summary { padding-right: 44px; }
details.stp-floor-plain > summary,
details.stp-plain-disclosure > summary { padding-right: 26px; }
details.stp-floor-plain > summary::after,
details.stp-plain-disclosure > summary::after { right: 2px; }
details.bo-excluded > summary { padding-right: 24px; }
details.bo-excluded > summary::after { right: 2px; }
details.l2-more > summary { padding-right: 34px; }
details.evidence-boundaries > summary { padding-right: 20px; }
details.evidence-boundaries > summary::after { right: 2px; }
#cancerMain .cancer-doc-flow > details.stp-section > summary { padding-right: 30px; }
#cancerMain .cancer-doc-flow > details.stp-section > summary::after { right: 2px; width: 9px; height: 9px; margin-top: -7px; }
#cancerMain details.l2-more > summary { padding-right: 26px; }
#cancerMain details.l2-more > summary::after { right: 2px; }
/* pro mode renders tiers as an always-open flat list — no affordance there */
body[data-lang="pro"] details.bo-tier-mode > summary::after { display: none; }

/* hover / active micro-states for cards, chips and rows */
.bo-card { transition: border-color 0.16s ease, background-color 0.16s ease; }
.bo-card:hover { border-color: var(--stroke-strong); background: #fbf9fe; }
.stp-stage { transition: border-color 0.16s ease; }
.stp-stage:hover { border-color: var(--stroke-strong); }
.bo-fchip, .l2-chip, .cancer-group {
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, transform 0.15s var(--ease-out);
}
.bo-fchip:active, .l2-chip:active { transform: scale(0.96); }
.stp-context-option:active { transform: scale(0.98); }
.cancer-group:active { transform: scale(0.99); }
.l2-table tr:hover td { background: rgba(139,92,246, 0.06); }
