/* Compound Explorer (v71) */
#cxp { --cxp-gap: 20px; --cxp-green: #2F7A35; }
:root[data-theme=dark] #cxp { --cxp-green: #74CF82; }
#cxp .page-hero { margin-bottom: 0; }
#cxp .cxp-sec:first-of-type { margin-top: 28px; }
#cxp .cxp-sec { margin: 40px 0 0; }
#cxp .cxp-sec > h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.2; margin: 0 0 8px; text-wrap: balance; }
#cxp .cxp-sec > p.cxp-intro { max-width: 70ch; color: var(--u-ink-2); margin: 0 0 18px; }
#cxp .kpis.cxp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
#cxp .cxp-kpis li { border-top: 2px solid var(--u-acc); padding: 10px 0 0; }
#cxp .cxp-kpis b { display: block; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
#cxp .cxp-kpis span { font-size: .9rem; color: var(--u-ink-2); }

/* controls */
#cxp .cxp-ctl { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 0 0 14px; }
#cxp .cxp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#cxp .cxp-chip { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: .88rem; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--u-rule); background: var(--u-bg); color: var(--u-ink); cursor: pointer; }
#cxp .cxp-chip span { color: var(--u-muted); font-variant-numeric: tabular-nums; }
#cxp .cxp-chip[aria-pressed="false"] { opacity: 1; background: transparent; color: var(--u-muted); border-style: dashed; }
#cxp .cxp-chip[aria-pressed="false"] .cxp-sw { background: transparent !important; outline: 1.5px solid var(--u-muted); }
#cxp .cxp-sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; margin-right: 6px; vertical-align: 0; }
#cxp .cxp-chip .cxp-sw { margin-right: 0; }
#cxp .cxp-seg { display: inline-flex; border: 1px solid var(--u-rule); border-radius: 8px; overflow: hidden; }
#cxp .cxp-seg label { position: relative; }
#cxp .cxp-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
#cxp .cxp-seg span { display: block; padding: 6px 12px; font-size: .88rem; color: var(--u-ink-2); }
#cxp .cxp-seg input:checked + span { background: var(--u-acc); color: var(--u-on-acc); }
#cxp .cxp-seg input:focus-visible + span { outline: 2px solid var(--u-acc); outline-offset: -3px; }
#cxp .cxp-search { display: flex; align-items: center; gap: 8px; }
#cxp .cxp-search input { font: inherit; font-size: .95rem; padding: 7px 11px; border: 1px solid var(--u-rule); border-radius: 8px; background: var(--u-bg); color: var(--u-ink); width: min(280px, 70vw); }

/* map */
#cxp figure.cxp-fig { margin: 0; }
#cxp .cxp-more { font: inherit; margin: 12px 0 0; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--u-acc); background: var(--u-bg); color: var(--u-acc-ink); font-weight: 600; cursor: pointer; }
#cxp .cxp-fig { border: 1px solid var(--u-rule); border-radius: 12px; background: var(--u-surface); padding: 14px 14px 6px; }
#cxp #cxp-map { width: 100%; min-height: 200px; }
#cxp .cxp-svg { display: block; width: 100%; height: auto; overflow: hidden; }
#cxp .cxp-band { fill: var(--u-bg); }
#cxp .cxp-band.b1 { fill: var(--u-surface-2); }
#cxp .cxp-band-l, #cxp .cxp-ax { font: 500 12px/1 'IBM Plex Mono', ui-monospace, monospace; fill: var(--u-muted); }
#cxp .cxp-ax-t { font-size: 13px; fill: var(--u-ink-2); }
#cxp .cxp-tick { stroke: var(--u-muted); }
#cxp .cxp-row-r { stroke: var(--u-rule-2); }
#cxp .cxp-row-l { font-size: 13.5px; font-weight: 600; }
#cxp .cxp-dot { stroke: var(--u-surface); stroke-width: 1.5; cursor: pointer; transition: r .12s; }
#cxp .cxp-dot:hover, #cxp .cxp-dot:focus-visible { stroke: var(--u-ink); stroke-width: 2; outline: none; }
#cxp .cxp-dot.sel { stroke: var(--u-ink); stroke-width: 2.5; }
#cxp .cxp-dot.off { opacity: .18; }
#cxp .cxp-dot-l { font-size: 12px; fill: var(--u-ink-2); paint-order: stroke; stroke: var(--u-surface); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.cxp-tip { position: absolute; z-index: 60; max-width: 300px; padding: 9px 11px; border-radius: 8px; background: var(--u-ink); color: var(--u-bg); font-size: .85rem; line-height: 1.35; box-shadow: 0 6px 22px rgba(0,0,0,.18); pointer-events: none; }
.cxp-tip b { display: block; font-size: .95rem; }
.cxp-tip span { display: block; }
.cxp-tip .cxp-tip-k { opacity: .8; margin-top: 3px; }

