/* A stable control strip: selecting a routine changes only its surface. */
#demoTabs {
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px 12px;
  isolation: isolate;
}
#demoTabs button[data-demo] {
  position: relative;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: transparent;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: -.015em;
  white-space: nowrap;
  transform: none;
  animation: none;
  -webkit-tap-highlight-color: transparent;
  /* Keep text and selected surface in sync, including rapid product changes. */
  transition: border-color .16s ease, box-shadow .16s ease;
}
#demoTabs button[data-demo][aria-pressed="true"] {
  background: #243b4f;
  border-color: #243b4f;
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 14%), 0 2px 5px rgb(25 45 63 / 10%);
}
#demoTabs button[data-demo]:active:not(:disabled) { transform: none; }
#demoTabs button[data-demo]:focus-visible {
  outline: 2px solid #5794bd;
  outline-offset: 3px;
}
@media (hover: hover) {
  #demoTabs button[data-demo]:hover { background: var(--surface); color: var(--ink); border-color: var(--line); }
  #demoTabs button[data-demo][aria-pressed="true"]:hover { background: #2c465d; border-color: #2c465d; color: #fff; }
}
html[data-theme="dark"] #demoTabs button[data-demo][aria-pressed="true"] {
  background: #d7e7f1;
  border-color: #d7e7f1;
  color: #1b2b3a;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 35%), 0 2px 5px rgb(0 0 0 / 10%);
}
@media (max-width: 700px) {
  #demoTabs { gap: 4px; padding-inline: 10px; padding-bottom: 8px; }
  #demoTabs button[data-demo] { flex:0 0 calc((100% - 8px) / 3); min-height:36px; padding:8px; font-size:12px; }
}
@media (prefers-reduced-motion: reduce) {
  #demoTabs button[data-demo] { transition: none; }
}
