/* System health: service tiles with their 24 h uptime bars, the selected service's panel, the event list. */
.hl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: var(--pg-col); align-items: start; }
.hl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hl-card { display: flex; flex-direction: column; padding: 0; color: var(--fg-1); min-width: 0; }
.hl-card:hover { border-color: var(--border-control); }
.hl-card.sel { border-color: var(--fg-1); box-shadow: 0 0 0 1px var(--fg-1); }
.hl-card.sel[data-s="err"] { border-color: var(--critical-solid); box-shadow: 0 0 0 1px var(--critical-solid); }
.hl-card.sel[data-s="warn"] { border-color: var(--medium-fg); box-shadow: 0 0 0 1px var(--medium-fg); }
.hl-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; padding: 10px 12px 8px; border: 0; border-radius: inherit; background: none; text-align: start; font: inherit; color: inherit; cursor: pointer; }
.hl-pick:hover { background: var(--hover-bg); }
.hl-pick:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.hl-card b { font-weight: 600; }
.hl-svc { font-size: var(--text-xs); line-height: var(--text-xs-lh); color: var(--fg-3); }
.hl-line { font-size: var(--text-xs); line-height: var(--text-xs-lh); color: var(--fg-2); }
.hl-events { list-style: none; margin: 0; padding: 0; }
.hl-events li { display: flex; gap: 10px; padding: 10px var(--pad-x); border-bottom: 1px solid var(--border-subtle); }
.hl-events li:last-child { border-bottom: 0; }
.hl-events .d { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--approved-fg); }
.hl-events li[data-s="warn"] .d { background: var(--medium-fg); }
.hl-events li[data-s="err"] .d { background: var(--critical-solid); }
.hl-events div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hl-events b { font-weight: 600; }
.hl-events small { font-size: var(--text-xs); color: var(--fg-3); }
.hl-tech { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 1280px) { .hl-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .hl-cards { grid-template-columns: minmax(0, 1fr); } }

/* service tiles: the AWS icon before the status dot */
.hl-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hl-name img { width: 24px; height: 24px; border-radius: 4px; flex: none; }

/* "How the platform is running": the service map (SVG) */
.wb-tile.hm-wrap { padding: 16px; overflow-x: auto; }
.wb-app svg.hm-svg { display: block; width: 100%; min-width: 960px; height: auto; flex: none; font-family: var(--font-sans); }
.hm-box { fill: var(--surface-1); stroke: var(--border-default); }
.hm-node { cursor: pointer; outline: none; }
.hm-node:hover .hm-box { stroke: var(--border-control); }
.hm-node.sel .hm-box, .hm-node:focus-visible .hm-box { stroke: var(--fg-1); stroke-width: 1.5; }
.hm-t { fill: var(--fg-1); font-size: 13px; font-weight: 600; }
.hm-s { fill: var(--fg-3); font-size: 11px; }
.hm-note { fill: var(--critical-fg); font-size: 11px; }
.hm-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.hm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hm-legend i { width: 8px; height: 8px; border-radius: 50%; }
@keyframes hmFlow { to { stroke-dashoffset: -28; } }
@keyframes hmPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes hmSpin { to { transform: rotate(360deg); } }
.hm-flow { stroke-dasharray: 6 8; animation: hmFlow 1s linear infinite; }
.hm-pulse { animation: hmPulse 1.6s ease-in-out infinite; }
.hm-spin { transform-box: fill-box; transform-origin: center; animation: hmSpin 1.4s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .hm-flow, .hm-pulse, .hm-spin { animation: none; }
  .hm-dot { display: none; }
}