/* tier meter */
#cxp .cxp-tier { display: inline-flex; gap: 2px; vertical-align: -1px; }
#cxp .cxp-tier i { width: 5px; height: 12px; border-radius: 1px; background: var(--u-rule); }
#cxp .cxp-tier.big i { width: 8px; height: 22px; border-radius: 2px; }
#cxp .cxp-tier.t1 i:nth-child(-n+1), #cxp .cxp-tier.t2 i:nth-child(-n+2), #cxp .cxp-tier.t3 i:nth-child(-n+3),
#cxp .cxp-tier.t4 i:nth-child(-n+4), #cxp .cxp-tier.t5 i:nth-child(-n+5), #cxp .cxp-tier.t6 i:nth-child(-n+6) { background: var(--u-acc); }

/* grades and IARC chips */
#cxp .cxp-gr, #cxp .cxp-ig { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .3em; border-radius: 5px; font: 700 .8rem/1 'IBM Plex Mono', ui-monospace, monospace; }
#cxp .cxp-gr.gA { background: var(--u-acc); color: var(--u-on-acc); }
#cxp .cxp-gr.gB { background: var(--u-d2); color: var(--u-on-acc); }
#cxp .cxp-gr.gC { background: var(--u-d6); color: var(--u-on-acc); }
#cxp .cxp-gr.gD { background: var(--u-surface-2); color: var(--u-ink); border: 1px solid var(--u-rule); }
#cxp .cxp-gr.gX { background: var(--u-d4); color: var(--u-on-acc); }
#cxp .cxp-ig.g1 { background: var(--u-d4); color: var(--u-on-acc); }
#cxp .cxp-ig.g2A { background: var(--u-d6); color: var(--u-on-acc); }
#cxp .cxp-ig.g2B { background: var(--u-d5); color: var(--u-on-acc); }
#cxp .cxp-ig.g3 { background: var(--u-surface-2); color: var(--u-ink); border: 1px solid var(--u-rule); }
#cxp .cxp-na { color: var(--u-muted); font-size: .9em; }
#cxp .cxp-sub { display: block; color: var(--u-muted); font-size: .85rem; }
td .cxp-sub { display: inline; }

/* table */
#cxp .cxp-tbl-wrap { border: 1px solid var(--u-rule); border-radius: 12px; overflow: auto; max-height: 640px; background: var(--u-bg); }
#cxp table.cxp-tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
#cxp .cxp-tbl thead th { position: sticky; top: 0; z-index: 2; background: var(--u-surface-2); text-align: left; padding: 0; border-bottom: 1px solid var(--u-rule); }
#cxp .cxp-tbl thead button { all: unset; display: block; box-sizing: border-box; width: 100%; padding: 10px 12px; font-size: .82rem; font-weight: 600; color: var(--u-ink); cursor: pointer; }
#cxp .cxp-tbl thead button:focus-visible { outline: 2px solid var(--u-acc); outline-offset: -2px; }
#cxp .cxp-tbl thead th[aria-sort="ascending"] button::after { content: " ↑"; }
#cxp .cxp-tbl thead th[aria-sort="descending"] button::after { content: " ↓"; }
#cxp .cxp-tbl tbody tr { border-bottom: 1px solid var(--u-rule-2); cursor: pointer; }
#cxp .cxp-tbl tbody tr:hover { background: var(--u-surface); }
#cxp .cxp-tbl tbody tr.sel { background: var(--u-acc-wash); }
#cxp .cxp-tbl th[scope=row], #cxp .cxp-tbl td { padding: 9px 12px; vertical-align: middle; text-align: left; font-weight: 400; }
#cxp .cxp-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#cxp .cxp-open { all: unset; font-weight: 600; color: var(--u-acc-ink); cursor: pointer; }
#cxp .cxp-open:focus-visible { outline: 2px solid var(--u-acc); outline-offset: 2px; border-radius: 3px; }
#cxp .cxp-count { color: var(--u-muted); font-size: .9rem; margin: 8px 0 0; }

