/* v77: body map, safety board, interaction web (supplement pages) and the Atlas body map page */
.bm, .bmx, .bmx-page { --bm-a: var(--g-A, var(--u-acc)); --bm-b: var(--g-B, var(--u-d2)); --bm-c: var(--g-C, var(--u-gold)); --bm-d: var(--g-D, var(--u-muted)); --bm-x: var(--g-X, var(--u-muted)); }
.bm { margin: 18px 0 22px; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px 34px; align-items: start; max-width: 980px; }
.bm-art { position: relative; min-width: 0; }
.bm-svg { display: block; width: 100%; height: auto; max-width: 340px; margin: 0 auto; overflow: visible; }
.bm-svg .base { fill: var(--u-surface-2, #E8EEF2); stroke: var(--u-ink, #0B1724); stroke-width: 2.6; stroke-linejoin: round; }
.bm-svg .ln { fill: none; stroke: var(--u-ink, #0B1724); stroke-width: 1.8; stroke-linecap: round; }
.bm-svg .rg > * { fill: var(--u-bg, #fff); stroke: var(--u-muted, #5A6B78); stroke-width: 1.5; stroke-opacity: .75; transition: opacity .15s, stroke-width .15s; }
.bm-svg .rg .ic, .bm-svg .rg .ic * { fill: none; stroke: var(--u-muted, #5A6B78); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bm-svg .rg .ic .dot { fill: var(--u-muted, #5A6B78); stroke: none; }
.bm-svg .rg .lb, .bm-svg .rg > text.lb { fill: var(--u-ink, #0B1724) !important; stroke: none !important; fill-opacity: 1 !important; font: 600 11.5px/1 var(--f-body, system-ui, sans-serif); text-anchor: middle; }
.bm-svg .rg.has { cursor: pointer; }
.bm-svg .rg.has > :not(.ic):not(.lb):not(.sq) { stroke: var(--u-ink, #0B1724); stroke-width: 2.2; stroke-opacity: 1; }
.bm-svg .rg.gA > :not(.ic):not(.lb):not(.sq) { fill: var(--bm-a); }
.bm-svg .rg.gB > :not(.ic):not(.lb):not(.sq) { fill: var(--bm-b); }
.bm-svg .rg.gC > :not(.ic):not(.lb):not(.sq) { fill: var(--bm-c); }
.bm-svg .rg.gD > :not(.ic):not(.lb):not(.sq) { fill: var(--bm-d); }
.bm-svg .rg.gX > :not(.ic):not(.lb):not(.sq) { fill: var(--u-bg, #fff); stroke: var(--bm-x); stroke-width: 2.6; stroke-dasharray: 4 3; }
.bm-svg .rg.has:is(.gA, .gB, .gC, .gD) .ic, .bm-svg .rg.has:is(.gA, .gB, .gC, .gD) .ic * { stroke: var(--u-on-fill, #00172C); }
.bm-svg .rg.has:is(.gA, .gB, .gC, .gD) .ic .dot { fill: var(--u-on-fill, #00172C); }
.bm-svg .rg.has.gX .ic, .bm-svg .rg.has.gX .ic * { stroke: var(--bm-x); }
.bm-svg .rg .sq { fill: none !important; stroke: var(--u-ink, #0B1724) !important; stroke-width: 1.6 !important; stroke-opacity: .8 !important; }
.bm-svg .rg:not(.has) .sq { stroke: var(--u-muted, #5A6B78) !important; stroke-opacity: .6 !important; }
.bm.sel .bm-svg .rg:not(.on) > :not(.lb) { opacity: .32; }
.bm-svg .rg.on > :not(.ic):not(.lb):not(.sq) { stroke-width: 3.6; }
.bm-svg .rg.has:hover > :not(.ic):not(.lb):not(.sq), .bm-svg .rg.has:focus-visible > :not(.ic):not(.lb):not(.sq) { stroke-width: 3.4; }
.bm-svg .rg:focus-visible { outline: none; }
.bm-svg .rg.has:focus-visible > :first-child { stroke: var(--u-acc, #00787A); }
.bm-side { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.bm-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.bm-head b { font-size: 1.15rem; }
.bm-head span { color: var(--u-muted, var(--muted)); font-size: .92rem; }
.bm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bm-list details { border: 1px solid var(--u-rule, var(--rule)); border-radius: 8px; background: var(--u-bg, var(--bg)); }
.bm-list details[open] { border-color: var(--u-ink-2, var(--u-ink)); box-shadow: 0 1px 0 var(--u-rule, var(--rule)); }
.bm-list summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; font-size: .97rem; }
.bm-list summary::-webkit-details-marker { display: none; }
.bm-list summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--u-muted, #5A6B78); border-bottom: 2px solid var(--u-muted, #5A6B78); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s; }
.bm-list details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.bm-list summary b { font-weight: 600; color: var(--u-ink, var(--ink)); }
.bm-list summary small { display: block; color: var(--u-muted, var(--muted)); font-size: .84rem; font-weight: 400; }
.bm-list summary .hb-grade { min-width: 1.9em; height: 1.9em; border-radius: 50%; }
.bm-list ul { list-style: none; margin: 0; padding: 2px 12px 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.bm-list ul li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: start; font-size: .94rem; line-height: 1.4; }
.bm-list ul li .hb-grade { margin-top: 1px; }
.bm-list ul a { color: var(--u-ink, var(--ink)); }
.bm-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--u-muted, var(--muted)); margin: 0; }
.bm-key span { display: inline-flex; align-items: center; gap: 5px; }
.bm-key .hb-grade { min-width: 1.6em; height: 1.6em; font-size: .78rem; }
.bm figcaption { grid-column: 1 / -1; font-size: .88rem; color: var(--u-muted, var(--muted)); max-width: 86ch; }
tr.v77-flash > * { animation: v77f 1.6s ease-out 1; }
@keyframes v77f { 0%, 40% { background: var(--u-acc-wash, #DDF4F2); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { tr.v77-flash > * { animation: none; background: var(--u-acc-wash, #DDF4F2); } .bm-svg .rg > * { transition: none; } }
@media (max-width: 760px) { .bm { grid-template-columns: minmax(0, 1fr); } .bm-svg { max-width: 300px; } }

/* hub shading by number of findings */
.bm-svg .rg.has.q1 > :not(.ic):not(.lb):not(.sq), .qk.q1 { fill: color-mix(in srgb, var(--u-acc, #00787A) 16%, var(--u-bg, #fff)); }
.bm-svg .rg.has.q2 > :not(.ic):not(.lb):not(.sq), .qk.q2 { fill: color-mix(in srgb, var(--u-acc, #00787A) 34%, var(--u-bg, #fff)); }
.bm-svg .rg.has.q3 > :not(.ic):not(.lb):not(.sq), .qk.q3 { fill: color-mix(in srgb, var(--u-acc, #00787A) 55%, var(--u-bg, #fff)); }
.bm-svg .rg.has.q4 > :not(.ic):not(.lb):not(.sq), .qk.q4 { fill: color-mix(in srgb, var(--u-acc, #00787A) 78%, var(--u-bg, #fff)); }
.bm-svg .rg.has.q5 > :not(.ic):not(.lb):not(.sq), .qk.q5 { fill: var(--u-acc, #00787A); }
.qk { stroke: var(--u-ink, #0B1724); stroke-width: 1.4; }
.bm-svg .rg.has:is(.q1, .q2, .q3) .ic, .bm-svg .rg.has:is(.q1, .q2, .q3) .ic * { stroke: var(--u-ink, #0B1724); }
.bm-svg .rg.has:is(.q1, .q2, .q3) .ic .dot { fill: var(--u-ink, #0B1724); }
.bm-svg .rg.has:is(.q4, .q5) .ic, .bm-svg .rg.has:is(.q4, .q5) .ic * { stroke: var(--u-on-fill, #00172C); }
.bm-svg .rg.has:is(.q4, .q5) .ic .dot { fill: var(--u-on-fill, #00172C); }
.bmx-page .bm-key { margin-top: 8px; justify-content: center; }

/* safety board */
.sb { list-style: none; margin: 10px 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 980px; }
.sb > li { min-width: 0; border: 1px solid var(--u-rule, var(--rule)); border-radius: 10px; background: var(--u-bg, var(--bg)); padding: 13px 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.sb .sb-h { display: flex; align-items: center; gap: 9px; font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--u-muted, var(--muted)); }
.sb .sb-h svg { width: 30px; height: 30px; flex: none; color: var(--u-ink, var(--ink)); }
.sb .sb-v { font-size: 1.22rem; font-weight: 650; line-height: 1.25; color: var(--u-ink, var(--ink)); }
.sb .sb-v.q { font-size: 1.02rem; font-weight: 500; }
.sb .sb-n { font-size: .88rem; line-height: 1.4; color: var(--u-ink-2, var(--ink-2)); margin: 0; max-width: none !important; }
.sb .sb-a { margin-top: auto; padding-top: 4px; font-size: .86rem; }
.sb-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; margin: 2px 0 0; }
.sb-scale i { font-style: normal; text-align: center; font-size: .82rem; font-weight: 700; padding: 5px 0; border-radius: 4px; background: var(--u-surface-2, #E8EEF2); color: var(--u-muted, var(--muted)); }
.sb-scale i.on { background: var(--u-ink, #0B1724); color: var(--u-bg, #fff); box-shadow: 0 0 0 2px var(--u-bg, #fff), 0 0 0 4px var(--u-ink, #0B1724); }
.sb-ends { display: flex; justify-content: space-between; gap: 8px; font-size: .76rem; color: var(--u-muted, var(--muted)); }
@media (max-width: 980px) { .sb { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .sb { grid-template-columns: minmax(0, 1fr); } }

/* interaction web */
.iw { margin: 12px 0 18px; max-width: 980px; }
.iw-stage { position: relative; aspect-ratio: 16 / 7.4; min-height: 220px; }
.iw-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.iw-lines line { stroke: var(--u-muted, #5A6B78); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.iw-lines line.on { stroke: var(--u-ink, #0B1724); stroke-dasharray: none; stroke-width: 2.6; }
.iw-pill { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; width: 170px; }
.iw-pill svg { width: 96px; height: 50px; }
.iw-pill b { font-size: .95rem; line-height: 1.2; color: var(--u-ink, var(--ink)); background: var(--u-bg, var(--bg)); padding: 0 4px; }
.iw-b { position: absolute; transform: translate(-50%, -50%); width: min(30%, 230px); font: inherit; font-size: .88rem; line-height: 1.3; text-align: left; color: var(--u-ink, var(--ink)); background: var(--u-bg, var(--bg)); border: 2px solid var(--u-ink-2, var(--u-ink, #0B1724)); border-radius: 22px; padding: 8px 12px 8px 10px; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; }
.iw-b i { font-style: normal; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--u-surface-2, #E8EEF2); font-size: .8rem; font-weight: 700; }
.iw-b[aria-pressed="true"] { background: var(--u-ink, #0B1724); color: var(--u-bg, #fff); border-color: var(--u-ink, #0B1724); }
.iw-b[aria-pressed="true"] i { background: var(--u-acc, #00787A); color: var(--u-on-fill, #00172C); }
.iw-b:focus-visible { outline: 3px solid var(--u-acc, #00787A); outline-offset: 2px; }
.iw-ro { border: 1px solid var(--u-rule, var(--rule)); border-left: 4px solid var(--u-acc, #00787A); border-radius: 6px; padding: 10px 14px; background: var(--u-bg, var(--bg)); font-size: .95rem; line-height: 1.45; min-height: 3.2em; }
.iw-ro b { display: block; margin-bottom: 2px; }
.iw figcaption { font-size: .86rem; color: var(--u-muted, var(--muted)); margin-top: 8px; }
.iw:not(.iw-js) .iw-ro { display: none; }
@media (max-width: 760px) {
  .iw-stage { aspect-ratio: auto !important; min-height: 0; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
  .iw-lines { display: none; }
  .iw-pill { position: static; transform: none; width: auto; flex-direction: row; justify-content: center; margin-bottom: 4px; }
  .iw-pill svg { width: 64px; height: 34px; }
  .iw-b { position: static; transform: none; width: auto; }
}

/* Atlas body map page */
.bmx .bm { max-width: none; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
.bmx .bm-svg { max-width: 400px; }
.bmx-panel { border: 1px solid var(--u-rule, var(--rule)); border-radius: 10px; background: var(--u-bg, var(--bg)); padding: 16px 18px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.bmx-panel h3 { margin: 0; font-size: 1.25rem; }
.bmx-panel .sub { margin: 0; color: var(--u-muted, var(--muted)); font-size: .92rem; }
.bmx-bar { display: flex; height: 26px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--u-bg, var(--bg)); }
.bmx-bar i { display: block; min-width: 3px; }
.bmx-bar .gA { background: var(--bm-a); } .bmx-bar .gB { background: var(--bm-b); } .bmx-bar .gC { background: var(--bm-c); } .bmx-bar .gD { background: var(--bm-d); }
.bmx-bar .gX { background: repeating-linear-gradient(135deg, var(--bm-x) 0 2px, transparent 2px 6px); box-shadow: inset 0 0 0 2px var(--bm-x); }
.bmx-cnt { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .86rem; color: var(--u-ink-2, var(--ink-2)); margin: 0; }
.bmx-cnt span { display: inline-flex; gap: 5px; align-items: center; }
.bmx-cnt .hb-grade { min-width: 1.6em; height: 1.6em; font-size: .78rem; }
.bmx-f { display: flex; flex-wrap: wrap; gap: 6px; }
.bmx-f button { font: inherit; font-size: .84rem; padding: 4px 10px; border-radius: 14px; border: 1px solid var(--u-rule, var(--rule)); background: var(--u-bg, var(--bg)); color: var(--u-ink, var(--ink)); cursor: pointer; }
.bmx-f button[aria-pressed="true"] { background: var(--u-ink, #0B1724); color: var(--u-bg, #fff); border-color: var(--u-ink, #0B1724); }
.bmx-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; max-height: 470px; overflow: auto; border-top: 1px solid var(--u-rule-2, var(--rule)); }
.bmx-rows li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--u-rule-2, var(--rule)); font-size: .93rem; line-height: 1.4; }
.bmx-rows li a { font-weight: 600; }
.bmx-rows li span { color: var(--u-ink-2, var(--ink-2)); }
.bmx-mx { border-collapse: separate; border-spacing: 3px; font-size: .9rem; width: 100%; }
.bmx-mx th { text-align: left; font-weight: 500; color: var(--u-ink-2, var(--ink-2)); padding: 4px 8px 4px 0; white-space: nowrap; }
.bmx-mx thead th { text-align: center; padding: 4px; }
.bmx-mx td { text-align: center; padding: 6px 4px; border-radius: 4px; font-variant-numeric: tabular-nums; min-width: 44px; }
.bmx-mx td.z { color: var(--u-muted, var(--muted)); }
.bmx-mx tr.tot th, .bmx-mx tr.tot td { font-weight: 700; }
.bmx-mx button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--u-rule, #C9D3DB); text-underline-offset: 3px; text-align: left; }
.bmx-stats { list-style: none; margin: 10px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bmx-stats li { border: 1px solid var(--u-rule, var(--rule)); border-radius: 10px; padding: 12px 14px; background: var(--u-bg, var(--bg)); }
.bmx-stats b { display: block; font-size: 2rem; font-weight: 300; letter-spacing: -.02em; line-height: 1.1; color: var(--u-ink, var(--ink)); }
.bmx-stats span { font-size: .88rem; color: var(--u-ink-2, var(--ink-2)); }
@media (max-width: 900px) { .bmx .bm { grid-template-columns: minmax(0, 1fr); } .bmx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
