.hero-demo {
  --demo-window: #fafafa;
  --demo-card: #fff;
  --demo-ink: #24313b;
  --demo-muted: #64717a;
  --demo-line: #e1e4e6;
  --demo-toolbar: #eceeef;
  --demo-accent: #448e90;
  --demo-map: #f3f7f6;
  display: grid;
  grid-template-columns: 1fr 100px 1.4fr;
  align-items: center;
  margin-top: 48px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #e9f0ec, #edf2ef);
}
.hero-demo [hidden] { display: none; }
.hero-demo-sources > div { display: flex; gap: 12px; align-items: center; padding: 15px 13px; background: var(--paper); border-radius: 6px; }
.hero-demo-sources > div + div { margin-top: 8px; }
.hero-demo-sources svg { width: 30px; height: 30px; padding: 4px; flex-shrink: 0; fill: none; stroke: var(--demo-accent); stroke-width: 1.4; }
.hero-demo-sources strong { font-size: 13px; font-weight: 600; }
.hero-demo-merge { position: relative; height: 330px; }
.hero-demo-merge svg { width: 100%; height: 100%; fill: none; stroke: var(--demo-accent); stroke-width: 1; opacity: .4; }
.hero-demo-merge > span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 1px solid var(--line); border-radius: 50%; background: var(--demo-map); color: var(--demo-accent); padding: 5px 9px; }
.hero-demo-window { min-width: 0; border: 1px solid #00000025; border-radius: 12px; background: var(--demo-window); color: var(--demo-ink); overflow: hidden; box-shadow: 0 22px 38px -14px #102b3d38, 0 3px 8px #102b3d12; }
.hero-demo-titlebar { display: grid; grid-template-columns: 65px 1fr 65px; align-items: center; padding: 15px 17px; border-bottom: 1px solid var(--demo-line); background: linear-gradient(var(--demo-window), var(--demo-toolbar)); }
.hero-demo-lights { display: flex; gap: 7px; }
.hero-demo-lights span { width: 11px; height: 11px; border: 1px solid #00000013; border-radius: 50%; background: #ff6058; }
.hero-demo-lights span:nth-child(2) { background: #febc2e; }
.hero-demo-lights span:nth-child(3) { background: #28c840; }
.hero-demo-title { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--demo-muted); }
.hero-demo-titlebar > svg { width: 19px; height: 19px; justify-self: end; fill: none; stroke: var(--demo-muted); stroke-width: 1.5; }
.hero-demo-hint { margin: 15px 22px 10px; font-size: 11px; line-height: 1.5; color: var(--demo-accent); }
.hero-demo-tabs { display: grid; grid-template-columns: .65fr 1fr 1.25fr 1fr 1.1fr; gap: 3px; margin: 0 22px; padding: 3px; border: 1px solid var(--demo-line); border-radius: 7px; background: var(--demo-toolbar); }
.hero-demo-tabs button { padding: 8px 3px; font-size: 11px; line-height: 1.4; color: var(--demo-muted); background: transparent; border: 0; border-radius: 4px; }
.hero-demo-tabs button:hover { color: var(--demo-ink); background: var(--demo-window); }
.hero-demo-tabs button[aria-selected="true"] { background: var(--demo-card); color: var(--demo-ink); font-weight: 600; box-shadow: 0 1px 4px #00000018; }
.hero-demo-identity { padding: 27px; display: flex; align-items: center; gap: 17px; }
.hero-demo-device-icon { display: grid; place-items: center; width: 66px; height: 66px; flex-shrink: 0; border-radius: 15px; border: 1px solid var(--demo-line); background: linear-gradient(145deg, var(--demo-window), var(--demo-map)); box-shadow: inset 0 1px #ffffff30, 0 2px 3px #102b3d06; }
.hero-demo-device-icon svg { width: 48px; height: 36px; stroke: var(--demo-accent); stroke-width: 1.8; fill: none; }
.hero-demo-identity h2 { font-size: 25px; font-weight: 600; letter-spacing: -.8px; margin: 0 0 7px; }
.hero-demo-identity p { font-size: 12px; color: var(--demo-muted); margin: 0; line-height: 1.6; }
.hero-demo-identity p span { display: block; font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.hero-demo-panel { min-height: 290px; display: flow-root; }
.hero-demo-panel:focus-visible { outline: 2px solid var(--demo-accent); outline-offset: -5px; }
.hero-demo-facts { margin: 0 22px 23px; padding: 0 17px; border: 1px solid var(--demo-line); border-radius: 9px; background: var(--demo-card); }
.hero-demo-facts > div { display: grid; grid-template-columns: 80px 1fr; gap: 15px; align-items: baseline; padding: 16px 0; }
.hero-demo-facts > div + div { border-top: 1px solid var(--demo-line); }
.hero-demo-facts dt { color: var(--demo-muted); font-size: 12px; }
.hero-demo-facts dd { margin: 0; font-size: 14px; font-weight: 550; line-height: 1.5; }
.hero-demo-facts dd span { display: block; font-size: 11px; color: var(--demo-muted); font-weight: 400; margin-top: 2px; }
.hero-demo-map { min-height: 240px; margin: 0 22px; padding: 20px; border: 1px solid var(--demo-line); border-radius: 9px; background: radial-gradient(#718c9125 .8px, transparent .8px) 0 0 / 14px 14px, var(--demo-map); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero-demo-node { width: min(215px, 100%); padding: 12px 16px; border: 1px solid var(--demo-line); border-radius: 6px; background: var(--demo-card); box-shadow: 0 2px 5px #102b3d05; }
.hero-demo-node strong { display: block; font-size: 14px; font-weight: 550; margin-top: 4px; }
.hero-demo-node > span { color: var(--demo-muted); font-size: 10px; }
.hero-demo-node.selected { border-color: var(--demo-accent); box-shadow: 0 0 0 2px #448e9014; }
.hero-demo-link { height: 42px; position: relative; width: min(215px, 100%); flex-shrink: 0; }
.hero-demo-link::before { content: ""; position: absolute; left: 30px; height: 100%; border-left: 1px solid var(--demo-accent); }
.hero-demo-link span { position: absolute; left: 43px; top: 13px; color: var(--demo-muted); font-size: 10px; }
.hero-demo-link.audio::after { content: ""; position: absolute; left: 27px; bottom: 2px; width: 6px; height: 6px; border-right: 1px solid var(--demo-accent); border-bottom: 1px solid var(--demo-accent); transform: rotate(45deg); }
.hero-demo-design { font-size: 11px; color: var(--demo-accent); margin-bottom: 12px; }
.hero-demo-caption { margin: 12px 22px 20px; font-size: 11px; line-height: 1.5; color: var(--demo-muted); text-align: center; }
@media (prefers-color-scheme: dark) {
  .hero-demo { --demo-window: #242a30; --demo-card: #2b3239; --demo-ink: #e7ecef; --demo-muted: #aab6bf; --demo-line: #ffffff13; --demo-toolbar: #1d2329; --demo-accent: #8bcbc4; --demo-map: #222e34; background: linear-gradient(135deg, #11252c, #142730); }
  .hero-demo-window { border-color: #ffffff2b; box-shadow: 0 22px 38px -14px #0008; }
  .hero-demo-tabs button[aria-selected="true"] { background: #45515b; }
}
@media (min-width: 801px) and (max-width: 1150px) {
  .hero-demo { grid-template-columns: 1fr 65px 1.4fr; padding: 24px; }
  .hero-demo-identity { padding: 22px 18px; gap: 12px; }
  .hero-demo-identity h2 { font-size: 21px; }
  .hero-demo-device-icon { width: 54px; height: 54px; }
  .hero-demo-facts { margin-inline: 15px; padding-inline: 13px; }
  .hero-demo-facts > div { grid-template-columns: 60px 1fr; gap: 12px; }
  .hero-demo-facts dd { font-size: 13px; }
}
@media (max-width: 800px) {
  .hero-demo { grid-template-columns: 1fr; padding: 24px; margin-top: 32px; }
  .hero-demo-sources { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-demo-sources > div + div { margin: 0; }
  .hero-demo-sources > div:last-child { grid-column: 1 / -1; }
  .hero-demo-merge { height: 46px; margin: 7px 0; }
  .hero-demo-merge svg { display: none; }
  .hero-demo-merge > span { transform: translate(-50%, -50%) rotate(90deg); }
}
@media (max-width: 480px) {
  .hero-demo { padding: 20px 14px; }
  .hero-demo-sources { grid-template-columns: 1fr; }
  .hero-demo-titlebar { grid-template-columns: 50px 1fr 28px; padding: 12px; }
  .hero-demo-lights { gap: 5px; }
  .hero-demo-lights span { width: 9px; height: 9px; }
  .hero-demo-identity { padding: 22px 16px; gap: 12px; }
  .hero-demo-device-icon { width: 47px; height: 47px; border-radius: 11px; }
  .hero-demo-device-icon svg { width: 36px; height: 28px; }
  .hero-demo-identity h2 { font-size: 20px; }
  .hero-demo-identity p { font-size: 11px; }
  .hero-demo-facts { margin: 0 12px 15px; padding-inline: 12px; }
  .hero-demo-facts > div { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
  .hero-demo-facts dt { font-size: 11px; }
  .hero-demo-facts dd { font-size: 13px; }
  .hero-demo-tabs { margin-inline: 10px; gap: 1px; }
  .hero-demo-tabs button { font-size: 10px; padding-inline: 2px; min-height: 44px; }
  .hero-demo-hint { margin-inline: 14px; font-size: 10px; }
  .hero-demo-map { margin-inline: 12px; padding: 16px 12px; }
  .hero-demo-caption { margin-inline: 14px; }
  .hero-demo-panel { min-height: 330px; }
}