/* detail */
#cxp #cxp-detail { margin: 28px 0 0; scroll-margin-top: 90px; outline: none; }
#cxp .cxp-d-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-end; border-bottom: 2px solid var(--u-ink); padding: 0 0 14px; }
#cxp .cxp-d-head h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 4px 0 4px; line-height: 1.15; }
#cxp .cxp-d-k { margin: 0; color: var(--u-ink-2); font-size: .9rem; }
#cxp .cxp-d-link { margin: 0; }
#cxp .cxp-d-tier { display: flex; align-items: center; gap: 12px; }
#cxp .cxp-d-tier b { font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
#cxp .cxp-d-tier span:last-child { font-size: .85rem; color: var(--u-ink-2); line-height: 1.3; }
#cxp .cxp-d-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--cxp-gap); margin: 20px 0 0; }
#cxp .cxp-card { min-width: 0; border: 1px solid var(--u-rule); border-radius: 12px; padding: 16px 18px; background: var(--u-bg); }
#cxp .cxp-card.wide { grid-column: 1 / -1; }
#cxp .cxp-card h4 { margin: 0 0 12px; font-size: 1.05rem; }
#cxp .cxp-card h5 { margin: 14px 0 6px; font-size: .92rem; color: var(--u-ink-2); }
#cxp .cxp-note { font-size: .85rem; color: var(--u-muted); margin: 10px 0 0; line-height: 1.45; }
#cxp .cxp-na-p { color: var(--u-ink-2); }
#cxp .cxp-bars { display: grid; gap: 8px; }
#cxp .cxp-bar { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) 4.5em; gap: 10px; align-items: center; color: var(--u-ink); text-decoration: none; font-size: .9rem; }
#cxp .cxp-bar:hover .cxp-bar-l { text-decoration: underline; }
#cxp .cxp-bar-t { height: 12px; background: var(--u-surface-2); border-radius: 3px; overflow: hidden; }
#cxp .cxp-bar-t i { display: block; height: 100%; background: var(--u-acc); border-radius: 3px; }
#cxp .cxp-bar b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
#cxp .cxp-fnd, #cxp .cxp-iarc { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-height: 420px; overflow: auto; }
#cxp .cxp-fnd li, #cxp .cxp-iarc li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
#cxp .cxp-fnd p, #cxp .cxp-iarc p { margin: 4px 0 0; font-size: .9rem; color: var(--u-ink-2); }
#cxp .cxp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--u-ink-2); margin: 0 0 10px; }
#cxp .cxp-legend .lg { display: inline-block; width: 18px; height: 10px; margin-right: 6px; vertical-align: 0; border-radius: 2px; }
#cxp .lg.ok { background: var(--u-acc-wash); border: 1px solid var(--u-acc); }
#cxp .lg.ul { width: 3px; background: var(--u-d4); }
#cxp .lg.eu { width: 0; border-left: 3px dashed var(--u-d5); border-radius: 0; }
#cxp .lg.me { width: 3px; background: var(--u-ink); }
#cxp .cxp-calc { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; margin: 0 0 8px; }
#cxp .cxp-calc label { display: grid; gap: 5px; font-size: .85rem; font-weight: 600; color: var(--u-ink-2); }
#cxp .cxp-in { display: inline-flex; align-items: center; border: 1px solid var(--u-rule); border-radius: 8px; background: var(--u-bg); overflow: hidden; }
#cxp .cxp-in input { font: inherit; font-size: 1rem; width: 8em; padding: 7px 10px; border: 0; background: transparent; color: var(--u-ink); }
#cxp .cxp-in span { padding: 7px 10px; background: var(--u-surface-2); color: var(--u-ink-2); font-weight: 500; }
#cxp .cxp-calc select { font: inherit; font-size: .95rem; padding: 7px 10px; border: 1px solid var(--u-rule); border-radius: 8px; background: var(--u-bg); color: var(--u-ink); max-width: 100%; }
#cxp .cxp-verdict { margin: 6px 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--u-surface); border-left: 4px solid var(--u-acc); font-size: .95rem; }
#cxp .cxp-verdict.warn { border-left-color: var(--u-d4); background: var(--u-d4-wash); }
#cxp .cxp-verdict.muted { border-left-color: var(--u-rule); color: var(--u-ink-2); }
#cxp .cxp-verdict span { display: block; margin-top: 4px; font-size: .85rem; color: var(--u-ink-2); }
#cxp .cxp-win-wrap { overflow-x: auto; }
#cxp .cxp-win { display: block; max-width: none; height: auto; }
#cxp .cxp-grid { stroke: var(--u-rule-2); }
#cxp .cxp-wr-v { font: 600 12px/1 'IBM Plex Mono', ui-monospace, monospace; fill: var(--u-ink); paint-order: stroke; stroke: var(--u-bg); stroke-width: 3px; }
#cxp .cxp-wr-l { font-size: 12.5px; fill: var(--u-ink-2); }
#cxp .cxp-wr.cur .cxp-wr-l { fill: var(--u-ink); font-weight: 700; }
#cxp .cxp-wr-hit { fill: transparent; cursor: pointer; }
#cxp .cxp-wr.cur .cxp-wr-hit { fill: var(--u-surface); }
#cxp .cxp-wr-ok { fill: var(--u-acc-wash); stroke: var(--u-acc); stroke-width: 1; }
#cxp .cxp-wr-ok.open { stroke-dasharray: 3 3; }
#cxp .cxp-wr-over { fill: var(--u-d4-wash); }
#cxp .cxp-wr-to { fill: var(--u-acc); opacity: .35; }
#cxp .lg.rda { width: 3px; background: var(--u-acc); }
#cxp .lg.over { background: var(--u-d4-wash); border: 1px solid var(--u-d4); }
#cxp .cxp-scope { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: var(--u-gold-wash); color: var(--u-ink); font-size: .9rem; }
#cxp .cxp-meds dt { font-size: .95rem; }
#cxp .cxp-meds dd { font-size: .95rem; }
#cxp .cxp-wr-rda { stroke: var(--u-acc); stroke-width: 3; }
#cxp .cxp-wr-ul { stroke: var(--u-d4); stroke-width: 3; }
#cxp .cxp-wr-eu { stroke: var(--u-d5); stroke-width: 2.5; stroke-dasharray: 3 2; }
#cxp .cxp-wr-me { stroke: var(--u-ink); stroke-width: 2; }
#cxp .cxp-wr-mel { font-size: 12.5px; font-weight: 600; fill: var(--u-ink); }
#cxp .cxp-meds { margin: 0; display: grid; gap: 8px; }
#cxp .cxp-meds div { display: grid; grid-template-columns: minmax(10em, 16em) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--u-rule-2); }
#cxp .cxp-meds dt { font-weight: 600; }
#cxp .cxp-meds dd { margin: 0; color: var(--u-ink-2); }
#cxp .cxp-ul { margin: 0; padding-left: 1.2em; color: var(--u-ink-2); }
#cxp .cxp-ul li { margin: 4px 0; }
#cxp .cxp-meth { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
#cxp .cxp-meth > div { min-width: 0; }
#cxp .cxp-meth h3 { font-size: 1.02rem; margin: 0 0 6px; }
#cxp .cxp-meth p, #cxp .cxp-meth li { color: var(--u-ink-2); font-size: .94rem; }
#cxp .cxp-src { font-size: .88rem; color: var(--u-ink-2); padding-left: 1.2em; }
#cxp .cxp-src li { margin: 5px 0; }
#cxp .cxp-iarc-ctl { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
#cxp .cxp-iarc-ctl select { font: inherit; padding: 6px 10px; border: 1px solid var(--u-rule); border-radius: 8px; background: var(--u-bg); color: var(--u-ink); }
#cxp .cxp-glegend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; color: var(--u-ink-2); margin: 0 0 12px; }
#cxp-err { color: var(--u-d4-ink); }

