/* Site-wide source markers (design/source-markers): extension of the shared marker component (marker.css / marker.js /
   _source_marker.html.j2 on feat/tesla-readability stay the source of truth and are not edited here). Loaded right after marker.css.
   Adds: note markers a.mk.mk-n (macro mk() in _mk.html.j2), numbered notes, note containers (.drc) and the note sheet #drw;
   Base look (superscript, 44px hit area, focus ring offset 1px, margin-inline 4px, hover in @media (hover:hover), forced-colors
   open state) comes from marker.css; here only what the sheet markers add: open state as outline (SPEC §4), notes, sheet, layout. */
.mk-a.mk-n[aria-expanded=true]{background:var(--inv-bg,var(--ink));color:var(--inv-fg,var(--bg));box-shadow:none;outline:2px solid var(--ink);outline-offset:1px;border-radius:2px;text-decoration:none}
.mk-a.mk-n[aria-expanded=true]:focus-visible{outline-color:var(--focus,var(--ink))}
@media print{.drc{display:block}.mk-n::after{display:none}#drw{display:none}}
/* header cells with a marker: content at the bottom, so the hit area is not clipped by the scroll container above */
thead th:has(.mk){vertical-align:bottom}
/* a marker followed by a link in the same line (footer): keep the next target out of the 44px hit area */
footer .mk-n{margin-inline-end:14px}
/* tables with markers: 44 px rows, so neighbouring hit areas never overlap (max one marker per cell) */
table:has(.mk) th,table:has(.mk) td{height:44px}
/* numbered notes below a block, and note containers (.drc: shown in the sheet with JS, visible without JS / in print) */
.notes{list-style:none;margin:10px 0 0;padding:8px 0 0;border-top:1px solid var(--rule);font-size:14px;line-height:1.45;color:var(--sec);max-width:66ch;text-wrap:pretty}
.notes li{margin:0 0 4px}.notes .nn{font-weight:600;color:var(--ink)}
.notes li:target,.drc:target{outline:2px solid var(--focus,var(--ink));outline-offset:2px}
.drc{display:none}
/* the note sheet */
#drw{position:fixed;left:0;right:0;bottom:0;z-index:50;background:var(--surface);color:var(--ink);border-top:2px solid var(--ink);box-shadow:var(--shadow);max-height:60vh;overflow:auto;margin:0;padding:18px max(20px,calc((100vw - 720px)/2)) 28px}
#drw[hidden]{display:none}
#drw .in{max-width:720px;margin:0 auto;font-size:14px;line-height:1.5;position:relative;padding-right:44px;text-wrap:pretty}
#drw .x{position:absolute;top:-12px;right:-6px;border:0;background:none;font:inherit;font-size:24px;line-height:1;color:var(--sec);cursor:pointer;min-width:44px;min-height:44px;padding:0}
#drw .x:focus-visible{outline:2px solid var(--focus,var(--ink));outline-offset:-2px}
@media (hover:hover){#drw .x:hover{color:var(--ink)}}
#drw .t{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--sec);font-weight:400;margin:0 0 8px}
#drw p,#drw ul{margin:0 0 8px}#drw a{color:var(--ink)}
@media (forced-colors:active){
  .mk{color:LinkText}
  .mk:focus-visible{outline-color:Highlight}
  #drw{border-top-color:CanvasText}
}
/* first line after a summary: keep the summary out of the marker's hit area */
details>summary+p:has(>.mk-n){padding-top:20px}
/* scroll containers whose header carries a marker: room above the header for the 44px hit area (overflow clips it) */
[role=region]:has(>table>thead .mk){padding-top:16px}
/* B6: formulas, XBRL concepts and accessions in a note stay in a separate muted source block */
#drw .src-blk,.drc .src-blk{margin:10px 0 0;padding:8px 0 0 18px;border-top:1px dashed var(--g5,var(--sec));font-size:12px;line-height:1.5;color:var(--sec)}#drw .src-blk a{color:var(--sec)}
