/* Hero "floating window": a cropped replica of the SDDP 19 interface, right-aligned in the hero and
   animated by js/hero-app.js. All classes are prefixed ha- so nothing collides with the page styles.
   The window is drawn at the application's size (1180 x 640) and scaled by --ha-scale. */

.hero-app {
  position: absolute;
  top: 49%;
  left: var(--ha-left, 60%);
  width: 1180px;
  height: 640px;
  display: none;
  transform-origin: 0 50%;
  transform: translateY(-50%) scale(var(--ha-scale, 1));
  pointer-events: none;
  z-index: 1;
}

.hero.has-app .hero-app {
  display: block;
}

/* the chain drawing sits where the window goes */
.hero.has-app .hero-art .chain-path {
  display: none;
}

.ha-float {
  position: relative;
  width: 100%;
  height: 100%;
  animation: ha-float 7s ease-in-out infinite;
}

@keyframes ha-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- desktop icon ---------- */
.ha-desk { position: absolute; left: 26px; top: 46px; width: 84px; text-align: center; font: 12px/1.2 "Segoe UI", system-ui, sans-serif; }
.ha-deskimg { position: relative; display: inline-block; width: 64px; height: 64px; }
.ha-deskimg img { display: block; width: 64px; height: 64px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); }
.ha-deskimg i { position: absolute; left: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); font: 700 13px/18px "Segoe UI", sans-serif; color: #1f5bbf; font-style: normal; }
.ha-deskimg i::before { content: "\2197"; }
.ha-desklabel { display: block; margin-top: 5px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 5px rgba(0, 0, 0, 0.6); }

.ha-win {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: #f3f3f3;
  box-shadow: 0 40px 90px rgba(2, 12, 24, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.14);
  font: 12px/1.3 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: #1f1f1f;
  text-align: left;
  letter-spacing: 0;
  user-select: none;
  transform-origin: 68px 92px;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease-out;
}
.ha-win.closed { opacity: 0; transform: scale(0.3); transition: transform 0.3s ease-in, opacity 0.25s ease-in; }

