/* hvck labs landing v13: the B2C widget tiles (js/widgets.js). Dark ground, one orange, square corners except the
   companion's LCD. Archivo for words, Fragment Mono for machine data (hostnames, counts). No tracked caps.
   Each widget fills its host absolutely (the host needs a definite size); the host's own ground shows through. */

.hv-host { position: relative; }
.hv-comp, .hv-map {
  --hv-ink: #0E0E0E; --hv-paper: #F4F2EE; --hv-dim: #A9A7A2; --hv-o: #FF3D00; --hv-lcd: #C3C6BD; --hv-lcd-ink: #1B1D1A;
  --hv-line: rgb(244 242 238 / 22%); --hv-line-2: rgb(244 242 238 / 34%);
  --hv-sans: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hv-mono: 'Fragment Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  position: absolute; inset: 0; display: flex; flex-direction: column; min-width: 0; min-height: 0;
  color: var(--hv-paper); font-family: var(--hv-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
.hv-comp *, .hv-map * { box-sizing: border-box; }
.hv-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- the section link: a name and an orange key */
.hv-sec { position: relative; flex: none; align-self: flex-start; display: inline-flex; align-items: stretch; height: 30px; max-width: 100%;
  color: var(--hv-paper); text-decoration: none; font-size: 15px; font-weight: 580; font-stretch: 106%; letter-spacing: -0.01em; line-height: 1; }
.hv-sec::before { content: ''; position: absolute; inset: -7px -4px; }   /* a 44px touch target, no extra layout */
.hv-sec-t { display: flex; align-items: center; min-width: 0; padding: 0 11px 1px; background: var(--hv-ink); box-shadow: inset 0 0 0 1px var(--hv-line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color .2s, color .2s, box-shadow .2s; }
.hv-sec-a { flex: none; display: grid; place-items: center; width: 30px; background: var(--hv-o); color: var(--hv-ink); }
.hv-sec-a svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.hv-sec:hover .hv-sec-t, .hv-sec:focus-visible .hv-sec-t { background: var(--hv-paper); color: var(--hv-ink); box-shadow: none; }
.hv-sec:hover .hv-sec-a svg, .hv-sec:focus-visible .hv-sec-a svg { transform: translateX(2px); }
.hv-sec:focus-visible { outline: 2px solid var(--hv-o); outline-offset: 3px; }

/* ================================================================ the companion tile */
.hv-comp { gap: 10px; padding: 12px; }
.hv-lcd { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; cursor: pointer;
  padding: 14px 14px 8px; border-radius: 12px; color: var(--hv-lcd-ink);
  background-color: var(--hv-lcd); background-image: radial-gradient(circle, rgb(27 29 26 / 9%) .7px, transparent 1.1px); background-size: 4px 4px;
  box-shadow: inset 0 0 0 1px rgb(27 29 26 / 10%); transition: background-color .2s; user-select: none; -webkit-user-select: none; }
.hv-lcd:hover { background-color: #BCBFB6; }
.hv-lcd-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.hv-lcd-px { flex: none; line-height: 0; }
.hv-px { display: block; overflow: visible; color: var(--hv-lcd-ink); image-rendering: pixelated; }
.hv-px .hv-px-g { fill: var(--hv-lcd-ink); fill-opacity: .05; }
.hv-px .hv-px-l { fill: currentColor; fill-opacity: .24; }
.hv-px .hv-px-m { fill: currentColor; fill-opacity: .6; }
.hv-px .hv-px-i { fill: currentColor; }
.no-px .hv-lcd-px { display: none; }
.hv-lcd-q { display: grid; align-items: center; justify-items: center; max-width: 25ch; margin: 0; text-align: center;
  font-size: 15px; line-height: 1.22; font-weight: 600; letter-spacing: -0.01em; }
.hv-lcd-q > span { grid-area: 1 / 1; text-wrap: balance; }
.hv-lcd-q .hv-q-s { visibility: hidden; }
.hv-q-t { transition: opacity .25s cubic-bezier(.2, .7, .2, 1); }
.hv-lcd-q.fade .hv-q-t { opacity: 0; }
.answered .hv-q-t { font-weight: 520; }
.hv-lcd-bar { flex: none; display: flex; align-items: center; justify-content: space-between; margin: 6px -6px 0 0; }
.hv-dots { display: flex; gap: 6px; }
.hv-dots i { width: 6px; height: 6px; box-shadow: inset 0 0 0 1px rgb(27 29 26 / 45%); transition: background-color .25s; }
.hv-dots i.on { background: var(--hv-lcd-ink); box-shadow: none; }
.hv-next { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 6px 1px 10px; border: 0; background: none; color: var(--hv-lcd-ink); cursor: pointer;
  font: 600 14px/1 var(--hv-sans); letter-spacing: -0.005em; }
.hv-next svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.hv-next:hover svg, .hv-next:focus-visible svg { transform: translateX(2px); }
.hv-next:hover .hv-next-t { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hv-next:focus-visible { outline: 2px solid var(--hv-lcd-ink); outline-offset: -2px; }
.hv-next:active, .hv-lcd:active .hv-q-t { transform: translateY(1px); }

.hv-ans { flex: none; display: flex; gap: 8px; }
.hv-chip { flex: 1 1 0; min-width: 0; height: 34px; padding: 0 10px 1px; border: 0; border-radius: 0; cursor: pointer;
  background: var(--hv-ink); color: var(--hv-paper); box-shadow: inset 0 0 0 1px var(--hv-line-2);
  font: 520 14px/1 var(--hv-sans); letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background-color .2s, color .2s, box-shadow .2s; }
.hv-chip:hover { box-shadow: inset 0 0 0 1px var(--hv-paper); }
.hv-chip[aria-pressed="true"] { background: var(--hv-paper); color: var(--hv-ink); box-shadow: none; }
.hv-chip:focus-visible { outline: 2px solid var(--hv-o); outline-offset: 2px; }
.answered .hv-chip[aria-pressed="false"] { color: var(--hv-dim); }

/* sizes (set by fit() from the tile's box): s under ~250px, m, l from ~370px */
.hv-comp[data-fit="s"] { gap: 8px; padding: 8px; }
.hv-comp[data-fit="s"] .hv-lcd { padding: 10px 10px 4px; border-radius: 9px; }
.hv-comp[data-fit="s"] .hv-lcd-main { gap: 6px; }
.hv-comp[data-fit="s"] .hv-lcd-q { font-size: 14px; line-height: 1.2; }
.hv-comp[data-fit="s"] .hv-next { min-height: 28px; font-size: 13px; }
.hv-comp[data-fit="s"] .hv-dots { gap: 5px; }
.hv-comp[data-fit="s"] .hv-dots i { width: 5px; height: 5px; }
.hv-comp[data-fit="s"] .hv-ans, .hv-comp.no-ans .hv-ans { display: none; }
.hv-comp[data-fit="s"] .hv-sec { height: 28px; font-size: 14px; }
.hv-comp[data-fit="s"] .hv-sec-t { padding: 0 9px 1px; }
.hv-comp[data-fit="s"] .hv-sec-a { width: 28px; }
.hv-comp[data-fit="l"] { gap: 12px; padding: 14px; }
.hv-comp[data-fit="l"] .hv-lcd { padding: 18px 18px 10px; border-radius: 14px; }
.hv-comp[data-fit="l"] .hv-lcd-main { gap: 12px; }
.hv-comp[data-fit="l"] .hv-lcd-q { font-size: 17px; }
.hv-comp[data-fit="l"] .hv-chip { height: 38px; font-size: 15px; }

/* ================================================================ the live attack map */
.hv-map { gap: 8px; padding: 12px; }   /* type pass: 8px keeps the 13px hostnames 7px or more off the top line and the section link */
.hv-map-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.hv-map-say { margin: 0; min-width: 0; font-size: 14px; line-height: 1.25; font-weight: 520; letter-spacing: -0.005em; color: var(--hv-paper); }
.hv-map-meta { flex: none; font: 13px/1 var(--hv-mono); color: var(--hv-dim); white-space: nowrap; }
.hv-map-reset { flex: none; height: 30px; padding: 0 12px 1px; border: 0; border-radius: 0; cursor: pointer; background: var(--hv-o); color: var(--hv-ink);
  font: 600 14px/1 var(--hv-sans); }
/* fix round (P3-4): Reset is a hairline text button, like the companion's Next, not a third orange block */
.hv-map-reset { background: transparent; color: var(--hv-paper); box-shadow: inset 0 0 0 1px rgb(244 242 238 / 30%); font-weight: 560; }
.hv-map-reset:hover { background: transparent; color: var(--hv-o); box-shadow: inset 0 0 0 1px var(--hv-o); }
.hv-map-reset:focus-visible { outline: 2px solid var(--hv-paper); outline-offset: 2px; }
.hv-map-reset[hidden], .hv-map-meta[hidden] { display: none; }
.hv-map-net { position: relative; flex: 1 1 auto; min-height: 0; }
.hv-map-links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.hv-ln { stroke: var(--hv-line); stroke-width: 1; fill: none; transition: stroke .25s, stroke-opacity .25s; }
.hv-ln.hot { stroke: var(--hv-o); stroke-dasharray: 3 3; }
.hv-ln.own { stroke: var(--hv-o); }
.hv-ln.off { stroke-opacity: .3; }

/* a node is a 42 x 40 box whose point (21, 16) sits on the machine's centre: the square there, the hostname above,
   below or left of it (lb-a / lb-b / lb-l), always at least 5px clear of the AI's key when it stands there, on a chip
   of the ground so a link passing behind never runs through the letters (v13 phase 2) */
.hv-node { position: absolute; left: 0; top: 0; width: 42px; height: 40px; margin: -16px 0 0 -21px; padding: 0; border: 0; background: none; color: var(--hv-dim); font: inherit; }
button.hv-node { cursor: pointer; }
.hv-sq { position: absolute; left: 17px; top: 12px; width: 9px; height: 9px; background: var(--hv-ink); box-shadow: inset 0 0 0 1px var(--hv-o);
  transition: background-color .2s, box-shadow .2s; }
.hv-hn { position: absolute; top: 28px; padding: 1px 2px; background: var(--hv-ink); font: 13px/1 var(--hv-mono); white-space: nowrap; transition: color .2s; }
.lb-a .hv-hn { top: auto; bottom: 35px; }
.lb-l .hv-hn { top: 8.5px; }
.al-c .hv-hn { left: 21.5px; transform: translateX(-50%); }
.al-s .hv-hn { left: 15px; }
.al-e .hv-hn { right: 14px; }
.lb-l .hv-hn { left: auto; right: 35px; transform: none; }
button.hv-node:not(.off):hover .hv-sq { background: rgb(244 242 238 / 18%); box-shadow: inset 0 0 0 1px var(--hv-paper); }
button.hv-node:not(.off):hover .hv-hn { color: var(--hv-paper); }
button.hv-node:focus-visible { outline: none; }
button.hv-node:focus-visible .hv-sq { outline: 2px solid var(--hv-paper); outline-offset: 3px; }
button.hv-node:focus-visible .hv-hn { color: var(--hv-paper); }
.hv-node.own .hv-sq { background: var(--hv-o); }
.hv-node.own .hv-hn { color: var(--hv-o); }
.hv-node.off .hv-sq { left: 16px; top: 11px; width: 11px; height: 11px; box-shadow: inset 0 0 0 1px rgb(244 242 238 / 55%); background:
  linear-gradient(45deg, transparent calc(50% - .6px), rgb(244 242 238 / 75%) calc(50% - .6px), rgb(244 242 238 / 75%) calc(50% + .6px), transparent calc(50% + .6px)),
  linear-gradient(-45deg, transparent calc(50% - .6px), rgb(244 242 238 / 75%) calc(50% - .6px), rgb(244 242 238 / 75%) calc(50% + .6px), transparent calc(50% + .6px)), var(--hv-ink); }
button.hv-node.off:hover .hv-sq { box-shadow: inset 0 0 0 1px var(--hv-paper); }
.hv-node.off .hv-hn { color: rgb(244 242 238 / 42%); text-decoration: line-through; text-decoration-thickness: 1px; }
.hv-node.is-ai .hv-hn { color: var(--hv-o); }
.hv-node.is-goal .hv-sq { left: 15px; top: 10px; width: 13px; height: 13px; background: var(--hv-paper); box-shadow: none; }
.hv-node.is-goal .hv-hn { color: var(--hv-paper); }
.pwned .hv-node.is-goal .hv-sq { background: var(--hv-o); }
.pwned .hv-node.is-goal .hv-hn { color: var(--hv-o); }

/* the AI: a solid orange key with an ink gap round it, its name riding above */
.hv-ai { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 3; pointer-events: none; font-style: normal; will-change: transform; }
.hv-ai::before { content: ''; position: absolute; left: -6px; top: -6px; width: 13px; height: 13px; background: var(--hv-o); box-shadow: 0 0 0 2px var(--hv-ink); }
.hv-ai::after { content: ''; position: absolute; left: -6px; top: -6px; width: 13px; height: 13px; box-shadow: 0 0 0 1px var(--hv-o); opacity: 0; }
.hv-ai.hit::after { animation: hv-hit .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes hv-hit { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(2.4); } }
.hv-ai b { position: absolute; left: 0; bottom: 12px; transform: translateX(-50%); margin-left: .5px; padding: 1px 3px 2px; background: var(--hv-ink);
  font: 13px/1 var(--hv-mono); font-weight: 400; color: var(--hv-o); }
.hv-ai.tag-b b { bottom: auto; top: 12px; }
.held .hv-ai::before { background: var(--hv-dim); }
.held .hv-ai b { color: var(--hv-dim); }
.held .hv-map-say { color: var(--hv-paper); }

.hv-map { container-type: inline-size; }
@container (min-width: 380px) {
  .hv-map-say { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .hv-ln, .hv-sq, .hv-hn, .hv-q-t, .hv-chip, .hv-sec-t, .hv-sec-a svg, .hv-next svg, .hv-lcd { transition: none !important; }
  .hv-ai.hit::after { animation: none; }
}
