/* VIZ lane (owner, Oct 6: "more visualizations like the chip board"): the HUD look of /sources' board for three more
   pictures, linked by their own templates so site.css stays untouched:
     .mmap    the model map on /drivers (web/templates/_modelmap.html, web/static/modelmap.js)
     .rg      the market right now, the regime board (web/templates/_regime.html, any page)
     .mm-sec  how a finding earns PROVEN, the method in one picture (web/templates/_method.html, /methodology and /lab)
   Tokens from site.css :root. Small print stays readable: nothing under 11px is spaced wider than .12em, and on a phone
   no text is under 11.5px (tests/test_ux_viz10.py checks the same on the pages it covers). Every motion rule sits behind
   prefers-reduced-motion: no-preference. */

/* ------------------------------------------------------------------------------------------------ the model map */
.mmap { position: relative; margin: 6px 0 22px; border: 1px solid var(--line2); border-radius: 16px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 58%, rgba(79,140,255,.08), rgba(79,140,255,0) 58%), linear-gradient(180deg, #0C0F14, #07080B); }
.mmap canvas { display: block; width: 100%; outline: none; touch-action: manipulation; }
.mmap canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); }
.mm-hud { position: absolute; z-index: 2; }
.mm-tl { top: 14px; left: 18px; pointer-events: none; max-width: 46%; }
.mm-tr { top: 14px; right: 18px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 46%; }
.mm-k { margin: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink3); }
.mm-big { margin: 2px 0 4px; font-size: 12.5px; color: var(--ink3); }
.mm-big b { font-size: 26px; font-weight: 600; color: var(--ink); letter-spacing: .01em; text-shadow: 0 0 18px rgba(79,140,255,.35); }
.mm-tot { margin: 0 0 3px; font-size: 11.5px; color: var(--ink3); }
.mm-tot b { color: var(--ink); font-weight: 600; }
.mm-pv b { color: var(--blue); }
.mm-live { margin: 0 0 3px; font-size: 11.5px; color: var(--gold); display: flex; align-items: center; gap: 7px; }
.mm-live b { font-weight: 600; }
.mm-date { margin: 0; font-size: 11px; color: var(--ink3); }
.mm-rule { margin: 0; max-width: 430px; font-size: 12px; line-height: 1.45; color: var(--ink3); text-align: right; pointer-events: none; }
.mm-led { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); flex: none; }
.mm-tog { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; padding: 2px; background: rgba(5,6,8,.7); }
.mm-tog button { font: inherit; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); background: none; border: 0;
  border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.mm-tog button[aria-pressed="true"] { color: var(--ink); background: var(--blue-dim); box-shadow: 0 0 14px rgba(79,140,255,.3); }
.mm-tog button:hover { color: var(--ink); }
.mm-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; font-size: 11px;
  color: var(--ink3); pointer-events: none; }
.mm-legend li { display: flex; align-items: center; gap: 6px; }
.mm-sw { display: inline-block; width: 18px; height: 2px; border-radius: 2px; flex: none; }
.mm-sw-p { background: var(--blue); box-shadow: 0 0 6px var(--blue); position: relative; }
.mm-sw-p::after { content: ""; position: absolute; right: 2px; top: -1.5px; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px var(--blue); }
.mm-sw-l { height: 1px; background: rgba(156,156,255,.45); }
.mm-sw-live { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--gold); box-shadow: 0 0 8px rgba(255,215,94,.6); }
.mm-capn { margin: 0; font-size: 11px; color: var(--ink3); text-align: right; pointer-events: none; }
.mm-capn:empty { display: none; }
.mm-card { position: absolute; z-index: 3; left: 50%; top: 170px; width: 344px; max-width: calc(100% - 32px); padding: 13px 15px;
  border: 1px solid var(--line2); border-radius: 12px; background: rgba(9,11,15,.95); backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.mm-c-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; }
