.modal:has(.shx-hname) {
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow:
    0 1px 2px rgb(17 17 20 / .05),
    0 10px 30px -14px rgb(17 17 20 / .22);
}
.modal:has(.shx-hname) .modal-b { padding: 2px 20px 6px; }
.modal:has(.shx-hname) .modal-f { padding: 10px 20px 16px; }
.modal:has(.shx-hname) .modal-morph .modal-b { max-height: min(76vh, 600px); }
.modal-h:has(.shx-hname) {
  padding: 18px 20px 12px;
  border-bottom: none;
}
.modal-h:has(.shx-hname) h3 {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.018em;
  line-height: 1.25;
  color: var(--text);
}
.modal-sub .shx-hname {
  font-size: 12px;
  font-weight: 500;
  color: var(--t2);
}
.modal-sub .shx-hmeta {
  font-size: 12px;
  font-weight: 400;
  color: var(--t3);
  font-variant-numeric: tabular-nums;
}
.shx { display: flex; flex-direction: column; gap: 15px; }
.shx-grp { display: flex; flex-direction: column; gap: 6px; }
.shx-glabel {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--t3);
  padding: 0 2px;
}
.shx-rows { display: flex; flex-direction: column; gap: 0; }
.shx-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 7px 8px;
  cursor: pointer;
  transition:
    background-color .16s ease,
    transform .16s cubic-bezier(.22, 1, .36, 1);
}
@media (hover: hover) and (pointer: fine) {
  .shx-row:hover { background: rgba(17, 17, 20, .03); }
}
.shx-row:active { transform: scale(.995); }
.shx-ic {
  flex-shrink: 0;
  width: 27px;
  height: 27px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--t3);
  background: rgba(17, 17, 20, .02);
  border: 1px solid var(--line);
  transition: color .16s ease, border-color .16s ease;
}
.shx-row:hover .shx-ic { color: var(--t2); border-color: var(--line-strong); }
.shx-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.shx-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -.006em;
}
.shx-desc {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--t3);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shx-sw {
  flex-shrink: 0;
  width: 30px;
  height: 18px;
  border-radius: 999px;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: #dcdde2;
  transition: background-color .2s ease;
}
.shx-sw.on {
  justify-content: flex-end;
  background: color-mix(in srgb, var(--accent) 72%, #9a9db2);
}
.shx-kn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 1.5px rgba(17, 17, 20, .16);
}
.shx-seg {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(17, 17, 20, .035);
  border: 1px solid var(--line);
}
.shx-seg-b {
  position: relative;
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 5px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--t3);
  cursor: pointer;
  transition: color .15s ease;
}
.shx-seg-b .l { position: relative; z-index: 1; }
.shx-seg-b:hover { color: var(--t2); }
.shx-seg-b.on { color: var(--text); }
.shx-seg-pill {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 1.5px rgba(17, 17, 20, .08), 0 0 0 1px rgba(17, 17, 20, .03);
}
.shx-artifact {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 7px 7px 12px;
  border-radius: 10px;
  background: rgba(17, 17, 20, .02);
  border: 1px solid var(--line);
}
.shx-artifact-ic {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--accent) 72%, #9a9db2);
}
.shx-url {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shx-artifact-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: filter .14s ease, background-color .18s ease;
}
.shx-artifact-copy:hover { filter: brightness(1.06); }
.shx-artifact-copy.done { background: var(--green); }
.shx-note {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--t3);
  line-height: 1.45;
  margin: 9px 2px 0;
}
.shx-actions { display: flex; gap: 4px; margin-top: 11px; }
.shx-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--t2);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color .14s ease, background-color .14s ease;
}
.shx-action:hover { color: var(--text); background: rgba(17, 17, 20, .04); }
.shx-action svg { color: var(--t3); }
.shx-action:hover svg { color: var(--t2); }
.shx-action:disabled { opacity: .55; cursor: default; }
.shx-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 38px;
  border: none;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.004em;
  cursor: pointer;
  transition: filter .14s ease;
}
.shx-cta:hover:not(:disabled) { filter: brightness(1.06); }
.shx-cta:disabled { cursor: default; opacity: .92; }
.shx-spin {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: shxSpin .6s linear infinite;
}
@keyframes shxSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .shx-row, .shx-ic, .shx-sw, .shx-artifact-copy, .shx-cta, .shx-action { transition: none; }
  .shx-spin { animation-duration: .01ms; }
}