.ha-win b { font-weight: 700; }
.ha-ic { width: 16px; height: 16px; display: inline-block; vertical-align: middle; flex: none; object-fit: contain; }
.ha-ic.s14 { width: 14px; height: 14px; }
.ha-chv { width: 10px; height: 10px; color: #777; display: inline-block; vertical-align: middle; flex: none; }
.ha-chv.up { transform: rotate(180deg); }
.ha-chv.right { transform: rotate(-90deg); }
.ha-chv.pin { width: 12px; height: 12px; transform: rotate(35deg); }
.ha-caret { display: inline-flex; align-items: center; }
.ha-caret .ha-chv { width: 9px; height: 9px; }
.dis { opacity: 0.42; }
.ha-cb { width: 13px; height: 13px; border-radius: 2px; background: #2f6fd3; position: relative; flex: none; display: inline-block; }
.ha-cb::after { content: ""; position: absolute; left: 4px; top: 1px; width: 3px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ha-cb.off { background: #fff; border: 1px solid #8a8a8a; }
.ha-cb.off::after { display: none; }
.ha-cb.tri::after { left: 3px; top: 5px; width: 7px; height: 2px; border: none; background: #fff; transform: none; }

/* ---------- title bar ---------- */
.ha-titlebar { height: 24px; flex: none; display: flex; align-items: center; position: relative; padding: 0 6px; }
.ha-qat { display: flex; align-items: center; gap: 7px; }
.ha-qat .ha-ic { width: 13px; height: 13px; }
.ha-title { position: absolute; left: 0; right: 0; text-align: center; font-size: 12px; color: #2a2a2a; }
.ha-winctl { margin-left: auto; display: flex; gap: 22px; padding-right: 6px; font-size: 13px; color: #333; position: relative; }

/* ---------- ribbon ---------- */
.ha-ribbon { flex: none; position: relative; z-index: 5; }
.ha-rtabs { display: flex; align-items: flex-end; height: 30px; padding: 0 6px; }
.ha-rtab { padding: 5px 8px; margin-right: 1px; color: #222; border-bottom: 2px solid transparent; white-space: nowrap; transition: color 0.15s; }
.ha-rtab.active { font-weight: 600; border-bottom-color: #2f6fd3; color: #111; }
.ha-rright { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 0 6px 6px 0; color: #333; }
.ha-switch { width: 30px; height: 16px; border-radius: 9px; background: #fff; border: 1px solid #9a9a9a; position: relative; display: inline-block; }
.ha-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 8px; height: 8px; border-radius: 50%; background: #333; }
.ha-switch.small { width: 28px; height: 15px; }
.ha-rpanel { display: none; background: #fff; border: 1px solid #e2e2e2; border-radius: 6px; margin: 0 6px 5px; height: 92px; position: relative; padding: 3px 2px 0; }
.ha-rpanel.active { display: flex; }
.ha-rgroup { display: flex; flex-direction: column; align-items: center; padding: 0 5px; border-right: 1px solid #e6e6e6; min-width: 50px; height: 86px; }
.ha-rgroup:last-of-type { border-right: none; }
.ha-ritems { display: flex; align-items: stretch; height: 70px; overflow: hidden; gap: 1px; }
.ha-rlabel { font-size: 10px; color: #6b6b6b; padding: 1px 0 2px; white-space: nowrap; margin-top: auto; }
.ha-rbtn { display: flex; flex-direction: column; align-items: center; min-width: 46px; height: 100%; padding: 6px 5px 1px; border: 1px solid transparent; border-radius: 4px; font-size: 11.5px; line-height: 1.1; text-align: center; color: #222; white-space: nowrap; }
.ha-rbtn .ha-ic { width: 24px; height: 24px; margin-bottom: 5px; }
.ha-rbtn .ha-caret { margin-top: 1px; }
.ha-rbtn .ha-caret .ha-chv { width: 8px; height: 8px; color: #555; }
/* Run button as PSRTableGenerator builds it: light surface #D7E7F7 / #A9C9E8, play path and 12px semibold
   label in #0F5BA7; on hover the surface turns #0F5BA7 and the content white */
.ha-rbtn.primary { align-self: center; justify-content: center; gap: 4px; min-width: 0; height: auto; padding: 6px 10px; background: #d7e7f7; border: 1px solid #a9c9e8; border-radius: 3px; color: #0f5ba7; font-size: 12px; font-weight: 600; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.ha-rbtn.primary::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='7 4.5 12 15'%3E%3Cpath d='M7 4.5L19 12L7 19.5Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='7 4.5 12 15'%3E%3Cpath d='M7 4.5L19 12L7 19.5Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.ha-rbtn.check span:first-of-type { font-size: 10.5px; }
.ha-rbtn.check .ha-sub { font-size: 9.5px; }
.ha-chv.inl { width: 8px; height: 8px; color: #555; margin-left: 1px; }
/* Map tab: the unit shown as a big blue "MW" and the Display check boxes */
.ha-mw { height: 24px; margin-bottom: 5px; font-size: 16px; font-weight: 700; line-height: 24px; color: #4788c7; }
.ha-checks { display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 0 10px 0 6px; font-size: 11.5px; color: #222; white-space: nowrap; }
.ha-check { display: flex; align-items: center; gap: 7px; }
.ha-rcustom.cpu { justify-content: flex-start; padding-top: 7px; }
.ha-rcustom.cpu .ha-spin { width: 58px; justify-content: space-between; margin-top: 7px; }
.ha-rbtn.primary.pressed { background: #0d4d8f; border-color: #0d4d8f; color: #fff; }
.ha-sub { font-size: 10px; color: #e07b00; margin-top: -1px; }
.ha-rcustom { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 4px 6px; height: 66px; }
.ha-rcustom > span { font-size: 11px; color: #333; }
.ha-rcustom .ha-spin { margin-top: 6px; }
.ha-rcustom.center { align-items: center; }
.ha-rcustom.center .ha-spin { margin-top: 0; }
.ha-rcustom.row { flex-direction: row; align-items: center; gap: 6px; }
.ha-spin { display: inline-flex; align-items: center; border: 1px solid #c9c9c9; border-radius: 3px; background: #fff; height: 22px; padding: 0 6px; gap: 6px; }
.ha-arrows { display: inline-flex; gap: 3px; align-items: center; }
.ha-arrows .ha-chv { width: 9px; height: 9px; }
.ha-combo { display: inline-flex; align-items: center; justify-content: space-between; border: 1px solid #c9c9c9; border-radius: 3px; background: #fff; padding: 2px 6px; height: 22px; gap: 10px; color: #333; }
.ha-rcollapse { position: absolute; right: 8px; bottom: 4px; }
.ha-modelcard { display: flex; align-items: center; gap: 7px; border: 1px solid #d4d4d4; border-radius: 4px; padding: 5px 8px 5px 5px; height: 44px; margin-top: 10px; background: #fff; min-width: 150px; }
.ha-modelcard .ha-ic { width: 26px; height: 26px; }
.ha-modelcard b { display: block; font-size: 11.5px; font-weight: 600; line-height: 1.2; }
.ha-modelcard small { color: #555; font-size: 9.5px; white-space: nowrap; }
.ha-modelcard .ha-caret { margin-left: auto; padding-left: 18px; }
.ha-gallery { display: flex; margin-top: 4px; }
.ha-gallery img { width: 168px; height: 56px; display: block; border: 1px solid #d9d9d9; }
.ha-garrows { display: flex; flex-direction: column; justify-content: space-around; height: 56px; margin-left: 4px; color: #777; font-size: 8px; border: 1px solid #ddd; padding: 0 3px; border-radius: 2px; }
.ha-kv { display: grid; grid-template-columns: auto auto; gap: 6px 8px; align-items: center; font-size: 12px; color: #333; margin-top: 6px; }
.ha-kv .lbl { text-align: right; }

/* ---------- workspace ---------- */
.ha-work { flex: 1; min-height: 0; position: relative; }
.ha-view { position: absolute; inset: 0; display: none; }
.ha-view.active { display: flex; }

.ha-nav { width: 243px; flex: none; display: flex; flex-direction: column; }
.ha-hamb { width: 16px; height: 16px; border-radius: 3px; background: #2f6fd3; margin: 6px 0 6px 6px; position: relative; }
.ha-hamb::before { content: ""; position: absolute; left: 3px; right: 3px; top: 4px; height: 2px; background: #fff; box-shadow: 0 3px 0 #fff, 0 6px 0 #fff; }
.ha-navrow { display: flex; align-items: center; gap: 8px; padding: 0 6px; height: 24px; color: #333; }
.ha-navrow .ha-ic { width: 13px; height: 13px; }
.ha-navrow .ha-combo { flex: 1; height: 20px; }
.ha-search { flex: 1; display: flex; align-items: center; border: 1px solid #c9c9c9; border-radius: 3px; background: #fff; padding: 0 6px; height: 20px; color: #777; font-style: italic; }
.ha-funnel { display: flex; align-items: center; gap: 2px; }
.ha-tree { flex: 1; overflow: hidden; margin-top: 4px; }
.ha-tnode { display: flex; align-items: center; height: 24px; padding-right: 8px; color: #222; position: relative; white-space: nowrap; }
.ha-tnode.sel { background: #e2e2e2; }
.ha-tnode.sel::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; background: #2f6fd3; }
.ha-tnode .ha-ic { width: 13px; height: 13px; margin-right: 7px; }
.ha-sp { width: 21px; flex: none; }
.ha-tnode .ha-chev { margin-left: auto; display: inline-flex; align-items: center; }
.ha-tnode .ha-chev .ha-chv { width: 9px; height: 9px; color: #8a8a8a; }

.ha-main { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; padding-right: 26px; }
.ha-vtabs { position: absolute; right: 0; top: 28px; width: 26px; display: flex; flex-direction: column; padding: 6px 2px; gap: 6px; }
.ha-vtabs.map { position: static; flex: none; }
.ha-vtab { writing-mode: vertical-rl; transform: rotate(180deg); border: 1px solid #dcdcdc; background: #fff; padding: 10px 3px; font-size: 11px; color: #333; border-radius: 0 3px 3px 0; }
.ha-crumbbar { height: 26px; flex: none; display: flex; align-items: center; padding: 0 10px 0 6px; gap: 4px; color: #222; white-space: nowrap; }
.ha-crumbbar .ha-ic { width: 13px; height: 13px; margin-right: 4px; }
.ha-crumb { padding: 0 4px; }
.ha-sep { color: #777; font-size: 11px; padding: 0 2px; }
.ha-count { margin-left: auto; color: #333; }
.ha-doc { display: flex; flex-direction: column; margin: 0 6px 6px; border: 1px solid #d6d6d6; border-radius: 6px; overflow: hidden; background: #fff; min-height: 0; }
.ha-doc.upper { flex: 1.05 1 0; flex-direction: row; }
.ha-doc.lower { flex: 1 1 0; }
.ha-upperinner { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ha-pnavpane { width: 390px; flex: none; border-right: 4px solid #f3f3f3; display: flex; flex-direction: column; overflow: hidden; }
.ha-pnbody { padding: 10px 6px; overflow: hidden; }
.ha-pn { display: flex; align-items: center; gap: 7px; height: 23px; padding-left: 36px; color: #222; white-space: nowrap; }
.ha-pn .ha-chv { margin-left: -22px; margin-right: 4px; }
.ha-pnchildren { position: relative; margin-left: 48px; }
.ha-pnchildren::before { content: ""; position: absolute; left: 0; top: 0; bottom: 11px; border-left: 1px solid #9a9a9a; }
.ha-pn.lvl2 { padding-left: 12px; position: relative; }
.ha-pn.lvl2::before { content: ""; position: absolute; left: 0; top: 11px; width: 10px; border-top: 1px solid #9a9a9a; }
.ha-splitter { height: 6px; flex: none; }
.ha-panehdr { height: 24px; flex: none; background: #1a7ad9; color: #fff; display: flex; align-items: center; padding: 0 8px; }
.ha-panehdr .ha-tools { margin-left: auto; display: flex; gap: 10px; font-size: 10px; opacity: 0.9; align-items: center; }
.ha-panehdr .ha-chv { color: #fff; }
.ha-panehdr.inactive { background: #f3f3f3; color: #222; border-bottom: 1px solid #dcdcdc; }
.ha-panehdr.inactive .ha-chv { color: #777; }
.ha-grouphint { height: 26px; flex: none; display: flex; align-items: center; padding: 0 8px; border-bottom: 1px solid #dcdcdc; color: #333; background: #fff; }
.ha-gridwrap { flex: 1; overflow: hidden; min-height: 0; }
table.ha-grid { border-collapse: separate; border-spacing: 0; white-space: nowrap; font-size: 12px; }
table.ha-grid th { background: #f6f6f6; border-right: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9; height: 25px; padding: 0 20px 0 6px; text-align: left; font-weight: 400; color: #333; position: relative; min-width: 60px; }
table.ha-grid th.g { text-align: center; font-weight: 700; color: #222; }
table.ha-grid th .ha-f { position: absolute; right: 4px; top: 6px; width: 10px; height: 10px; color: #8a8a8a; }
table.ha-grid th.spacer { min-width: 0; border-right: none; }
table.ha-grid td { border-right: 1px solid #e3e3e3; border-bottom: 1px solid #e3e3e3; height: 25px; padding: 0 6px; color: #222; }
table.ha-grid tr:nth-child(even) td { background: #ecf3fb; }
table.ha-grid tr.sel td { background: #d7d7d7; }
table.ha-grid th.frz, table.ha-grid td.frz { border-right: 3px solid #8fbbe9; }
table.ha-grid td.num { text-align: right; }
.ha-lowerhdr { height: 26px; flex: none; display: flex; align-items: stretch; padding: 0 2px; border-bottom: 1px solid #dcdcdc; background: #fff; overflow: hidden; }
.ha-lowerhdr .ha-ltab { flex: none; }
.ha-ltab { padding: 0 8px; display: flex; align-items: center; color: #222; border-bottom: 2px solid transparent; white-space: nowrap; }
.ha-ltab.active { border-bottom-color: #2f6fd3; }
.ha-warn { width: 11px; height: 11px; border-radius: 50%; background: #f5c542; color: #fff; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-right: 5px; }
.ha-pinr { margin-left: auto; color: #999; font-size: 9px; display: flex; align-items: center; padding-right: 6px; }

/* ---------- results view ---------- */
.ha-rleft { width: 243px; flex: none; border-right: 1px solid #e6e6e6; padding-top: 6px; }
.ha-rrow { display: flex; align-items: center; gap: 8px; height: 24px; padding: 0 10px; color: #222; position: relative; white-space: nowrap; }
.ha-rrow.child { padding-left: 34px; }
.ha-rrow.sel { background: #e2e2e2; }
.ha-rrow.sel::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; background: #2f6fd3; }
.ha-rrow .ha-ic { width: 13px; height: 13px; }
.ha-rrow .ha-chev { margin-left: auto; }
.ha-rrow .ha-chev .ha-chv { width: 9px; height: 9px; }
.ha-rdoc { flex: 1; display: flex; flex-direction: column; margin: 6px; min-width: 0; }
.ha-doctabs { height: 24px; flex: none; display: flex; align-items: flex-end; gap: 2px; }
.ha-doctab { padding: 4px 10px 3px; display: flex; align-items: center; gap: 8px; color: #222; border: 1px solid transparent; border-bottom: 2px solid transparent; white-space: nowrap; }
.ha-doctab.active { background: #fff; border-color: #dcdcdc; border-bottom-color: #2f6fd3; border-radius: 3px 3px 0 0; }
.ha-doctab .ha-ic { width: 13px; height: 13px; }
.ha-doctab.ha-rtab2 { display: none; }
.ha-doctab.ha-rtab2.on { display: flex; }
.ha-x { color: #777; font-size: 11px; }
.ha-rbody { flex: 1; position: relative; min-height: 0; overflow: hidden; }
.ha-rbody > [data-r] { position: absolute; inset: 0; display: none; }
.ha-rbody > [data-r].on { display: block; }
.ha-dashcard { background: #fff; border: 1px solid #d6d6d6; }
.ha-dashicons { position: absolute; right: 14px; top: 8px; display: flex; gap: 10px; }
.ha-dashicons .ha-chv { width: 13px; height: 13px; color: #555; }
.ha-dashinner { position: absolute; left: 28px; right: 28px; top: 28px; bottom: 140px; background: #fff; border: 1px solid #e1e1e1; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); display: flex; align-items: center; justify-content: center; font-weight: 600; color: #333; }

/* PSRIO dashboard page (as published by Plot) */
.ha-dashpage { display: flex; height: 100%; background: #f2f3f5; }
.ha-dside { width: 120px; flex: none; background: #fff; border-right: 1px solid #e3e3e3; padding: 8px 10px; }
.ha-dside.wide { width: 170px; }
.ha-dhamb { color: #555; font-size: 14px; display: block; margin: 0 0 10px 2px; }
.ha-dtab { display: flex; align-items: center; gap: 6px; background: #44546a; color: #fff; border-radius: 4px; padding: 7px 10px; font-weight: 600; font-size: 11.5px; }
.ha-dtab .ha-chv { color: #fff; width: 12px; height: 12px; }
.ha-dlogo img { height: 22px; width: auto; display: block; margin: 2px 0 14px; }
.ha-dsec { display: flex; align-items: center; gap: 7px; font-weight: 600; color: #333; padding: 7px 6px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.ha-dsec .ha-chv { width: 13px; height: 13px; color: #333; }
.ha-dsec.active { background: #e8edf3; color: #1f3b5a; }
.ha-dsub { padding: 4px 0 4px 30px; color: #555; font-size: 11.5px; }
.ha-dsub.sel { color: #1f3b5a; font-weight: 700; }
.ha-dmain { flex: 1; min-width: 0; padding: 12px 16px; }
.ha-dtool { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 11.5px; color: #222; max-width: 540px; }
.ha-dsearch { display: flex; align-items: center; gap: 6px; flex: 1; height: 26px; border: 1px solid #d0d5db; border-radius: 4px; background: #fff; padding: 0 8px; color: #888; }
.ha-dsearch .ha-chv { width: 12px; height: 12px; color: #2f6fd3; }
.ha-dinput { height: 26px; min-width: 92px; border: 1px solid #d0d5db; border-radius: 4px; background: #fff; padding: 0 8px; color: #888; display: inline-flex; align-items: center; }
.ha-dbtn { height: 26px; padding: 0 12px; border-radius: 4px; display: inline-flex; align-items: center; color: #fff; font-weight: 600; }
.ha-dbtn.navy { background: #1f3b5a; }
.ha-dbtn.grey { background: #6c757d; }
.ha-dbtn.dark { background: #2e3b4e; padding: 0 8px; }
.ha-dbtn.dark .ha-chv { color: #fff; width: 13px; height: 13px; }
.ha-dmain h1 { font-size: 22px; font-weight: 600; color: #1f3b5a; margin: 6px 0 12px; padding-bottom: 6px; border-bottom: 1px solid #d8dde3; max-width: 540px; }
.ha-card { position: relative; width: 540px; background: #fff; border: 1px solid #e3e3e3; border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); padding: 8px 0 2px; margin-bottom: 14px; }
.ha-card .ha-hc { display: block; }
.ha-cicons { position: absolute; right: 12px; top: 12px; display: flex; gap: 9px; }
.ha-cicons .ha-chv { width: 13px; height: 13px; color: #555; }
.ha-plotpage { height: 100%; padding: 14px 18px; background: #f3f3f3; }
.ha-plotpage .ha-card { width: 600px; }
.ha-hct { font-size: 12px; font-weight: 700; fill: #333; }
.ha-hax { font-size: 10.5px; fill: #666; }
.ha-hgrid { stroke: #e6e6e6; stroke-width: 1; }
.ha-hxaxis { stroke: #ccd6eb; stroke-width: 1; }
.ha-hleg { font-size: 10.5px; fill: #333; }
.ha-leg.off .ha-hleg { fill: #cccccc; }
.ha-leg.off circle { fill: #cccccc; }
.ha-leg.off line { stroke: #cccccc; }
.ha-s.hid { display: none; }
.ha-cols { transform: scaleY(0); transform-box: view-box; transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ha-hc.in .ha-cols { transform: scaleY(1); }
.ha-wipe { clip-path: inset(0 100% 0 0); transition: clip-path 1.2s ease-out; }
.ha-hc.in .ha-wipe { clip-path: inset(0 0 0 0); }
.ha-tip { position: absolute; display: none; background: #fff; border: 1px solid #666; border-radius: 4px; padding: 5px 8px; font-size: 10.5px; line-height: 1.4; color: #333; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); white-space: nowrap; z-index: 5; }
.ha-tip.on { display: block; }
.ha-tip .h { display: block; color: #666; font-size: 10px; margin-bottom: 1px; }
.ha-tip .r { display: block; }
.ha-tip .r i { font-style: normal; margin-right: 3px; }

/* ---------- map view (Energy Map) ---------- */
.ha-layers { width: 300px; flex: none; display: flex; flex-direction: column; background: #fff; border: 1px solid #cfcfcf; border-radius: 4px; margin: 6px 4px 6px 6px; min-height: 0; }
.ha-lhdr { height: 26px; flex: none; display: flex; align-items: center; padding: 0 8px; color: #222; }
.ha-lhdr .ha-tools { margin-left: auto; display: flex; gap: 8px; }
.ha-lsearch { display: flex; align-items: center; gap: 6px; margin: 2px 8px 6px; height: 22px; flex: none; border: 1px solid #c9c9c9; border-radius: 3px; padding: 0 6px; color: #777; font-style: italic; }
.ha-lsearch .ha-chv { color: #777; width: 12px; height: 12px; }
.ha-llist { flex: 1; min-height: 0; overflow: hidden; }
.ha-lrow { display: flex; align-items: center; height: 27px; padding: 0 10px; gap: 10px; color: #222; position: relative; white-space: nowrap; }
.ha-lrow.sel { background: #e2e2e2; }
.ha-lrow.sel::before { content: ""; position: absolute; left: 10px; top: 4px; bottom: 4px; width: 3px; background: #2f6fd3; }
.ha-lrow .ha-chev .ha-chv { width: 9px; height: 9px; color: #777; }
.ha-lconf { flex: none; height: 150px; padding: 8px 10px; }
.ha-lctitle { color: #333; border-bottom: 1px solid #e3e3e3; padding-bottom: 4px; margin-bottom: 6px; }
.ha-lcrow { display: flex; align-items: center; gap: 8px; height: 30px; color: #333; }
.ha-lcrow .ha-chv { width: 12px; height: 12px; color: #2f6fd3; }
.ha-mapwrap { flex: 1; display: flex; flex-direction: column; min-width: 0; margin: 6px 4px 6px 0; }
.ha-mapwrap .ha-doctabs { background: #f3f3f3; }
#ha-sldtab { display: none; }
#ha-sldtab.on { display: flex; }
.ha-canvas { flex: 1; position: relative; overflow: hidden; border: 1px solid #cfcfcf; background: #c9e1e3; min-height: 0; }
.ha-mapimg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s ease; }
/* the map is one capture moved by transforms: wheel ticks zoom it around the cursor, a drag pans it */
.ha-mapimg.full { opacity: 1; transition: opacity 0.35s ease, transform 0.38s cubic-bezier(0.2, 0.6, 0.3, 1); will-change: transform; }
.ha-mapimg.crisp { opacity: 0; transition: opacity 0.4s ease, transform 0.38s cubic-bezier(0.2, 0.6, 0.3, 1); will-change: transform; }
.ha-canvas.drag .ha-mapimg.full, .ha-canvas.drag .ha-mapimg.crisp { transition: opacity 0.35s ease, transform 1.1s cubic-bezier(0.25, 0.1, 0.25, 1); }
.ha-canvas.crisp .ha-mapimg.crisp { opacity: 1; }
.ha-mapimg.sld { object-fit: contain; background: #fff; }
.ha-canvas.sld .ha-mapimg.full, .ha-canvas.sld .ha-mapimg.crisp { opacity: 0; }
.ha-canvas.sld .ha-mapimg.sld { opacity: 1; }
.ha-respanel { position: absolute; left: 254px; top: 0; bottom: 0; width: 330px; background: #f3f3f3; border-left: 1px solid #cfcfcf; display: flex; flex-direction: column; transform: translateX(calc(100% + 30px)); transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ha-canvas.panel .ha-respanel { transform: none; }
.ha-canvas.sld .ha-respanel { display: none; }
.ha-rpsearch { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: #333; }
.ha-rpbox { flex: 1; height: 24px; background: #fff; border: 1px solid #e3e3e3; border-radius: 3px; }
.ha-rpbus { display: flex; align-items: center; gap: 8px; margin: 0 8px; padding: 6px 8px; background: #f0f0f0; border: 1px solid #e1e1e1; border-radius: 3px 3px 0 0; }
.ha-rpminus { color: #555; font-size: 10px; }
.ha-rpbus .ha-x { margin-left: auto; border: 1px solid #ccc; border-radius: 3px; padding: 0 4px; background: #fff; }
.ha-rptable { margin: 0 8px; width: calc(100% - 16px); border-collapse: collapse; background: #fff; font-size: 12px; border: 1px solid #e1e1e1; border-top: none; }
.ha-rptable th { text-align: left; padding: 6px 8px; border-bottom: 1px solid #e1e1e1; font-weight: 400; color: #333; }
.ha-rptable td { padding: 6px 8px; color: #222; }
.ha-rptable tr:nth-child(even) td { background: #ecf3fb; }
.ha-rptable .num { text-align: right; }
.ha-timeline { height: 30px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 12px; border: 1px solid #cfcfcf; background: #fff; margin-top: 6px; border-radius: 3px; }
.ha-tb { color: #333; font-size: 11px; }
.ha-slider { flex: 1; height: 2px; background: #c9c9c9; position: relative; }
.ha-slider i { position: absolute; left: 0; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: #2f6fd3; }

/* ---------- status bar ---------- */
.ha-status { height: 24px; flex: none; display: flex; align-items: center; padding: 0 10px; border-top: 1px solid #e3e3e3; gap: 6px; color: #222; white-space: nowrap; }
.ha-ext { display: none; align-items: center; gap: 8px; margin-left: 14px; color: #333; }
.ha-ext.on { display: inline-flex; }
.ha-ext .muted { color: #9a9a9a; }
.ha-ext .ha-spin { height: 20px; padding: 0 4px; }
.ha-ext .ha-combo { height: 20px; padding: 0 4px; gap: 4px; }
.ha-path { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ha-path .ha-ic { width: 14px; height: 14px; }
.ha-run { display: none; align-items: center; gap: 8px; margin-left: 18px; color: #333; }
.ha-run.on { display: inline-flex; }
.ha-progress { width: 120px; height: 6px; border-radius: 3px; background: #dcdcdc; overflow: hidden; }
.ha-progress i { display: block; height: 100%; width: 0; background: #2f6fd3; transition: width 1.6s ease-in-out; }
.ha-run.go .ha-progress i { width: 100%; }
.ha-run.done .ha-progress { display: none; }
.ha-run.done .ha-runtext { color: #1d7a3a; font-weight: 600; }

/* ---------- model dropdown ---------- */
.ha-popup { position: absolute; display: none; background: #fff; border: 1px solid #dadada; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14); z-index: 20; padding: 4px; min-width: 215px; }
.ha-popup.open { display: block; }
.ha-it { display: flex; align-items: center; gap: 9px; height: 43px; padding: 4px 10px 4px 8px; border-radius: 4px; color: #222; white-space: nowrap; }
.ha-it.hover { background: #f2f2f2; }
.ha-it .ha-ic { width: 20px; height: 20px; }
.ha-it b { display: block; font-size: 12px; font-weight: 600; line-height: 1.2; }
.ha-it small { display: block; font-size: 10.5px; color: #666; line-height: 1.1; }
.ha-active { display: none; margin-left: auto; padding-left: 14px; color: #2f6fd3; font-size: 11px; font-weight: 600; }
.ha-it.active .ha-active { display: inline; }

/* ---------- cursor ---------- */
.ha-cursor { position: absolute; left: 0; top: 0; z-index: 30; transform: translate(420px, 300px); transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)); }
.ha-cursor svg { display: block; position: absolute; left: -5px; top: -3px; transition: transform 0.1s; transform-origin: 5px 3px; }
.ha-cursor.down svg, .ha-cursor.held svg { transform: scale(0.88); }
.ha-ring { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: rgba(40, 70, 110, 0.35); opacity: 0; }
.ha-cursor.down .ha-ring { animation: ha-ring 0.32s ease-out; }
@keyframes ha-ring {
  0% { opacity: 0.7; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(1.3); }
}
/* hover feedback of the controls the cursor stops on */
.ha-rtab.hov { color: #2f6fd3; }
.ha-rbtn.hov { background: #f3f3f3; border-color: #e3e3e3; }
.ha-rbtn.primary.hov { background: #0f5ba7; border-color: #0d4d8f; color: #fff; }
.ha-modelcard.hov { border-color: #9a9a9a; }
.ha-it.hov { background: #f2f2f2; }
.ha-rrow.hov { background: #ececec; }
.ha-leg.hov .ha-hleg { fill: #000; }
.ha-desk.hov .ha-deskimg::after { content: ""; position: absolute; inset: -6px -10px -26px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); }

/* static frame: no cursor, no float, the window open with the model list */
@media (prefers-reduced-motion: reduce) {
  .ha-float { animation: none; }
  .ha-cursor, .ha-desk { display: none; }
  .ha-win.closed { opacity: 1; transform: none; }
}