.mm-c-h .ccbdg { text-decoration: none; }
.mm-c-t { font-size: 14.5px; line-height: 1.3; }
.mm-c-n { font-size: 12.5px; color: var(--ink3); }
.mm-c-av { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; font-size: 11px;
  font-weight: 700; border: 1px solid #1F2E36; flex: none; }
.mm-c-m { margin: 0 0 8px; font-size: 11.5px; color: var(--ink3); }
.mm-c-l { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 7px; font-size: 13px; line-height: 1.45; color: var(--ink2); }
.mm-c-l li { margin: 0; }
.mm-vd { display: inline-block; font-size: 11px; letter-spacing: .06em; padding: 0 5px; border-radius: 4px; border: 1px solid currentColor; line-height: 16px;
  vertical-align: 1px; }
.mm-vd-p { color: var(--blue); }
.mm-vd-l { color: var(--steel); border-color: var(--steel-dim); }
.mm-on { display: block; margin-top: 2px; font-size: 11.5px; color: var(--gold); }
.mm-c-go { font: inherit; font-size: 12px; font-weight: 700; color: var(--ink); background: none; border: 0; border-bottom: 1px dotted var(--ink3);
  padding: 0; cursor: pointer; }
.mm-c-go:hover { color: var(--blue); border-color: var(--blue); }
.mm-c-more { margin: 0 0 8px; font-size: 11.5px; color: var(--ink3); }
.mm-c-a { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 0; font-size: 12px; }
.mm-c-x { margin-left: auto; font: inherit; font-size: 11.5px; color: var(--ink3); background: none; border: 1px solid var(--line2); border-radius: 6px;
  padding: 2px 8px; cursor: pointer; }
.mm-c-x:hover { color: var(--ink); border-color: var(--ink3); }
.mm-hint { position: absolute; left: 18px; bottom: 12px; margin: 0; font-size: 11px; color: var(--ink3); z-index: 2; pointer-events: none; }
.mm-toast { position: absolute; left: 50%; top: 16px; transform: translate(-50%, 0); z-index: 4; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--blue-dim); background: rgba(9,11,15,.95); color: var(--ink); font-size: 11.5px; opacity: 0;
  max-width: 86%; text-align: center; pointer-events: none; }
.mm-toast.on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .mm-toast { transform: translate(-50%, -8px); transition: opacity .35s, transform .35s; }
  .mm-toast.on { transform: translate(-50%, 0); }
  .mm-led { animation: mm-blink 1.6s ease-in-out infinite; }
  .mm-sw-live { animation: mm-ring 1.6s ease-out infinite; }
}
@keyframes mm-blink { 50% { opacity: .35; } }
@keyframes mm-ring { 0% { box-shadow: 0 0 0 0 rgba(255,215,94,.6); } 100% { box-shadow: 0 0 0 6px rgba(255,215,94,0); } }
@media (max-width: 859px) {
  .mm-tl, .mm-tr { position: static; max-width: none; padding: 14px 16px 0; }
  .mm-tr { align-items: flex-start; padding-top: 10px; }
  .mm-legend { justify-content: flex-start; }
  .mm-capn, .mm-rule { text-align: left; }
  .mm-card { position: static; width: auto; max-width: none; margin: 0 12px 12px; }
  .mm-hint { position: static; padding: 0 16px 14px; }
}