/* the uptime bar under each tile (status-page style): 48 half-hour bars, oldest left */
.hl-up { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding: 0 12px 10px; }
.hl-bars { display: flex; gap: 2px; height: 26px; }
.hl-bars i { flex: 1 1 0; min-width: 1px; border-radius: 1px; background: var(--approved-solid); cursor: default; outline: none; transition: opacity .12s; }
.hl-bars i[data-k="w"] { background: var(--medium-solid); }
.hl-bars i[data-k="e"] { background: var(--critical-solid); }
.hl-bars i[data-k="-"] { background: var(--border-default); }
.hl-bars:hover i { opacity: .55; }
.hl-bars i:hover, .hl-bars i:focus-visible { opacity: 1; }
.hl-bars i:focus-visible { box-shadow: 0 0 0 2px var(--surface-1), 0 0 0 4px var(--focus-ring); position: relative; z-index: 1; }
@media (max-width: 1500px) { .hl-bars { gap: 1px; } }
.hl-up-l { display: flex; align-items: center; gap: 8px; font-size: var(--text-2xs); color: var(--fg-3); white-space: nowrap; }
.hl-up-l > i { flex: 1 1 0; min-width: 8px; height: 1px; background: var(--border-default); }
.hl-up-pct { color: var(--fg-2); font-weight: 600; cursor: help; border-radius: 2px; }
.hl-up-pct:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.hl-tip { position: fixed; z-index: 60; display: flex; flex-direction: column; gap: 4px; max-width: 300px; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface-2); color: var(--fg-1); box-shadow: var(--shadow-3); font-size: var(--text-xs); line-height: var(--text-xs-lh); pointer-events: none; }
.hl-tip[hidden] { display: none; }
.hl-tip b { font-weight: 600; }
.hl-tip small { color: var(--fg-3); }
.hl-tip-s { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); }
.hl-tip-s i { width: 8px; height: 8px; border-radius: 2px; background: var(--approved-solid); }
.hl-tip-s[data-k="w"] i { background: var(--medium-solid); }
.hl-tip-s[data-k="e"] i { background: var(--critical-solid); }
.hl-tip-s[data-k="-"] i { background: var(--border-strong); }
@media (prefers-reduced-motion: reduce) { .hl-bars i { transition: none; } }

/* ---- the service map: three bands, a card per service over a line layer ---- */
.hm-scroll { overflow-x: auto; }
.hm-canvas { position: relative; margin: 4px 0; }
.hm-links { position: absolute; inset: 0; pointer-events: none; }
.hm-band { position: absolute; left: 0; right: 0; height: 24px; display: flex; align-items: center; border-top: 1px dashed var(--border-subtle, var(--border-default)); }
.hm-band span { font-size: var(--text-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); background: var(--surface-1); padding-right: 8px; margin-top: -1px; }
.hm-band:first-child { border-top: 0; }
.hm-n { position: absolute; width: 132px; height: 120px; box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 10px 8px; border: 1px solid var(--border-default); border-radius: 10px; background: var(--surface-1); color: var(--fg-1); text-align: left; cursor: pointer; font: inherit; overflow: hidden; }
.hm-n:hover { border-color: var(--border-control); }
.hm-n:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.hm-n img { margin-bottom: 4px; }
.hm-n b { font-size: var(--text-sm); font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hm-n small { font-size: var(--text-xs); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hm-n .hm-l { font-size: var(--text-xs); color: var(--fg-2); margin-top: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hm-n[data-s="warn"] .hm-l, .hm-n[data-s="err"] .hm-l { margin-top: 2px; }
.hm-ok { position: absolute; top: 10px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--approved-solid); }
/* warn and bad: a banner with an icon and the word, at the bottom of the card */
.hm-ban { display: flex; align-items: center; gap: 5px; width: calc(100% + 20px); margin: auto -10px -8px; padding: 4px 10px; font-size: var(--text-xs); font-weight: 600; }
.hm-ban[data-s="warn"] { background: var(--medium-bg); color: var(--medium-fg); border-top: 1px solid var(--medium-border); }
.hm-ban[data-s="err"] { background: var(--critical-bg); color: var(--critical-fg); border-top: 1px solid var(--critical-border); }
.hl-card .hm-ban { width: 100%; margin: 0; border-radius: 0 0 var(--radius) var(--radius); }
.hm-march { animation: hmFlow 1.2s linear infinite; }
.hm-legend i[data-s="ok"] { background: var(--approved-solid); }
.hm-legend i[data-s="warn"] { background: var(--medium-solid); }
.hm-legend i[data-s="err"] { background: var(--critical-solid); }
@media (prefers-reduced-motion: reduce) { .hm-march { animation: none; } }
/* Check now: the page dims under a progress note */
#pageBody.hl-checking > :not(.hl-check) { opacity: .55; pointer-events: none; transition: opacity .2s; }
.hl-check { position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; gap: 12px; align-self: center; padding: 10px 16px; border: 1px solid var(--border-default); border-radius: var(--radius); background: var(--surface-1); box-shadow: var(--shadow-surface-3); }
.hl-prog { width: 160px; height: 4px; border-radius: 2px; background: var(--bg-muted); overflow: hidden; }
.hl-prog i { display: block; width: 40%; height: 100%; background: var(--chart-1); animation: hlProg 1.2s ease-in-out infinite; }
@keyframes hlProg { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.hl-tools { gap: 12px; align-items: center; }
