/* infra board · home right canvas */
.hero-canvas .canvas-panel {
  height: 392px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.hero-canvas .canvas-panel::before,
.hero-canvas .canvas-panel::after { display: none; }

.ib-board {
  width: 604px;
  height: 392px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(18, 20, 23, .045);
  overflow: hidden;
  position: relative;
}
.ib-head {
  height: 27px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 250, .6);
  font: 500 7px/1 var(--mono);
  color: var(--faint);
  letter-spacing: .04em;
}
.ib-head b { color: var(--ink-2); font-weight: 500; }
.ib-head .right { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.ib-live { display: inline-flex; align-items: center; gap: 5px; color: var(--ok-ink); font-weight: 600; }
.ib-live i { width: 4px; height: 4px; border-radius: 50%; background: var(--ok); animation: ibPulse 2.2s infinite; }
@keyframes ibPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(10, 207, 131, .25); }
  50% { box-shadow: 0 0 0 4px rgba(10, 207, 131, 0); }
}
.ib-body {
  height: 338px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(18, 20, 23, .05) 1px, transparent 1.3px) 0 0 / 18px 18px,
    linear-gradient(180deg, #FCFDFE 0%, #FBFCFD 100%);
}
.ib-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(77, 107, 254, .03), transparent 42%);
  pointer-events: none;
}
.ib-brand {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 3;
  font: 500 6.5px/1 var(--mono);
  color: var(--ghost);
}
.ib-brand b { font: 600 7.5px/1 var(--mono); letter-spacing: .04em; color: var(--ink-2); }
.ib-brand .dim { margin-left: auto; color: var(--ghost); }
.ib-brand .cols { display: flex; gap: 3px; }
.ib-brand .cols i { width: 5px; height: 5px; border-radius: 50%; }