/* ------------------------------------------------------------------------------------------------ the market right now */
.rg { position: relative; margin: 0 0 30px; padding: 16px 18px 18px; border: 1px solid var(--line2); border-radius: 16px;
  background: radial-gradient(ellipse at 20% 0%, rgba(79,140,255,.07), rgba(79,140,255,0) 55%), linear-gradient(180deg, #0C0F14, #08090C); }
.rg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 14px; }
.rg-head h2 { margin: 0; font-size: 20px; flex-basis: 100%; order: 2; }
.rg-k { order: 1; margin: 0; display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink3); }
.rg-asof { order: 3; margin: 0; font-size: 11.5px; color: var(--ink3); }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.rg-g { position: relative; margin: 0; padding: 11px 13px 10px; border: 1px solid #262D38; border-radius: 9px; background: #0E1217;
  display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rg-g.rg-hot { border-color: rgba(244,143,198,.45); box-shadow: inset 0 0 0 1px rgba(244,143,198,.12), 0 0 22px rgba(244,143,198,.06); }
.rg-g.rg-cold { border-color: rgba(95,211,232,.4); box-shadow: inset 0 0 0 1px rgba(95,211,232,.1), 0 0 22px rgba(95,211,232,.05); }
.rg-l { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #C9D0DA; }
.rg-l span { flex: 1; min-width: 0; }
.rg-key { border-style: dashed; background: transparent; }
.rg-keyl { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 7px; font-size: 12.5px; color: var(--ink2); }
.rg-keyl li { display: flex; align-items: center; gap: 9px; }
.rg-m-key { width: 64px; flex: none; height: 8px; }
.rg-led { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--blue); box-shadow: 0 0 7px var(--blue); }
.rg-led.hot { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.rg-led.cold { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.rg-v { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rg-v b { font-size: 25px; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.rg-hot .rg-v b { text-shadow: 0 0 16px rgba(244,143,198,.35); }
.rg-cold .rg-v b { text-shadow: 0 0 16px rgba(95,211,232,.35); }
.rg-u { font-size: 12.5px; color: var(--ink3); }
.rg-m, .rg-days { display: flex; gap: 3px; height: 9px; align-items: stretch; }
.rg-m i, .rg-days i { flex: 1; min-width: 0; border-radius: 1px; background: #1A2029; }
.rg-m i.on { background: rgba(79,140,255,.55); }
.rg-m i.now { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.rg-hot .rg-m i.on { background: rgba(244,143,198,.5); }
.rg-hot .rg-m i.now { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.rg-cold .rg-m i.now { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.rg-m i.mk { box-shadow: inset 0 -3px 0 var(--ink3); }
.rg-m i.mk.now { box-shadow: inset 0 -3px 0 var(--ink3), 0 0 8px var(--blue); }
.rg-days { gap: 2px; }
.rg-days i.etf_in, .rg-days i.etf_out, .rg-days i.both { background: var(--ocean); box-shadow: 0 0 7px rgba(91,184,242,.6); }
.rg-days i.etf_out { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ocean), 0 0 7px rgba(91,184,242,.35); }
.rg-w { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ink); }
.rg-s { margin: 0; font-size: 12px; line-height: 1.4; color: var(--ink3); }
.rg-f { margin: 2px 0 0; padding-top: 7px; border-top: 1px dashed #262D38; font-size: 12.5px; line-height: 1.45; color: var(--ink2); }
.rg-vd { display: inline-block; font-size: 11px; letter-spacing: .06em; padding: 0 5px; border-radius: 4px; border: 1px solid currentColor; line-height: 16px;
  vertical-align: 1px; }
.rg-vd-proven { color: var(--blue); }
.rg-vd-likely { color: var(--steel); border-color: var(--steel-dim); }
.rg-src { margin: auto 0 0; padding-top: 2px; font-size: 11px; color: var(--ink3); letter-spacing: .04em; }
.rg-src time, .rg-asof time, .mm-date time, .mm-fc time { font-size: inherit; }
@media (prefers-reduced-motion: no-preference) {
  .rg-k .rg-led { animation: mm-blink 1.8s ease-in-out infinite; }
  .rg-g.pp-pop .rg-m i.on, .rg-g.pp-pop .rg-days i[class] { animation: rg-lit .32s ease-out backwards; animation-delay: calc(var(--i, 0) * 28ms + .15s); }
  .rg-g .rg-m i.now { animation: rg-now 2.4s ease-in-out infinite; }
}
@keyframes rg-lit { from { opacity: 0; } }
@keyframes rg-now { 50% { filter: brightness(1.6); } }
@media (max-width: 600px) {
  .rg { padding: 14px 12px 14px; }
  .rg-grid { grid-template-columns: 1fr; gap: 8px; }
  .rg-g { padding: 9px 11px 8px; gap: 4px; }
  .rg-v b { font-size: 21px; }
  .rg-w, .rg-f { font-size: 12px; line-height: 1.4; }
  .rg-s { font-size: 11.5px; line-height: 1.35; }
  .rg-f { padding-top: 5px; }
  .rg-k, .rg-l, .rg-src, .rg-vd, .mm-k, .mm-date, .mm-legend, .mm-capn, .mm-tog button, .mm-hint, .mm-vd, .mm-c-av { font-size: 11.5px; }
  .rg-k, .rg-l, .mm-k { letter-spacing: .12em; }
}

/* ------------------------------------------------------------------------------------------------ the method in one picture */
.mm-sec { margin: 8px 0 34px; padding: 18px 18px 14px; border: 1px solid var(--line2); border-radius: 16px;
  background: radial-gradient(ellipse at 60% 70%, rgba(79,140,255,.07), rgba(79,140,255,0) 60%), linear-gradient(180deg, #0C0F14, #08090C); }
.mm-eb { margin: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink3); }
.mm-sec h2 { margin: 4px 0 12px; font-size: 20px; }
.mm-fig { margin: 0; }
.mm-svg { display: block; width: 100%; height: auto; overflow: visible; }
.mm-svg.mm-wide { max-width: 1060px; margin: 0 auto; }
.mm-svg.mm-tall { display: none; max-width: 420px; margin: 0 auto; }
.mm-box rect { fill: #0E1217; stroke: #2E3643; stroke-width: 1.2; }
.mm-box.mm-proven rect { fill: #0E1626; stroke: var(--blue); stroke-width: 1.8; filter: drop-shadow(0 0 10px rgba(79,140,255,.45)); }
.mm-box.mm-likely rect { fill: #0C0F14; stroke: var(--steel-dim); stroke-dasharray: 4 3; }
.mm-box.mm-retired rect { fill: #0C0F14; stroke: #3A4252; }
.mm-box.mm-only rect { stroke: var(--indigo-dim); stroke-dasharray: 5 3; }
.mm-box { cursor: default; }
.mm-box.mk-on { filter: none; }
.mm-box.mk-on rect { stroke: var(--blue); fill: #111A28; }
.mm-svg:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 8px; }
.mm-t { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; fill: #DDE2EA; }
.mm-tb { font-size: 17px; letter-spacing: .3em; }
.mm-proven .mm-t { fill: #FFFFFF; }
.mm-retired .mm-t { fill: #9AA2AF; }
.mm-likely .mm-t { fill: var(--steel); font-size: 12px; }
.mm-s { font-family: var(--sans); font-size: 11.5px; fill: #8E96A3; }
.mm-proven .mm-s { fill: #9DB7E8; }
.mm-n { font-family: var(--mono); font-size: 15px; font-weight: 700; fill: var(--ink); }
.mm-w { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; fill: #8E96A3; }
.mm-wire { fill: none; stroke: #2A3240; stroke-width: 2; }
.mm-flow { fill: none; stroke: var(--blue); stroke-width: 2; stroke-dasharray: 5 7; stroke-linecap: round; opacity: .9; }
.mm-head { fill: var(--blue); }
.mm-fc { margin: 12px 2px 0; display: grid; gap: 6px; font-size: 13px; line-height: 1.5; color: var(--ink2); }
.mm-fc-n { font-size: 12px; color: var(--ink3); }
@media (prefers-reduced-motion: no-preference) {
  .mm-flow { animation: mm-dash 1.4s linear infinite; }
}
@keyframes mm-dash { to { stroke-dashoffset: -24; } }
.mm-tall .mm-w { font-size: 11px; }
@media (max-width: 760px) {
  .mm-svg.mm-wide { display: none; }
  .mm-svg.mm-tall { display: block; }
  .mm-sec { padding: 14px 12px 12px; }
}
@media (max-width: 600px) {
  .mm-eb { font-size: 11.5px; letter-spacing: .12em; }
  .mm-fc-n { font-size: 12px; }
}