@media (max-width: 900px) {
  #cxp .cxp-d-grid, #cxp .cxp-meth { grid-template-columns: minmax(0, 1fr); }
  #cxp .kpis.cxp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  #cxp .cxp-fig { padding: 10px 6px 4px; }
  #cxp .cxp-tbl-wrap { max-height: none; border: 0; background: transparent; overflow: visible; }
  #cxp table.cxp-tbl, #cxp .cxp-tbl tbody { display: block; }
  #cxp .cxp-tbl thead { display: block; position: sticky; top: 0; z-index: 3; overflow-x: auto; max-width: 100%; background: var(--u-surface-2); border-radius: 8px; }
  #cxp .cxp-tbl thead tr { display: flex; width: max-content; }
  #cxp .cxp-tbl thead th { position: static; flex: none; border: 0; }
  #cxp .cxp-tbl thead button { padding: 8px 10px; white-space: nowrap; }
  #cxp .cxp-tbl tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 12px; margin: 10px 0 0; border: 1px solid var(--u-rule); border-radius: 10px; background: var(--u-bg); }
  #cxp .cxp-tbl tbody tr > * { padding: 0; text-align: left !important; }
  #cxp .cxp-tbl tbody tr > :first-child { grid-column: 1 / -1; font-size: 1.05rem; }
  #cxp .cxp-tbl td.num { white-space: normal; overflow-wrap: anywhere; }
  #cxp .cxp-tbl td[data-l]::before { content: attr(data-l); display: block; font-size: .72rem; color: var(--u-muted); text-transform: uppercase; letter-spacing: .04em; }
  #cxp .cxp-meds div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  #cxp .cxp-bar { grid-template-columns: 8em minmax(0, 1fr) 3.8em; }
}