.ib-links { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.ib-link-line { fill: none; stroke: rgba(10, 207, 131, .5); stroke-width: 1.1; }
.ib-link-line.dash { stroke: var(--line-3); stroke-dasharray: 3 4; }
.ib-link-line.flow { stroke-dasharray: 5 7; animation: ibFlow 14s linear infinite; }
@keyframes ibFlow { to { stroke-dashoffset: -220; } }

.ib-node {
  position: absolute;
  z-index: 2;
  width: 200px;
  height: 64px;
  background: rgba(255, 255, 255, .95);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(18, 20, 23, .03);
  backdrop-filter: blur(4px);
  padding: 10px 12px;
}
.ib-node.central { left: 28px; top: 40px; }
.ib-node.origin { left: 28px; top: 140px; }
.ib-node.future {
  left: 400px; top: 140px; width: 160px;
  border-style: dashed; background: rgba(255, 255, 255, .55); box-shadow: none;
}
.ib-meta { display: flex; align-items: baseline; gap: 6px; height: 17px; margin-top: 1px; }
.ib-health { font: 600 15px/1 var(--mono); letter-spacing: -.06em; color: var(--ink); }
.ib-health small { font-size: 7px; letter-spacing: 0; color: var(--faint); margin-left: 1px; }
.ib-meta .sep { font: 500 7px/1 var(--mono); color: var(--line-3); }
.ib-lat { font: 500 7px/1 var(--mono); color: var(--muted); }
.ib-lat small { font-size: 6px; color: var(--ghost); margin-left: 1px; }
.ib-os {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font: 500 5.5px/1 var(--mono);
  color: var(--faint);
  white-space: nowrap;
}
.ib-os svg { width: 9px; height: 9px; flex: none; }
.ib-os-win { color: #0078D4; }
.ib-os-ubuntu { color: #E95420; }
.ib-pc { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.ib-pc b { font: 600 9px/1 var(--mono); letter-spacing: 0; white-space: nowrap; }
.ib-svc {
  font: 500 6px/1 var(--mono);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 3px 4px;
  white-space: nowrap;
}
.ib-node.future .ib-meta { opacity: .55; }
.ib-node.future .ib-pc b { color: var(--faint); }
.ib-node.future .ib-svc { color: var(--ghost); border-color: var(--line); background: transparent; }
.ib-node.future .ib-os { color: var(--ghost); }

.ib-health-edit {
  position: relative;
  border-radius: 2px;
  padding: 0 1px;
  font: 600 15px/1 var(--mono);
  letter-spacing: -.06em;
  color: var(--ink);
  transition: background .14s ease, box-shadow .14s ease, color .14s ease;
}
.ib-health-edit.hover { background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent-line); }
.ib-health-edit.selected,
.ib-health-edit.typing { background: var(--accent); color: #fff; box-shadow: 0 0 0 1.5px rgba(77, 107, 254, .18); }
.ib-health-edit.selected small,
.ib-health-edit.typing small { color: #DCE3FF; }
.ib-health-edit .ib-caret {
  display: inline-block;
  width: 1.5px;
  height: 12px;
  background: #fff;
  vertical-align: -2px;
  margin-left: 1px;
  animation: ibBlink 1s steps(1) infinite;
}
@keyframes ibBlink { 50% { opacity: 0; } }
.ib-health-edit.click::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.4);
  animation: ibClick .32s ease-out;
  pointer-events: none;
}
@keyframes ibClick { to { transform: translate(-50%, -50%) scale(1.7); opacity: 0; } }

.ib-agent {
  position: absolute;
  z-index: 5;
  left: 282px;
  top: 108px;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
  transition: left .2s ease, top .2s ease;
}
.ib-agent svg { width: 13px; height: 17px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); }
.ib-tip {
  position: absolute;
  z-index: 4;
  left: 44px;
  top: 116px;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  padding: 5px 6px;
  font: 500 6px/1.3 var(--mono);
  box-shadow: 0 3px 10px rgba(18, 20, 23, .2);
  white-space: nowrap;
  transition: opacity .14s ease, transform .14s ease;
}
.ib-tip::after {
  content: '';
  position: absolute;
  left: 7px;
  bottom: -3px;
  width: 5px;
  height: 5px;
  background: var(--ink);
  transform: rotate(45deg);
}
.ib-tip b { color: #8FE8C6; font-weight: 500; }
.ib-tip .ib-tip-caret {
  display: inline-block;
  width: 4px;
  height: 7px;
  background: #fff;
  vertical-align: -1px;
  margin-left: 1px;
  animation: ibBlink 1.1s steps(1) infinite;
}
.ib-tip.off { opacity: 0; transform: translateY(-2px); }

.ib-stream {
  position: absolute;
  z-index: 3;
  left: 14px;
  right: 14px;
  bottom: 10px;
  height: 82px;
  background: var(--code);
  border: 1px solid var(--code-line);
  border-radius: 7px;
  overflow: hidden;
}
.ib-stream-head {
  height: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font: 500 5.5px/1 var(--mono);
  color: #7D8493;
  letter-spacing: .08em;
}
.ib-stream-head b { color: #D6DBE5; font-weight: 600; }
.ib-stream-head .ib-live { margin-left: auto; color: #65D9A8; }
.ib-stream-head .ib-live i { background: #65D9A8; }
.ib-lines { padding: 5px 8px 0; display: grid; gap: 3.5px; font: 400 6.5px/1.25 var(--mono); color: #8B93A3; }
.ib-line { display: flex; gap: 7px; white-space: nowrap; }
.ib-line .t { color: #5B6372; flex: none; }
.ib-line .k { color: #C7CEDA; flex: none; width: 40px; }
.ib-line .v { color: #8B93A3; overflow: hidden; text-overflow: ellipsis; }
.ib-line .v b { color: #65D9A8; font-weight: 500; }
.ib-line .v em { color: #A6B0C3; font-style: normal; }
.ib-line.active .v { color: #D6DBE5; }
.ib-caret { display: inline-block; width: 4px; height: 7px; background: #65D9A8; vertical-align: -1px; margin-left: 2px; animation: ibBlink 1.1s steps(1) infinite; }

.ib-foot {
  height: 27px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  background: rgba(247, 248, 250, .6);
  font: 500 7px/1 var(--mono);
  color: var(--faint);
}
.ib-foot .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ib-ok { color: var(--ok-ink); border: 1px solid #C9F0DF; background: #F2FCF8; border-radius: 3px; padding: 3px 5px; font: 600 6.5px/1 var(--mono); letter-spacing: .05em; }

@media (max-width: 1080px) {
  .hero-canvas .canvas-panel { height: auto; }
  .ib-board { width: 100%; max-width: 604px; }
}
@media (max-width: 700px) {
  .ib-board { height: 420px; }
  .ib-body { height: 366px; }
  .ib-node.future { left: 28px; top: 242px; }
  .ib-stream { height: 94px; }
}
@media (prefers-reduced-motion: reduce) {
  .ib-live i, .ib-health-edit .ib-caret, .ib-tip .ib-tip-caret, .ib-caret { animation: none !important; }
  .ib-agent, .ib-tip, .ib-health-edit { transition: none; }
}

.ib-ok.warn { color: #B77900; border-color: #F1DFB5; background: #FFF7E2; }
.ib-ok.bad { color: #E8462A; border-color: #F4C9BF; background: #FFF0EC; }


/* ---------------- home draw intro ---------------- */
.ib-board.draw-mode .ib-head,
.ib-board.draw-mode .ib-brand,
.ib-board.draw-mode .ib-node,
.ib-board.draw-mode .ib-stream,
.ib-board.draw-mode .ib-foot { opacity: 0; }
.ib-board.draw-mode .ib-head { transform: translateY(-3px); }
.ib-board.draw-mode .ib-node { clip-path: inset(0 100% 0 0 round 9px); }
.ib-board.draw-mode .ib-stream { clip-path: inset(0 100% 0 0 round 7px); }
.ib-board.draw-mode .ib-foot { transform: translateY(3px); }
.ib-board.draw-mode .ib-agent,
.ib-board.draw-mode .ib-tip { opacity: 0; }
.ib-board.draw-mode .ib-links { opacity: 1; }

.ib-frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.ib-board.draw-mode .ib-frame { opacity: 1; }
.ib-board:not(.draw-mode) .ib-frame { display: none; }
.ib-frame rect { fill: none; stroke: var(--accent); stroke-width: 1.2; }

.draw-select { position: absolute; z-index: 8; border: 1.5px solid var(--accent); border-radius: 3px; pointer-events: none; opacity: 0; transform: scale(.985); transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease, opacity .18s ease, transform .18s ease; }
.draw-select.on { opacity: 1; transform: scale(1); }
.draw-select-label { position: absolute; right: -1px; top: -17px; background: var(--accent); color: #fff; border-radius: 2px; padding: 3px 4px; font: 500 6px/1 var(--mono); white-space: nowrap; }
.ds-h { position: absolute; width: 6px; height: 6px; background: #fff; border: 1px solid var(--accent); }
.ds-h.tl { left: -3.5px; top: -3.5px; }
.ds-h.tr { right: -3.5px; top: -3.5px; }
.ds-h.bl { left: -3.5px; bottom: -3.5px; }
.ds-h.br { right: -3.5px; bottom: -3.5px; }

.draw-agent { position: absolute; z-index: 20; width: 13px; height: 17px; pointer-events: none; transition: left .24s ease, top .24s ease; opacity: 0; }
.draw-agent svg { width: 13px; height: 17px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.draw-agent.lead svg path { fill: var(--purple, #A259FF); }
.draw-agent.helper svg path { fill: var(--accent); }
.draw-agent .click { position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border: 1.5px solid var(--accent); border-radius: 50%; transform: translate(-50%,-50%) scale(.3); opacity: 0; }
.draw-agent.clicking .click { animation: ibDrawClick .34s ease-out; }
@keyframes ibDrawClick { 0% { opacity: 1; transform: translate(-50%,-50%) scale(.3); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.9); } }

.ib-replay { border: 1px solid var(--line-2); background: #fff; color: var(--faint); border-radius: 3px; width: 18px; height: 18px; display: grid; place-items: center; font: 500 9px/1 var(--mono); cursor: pointer; }
.ib-replay:hover { color: var(--ink); border-color: var(--line-3); }

@media (max-width: 700px) {
  .ib-board.draw-mode .ib-node,
  .ib-board.draw-mode .ib-stream { clip-path: none; }
}
@media (prefers-reduced-motion: reduce) {
  .draw-agent { transition: none; }
  .ib-replay { display: none; }
}
