/* Browserflow V5's current visual language, connected to Studio's own controls. */
:root {
  --blue: #3b5aea;
  --blue-soft: #5c7aff;
  --accent: #3b5aea;
  --bg: #18181b;
  --panel: #18181b;
  --border: #27272a;
}
body,
input,
button,
select,
textarea {
  font-family: Inter, sans-serif;
}
body.studio-page {
  background: #18181b;
  color: #f4f4f5;
}
.studio-page::before,
.studio-page::after {
  display: none;
}
.studio-page .layout {
  background: #18181b;
  grid-template-columns: 1fr;
}
.studio-page .studio-header {
  height: 72px;
  min-height: 72px;
  padding: 0 48px;
  gap: 24px;
  flex-wrap: nowrap;
  background: #18181bf5;
  border-bottom: 1px solid #ffffff0d;
  box-shadow: none;
  z-index: 35;
}
.studio-header .brand {
  gap: 9px;
  flex: 0 0 auto;
  align-items: center;
}
.studio-header .brand span {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.4px;
  transform: translateY(1px);
}
.studio-header .brand img {
  width: 24px;
  height: 24px;
  border-radius: 0;
}
.studio-header .global-search {
  height: 40px;
  order: 0;
  min-width: 120px;
  max-width: 360px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  border: 1px solid #ffffff0d;
  border-radius: 50px;
  background: #ffffff03;
  padding: 0 14px;
  box-shadow: none;
}
.studio-header .global-search > svg {
  position: static;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}
.studio-header .global-search input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}
.studio-header .global-search input:focus-visible {
  outline: none;
}
.studio-header .global-search:focus-within {
  border-color: #93b4fa;
  box-shadow: 0 0 0 1px #93b4fa;
}
.studio-header .global-search kbd {
  position: static;
  flex-shrink: 0;
  font:
    11px Inter,
    sans-serif;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 5px;
  color: #71717a;
  border: 1px solid #ffffff08;
}
.studio-header .header-tools {
  gap: 8px;
  margin-left: 0;
  flex: 0 0 auto;
  align-items: center;
}
.studio-header .header-tools > button {
  height: 40px;
  min-height: 40px;
  white-space: nowrap;
  padding: 0 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  background: #27272acc;
  border: 1px solid #ffffff05;
  color: #d4d4d8;
  box-shadow: none;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.studio-header .header-tools > button.primary {
  height: 40px;
  padding: 0 19px;
  background: #3b5aea;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-color: #5c7aff55;
  box-shadow: 0 0 18px #3b5aea16;
}
.header-tools .ui-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.studio-header .header-tools > button > i {
  width: 16px;
  text-align: center;
  font-size: 14px;
}
.header-option small {
  font-size: 10px;
  line-height: 16px;
  color: #a5b4fc;
  background: #3b5aea22;
  border-radius: 4px;
  padding: 2px 5px;
}
.header-option[data-dialog="ai"] small {
  color: #c4b5fd;
  background: #8b5cf61a;
}
.studio-header .account-menu summary {
  padding: 0;
  width: 40px;
  height: 40px;
  border: 1px solid #ffffff12;
  background: #27272a;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
body.studio-page .account-menu .account-dropdown > button {
  --hover-background: #fafafa07;
  --hover-border: transparent;
  --hover-text: #fff;
}
.account-dropdown .menu-icon,
.account-dropdown .ui-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  text-align: center;
  font-size: 14px;
}
.account-dropdown .menu-external {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 10px;
}
.studio-header .avatar {
  border: 0;
  background: none;
  color: #e4e4e7;
  font-size: 14px;
}
.account-dropdown .account-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 12px;
}
.account-dropdown .account-menu-avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  background: #3f3f46;
  border: 1px solid #ffffff12;
}
.account-identity-text {
  min-width: 0;
}
.account-identity-text strong,
.account-identity-text small {
  display: block;
  padding: 0;
  margin: 0;
}
.account-identity-text small {
  margin-top: 3px;
}
.studio-page .content {
  padding: 32px 48px 95px;
  max-width: 1920px;
  width: 100%;
  margin: 0 auto;
}
.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.dashboard-columns > .marketplace-column {
  border: 0;
  padding: 0;
}
.dashboard-columns .section-heading {
  min-height: 36px;
  margin: 0 0 22px;
  gap: 10px;
  flex-wrap: wrap;
}
.dashboard-columns .section-heading h2 {
  font-size: 20px;
  letter-spacing: 0;
  font-weight: 600;
}
.section-heading .count {
  font-size: 10px;
  opacity: 0.55;
  margin-left: 5px;
  background: none;
}
.section-hint {
  font-size: 10px;
  color: #71717a;
}
.dashboard-columns .filter-tabs {
  border: 0;
  gap: 8px;
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
}
.dashboard-columns .filter-tabs button,
.market-categories button {
  padding: 7px 14px;
  border-radius: 40px;
  border: 1px solid transparent;
  background: #ffffff03;
  font-size: 10px;
  font-weight: 500;
  color: #a1a1aa;
  min-height: 28px;
}
.dashboard-columns .filter-tabs button.active,
.market-categories button.active {
  background: #3b5aea16;
  border-color: #3b5aea20;
  color: #a5b4fc;
}
.flow-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.studio-page .card.saved-flow-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 22px;
  padding: 20px;
  border-radius: 16px;
  background: #18181b;
  border: 1px solid #27272a;
  box-shadow: none;
  min-width: 0;
  transition: border-color 0.2s;
}
.studio-page .card.saved-flow-card:hover {
  border-color: #3f3f46;
  box-shadow: 0 8px 20px #0001;
}
.flow-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}
.saved-flow-card .flow-card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0;
}
.flow-avatar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.flow-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #a5b4fc;
  background: #3b5aea12;
  border: 1px solid #3b5aea26;
  border-radius: 12px;
  font-size: 14px;
}
.change-icon {
  font-size: 9px;
  background: #ffffff03;
  border: 1px solid #ffffff08;
  border-radius: 4px;
  padding: 3px 7px;
  color: #71717a;
  min-height: 0;
}
.flow-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0 4px;
  min-width: 0;
}
.saved-flow-card .flow-title-row .flow-name {
  min-width: 0;
  margin: 0;
}
.flow-rename {
  flex-shrink: 0;
}
.flow-name {
  display: block;
  padding: 0;
  margin: 3px 0 8px;
  background: none;
  border: 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  color: #f4f4f5;
  min-height: 0;
  overflow-wrap: anywhere;
}
.flow-title-tools {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 22px;
  margin: 0 0 8px;
}
.flow-rename {
  padding: 4px 6px;
  font-size: 8px;
  background: #ffffff04;
  border: 1px solid #ffffff07;
  border-radius: 4px;
  min-height: 0;
  color: #a1a1aa;
}
.dialog label.mcp-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}
.dialog .mcp-choice input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  flex-shrink: 0;
}
.flow-sharing-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #ffffff0d;
}
.flow-sharing-settings h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #a1a1aa;
}
.flow-sharing-settings p {
  margin: 5px 0 0;
  font-size: 11px;
  color: #85858f;
}
.flow-sharing-settings button {
  color: #a1a1aa;
}
.flow-draft-label {
  font-size: 9px;
  color: #71717a;
}
.saved-flow-card .flow-replay-status {
  width: fit-content;
  margin: 0;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 500;
  border-radius: 4px;
  color: #a1a1aa;
  background: #ffffff04;
  border: 1px solid #ffffff08;
}
.saved-flow-card .flow-replay-status.success {
  color: #6ee7b7;
  background: #10b98110;
  border-color: #10b98124;
}
.saved-flow-card .flow-replay-status.failed {
  color: #fda4af;
  background: #f43f5e10;
  border-color: #f43f5e24;
}
.flow-profile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}
.flow-profile-row .small {
  padding: 4px 7px;
  min-height: 0;
  font-size: 9px;
  border: 0;
  color: #71717a;
  gap: 5px;
}
.flow-profile-row .small:first-child {
  background: #ffffff05;
  border-radius: 40px;
  color: #a1a1aa;
}
.flow-schema {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  border: 1px solid #6366f119;
  background: #09090b30;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0;
  font-size: 9px;
  line-height: 1.4;
  min-height: 41px;
}
.flow-schema > b {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #818cf8;
}
.flow-schema > span {
  padding: 2px 4px;
  border-radius: 3px;
  color: #a1a1aa;
  background: #ffffff04;
  border: 1px solid #ffffff08;
  font-family: monospace;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flow-schema > i {
  color: #52525b;
  font-style: normal;
  padding: 0 8px;
}
.flow-schema .integration-mini {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #3b5aea12;
  border-color: #3b5aea14;
  font-family: Inter, sans-serif;
  font-size: 8px;
}
.integration-mini img {
  width: auto;
  max-width: 27px;
  height: 11px;
  object-fit: contain;
  background: white;
  border-radius: 2px;
  padding: 1px;
}
.integration-mini svg {
  width: 11px;
  height: 11px;
}
.flow-card-controls {
  border-left: 1px solid #3b5aea15;
  flex: 0 0 124px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 20px;
  gap: 8px;
}
.saved-flow-card .flow-integrate {
  width: 100%;
  padding: 10px 12px;
  min-height: 36px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
  border: 1px solid #6366f132;
  border-radius: 12px;
  background: #1e293b;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.saved-flow-card .flow-card-actions {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 5px;
  justify-content: center;
}
.flow-card-actions button {
  display: grid;
  place-items: center;
  width: 27px;
  height: 35px;
  min-height: 35px;
  padding: 0;
  border: 1px solid #6366f118;
  border-radius: 10px;
  background: #6366f10e;
  color: #818cf8;
  font-size: 11px;
}
.flow-card-actions button[data-tooltip] {
  position: relative;
  overflow: visible;
}
.flow-card-actions button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 20;
  margin-top: 8px;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 6px;
  background: #09090b;
  color: #fff;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: normal;
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  box-shadow:
    0 0 0 1px #ffffff1a,
    0 4px 8px #0003;
  transition: opacity 0.15s;
}
.flow-card-actions button[data-tooltip]:is(:hover, :focus-visible)::after {
  visibility: visible;
  opacity: 1;
}
.flow-card-actions button:nth-child(2) {
  color: #c4b5fd;
  background: #8b5cf60e;
  border-color: #8b5cf618;
}
.flow-card-actions button:nth-child(3) {
  color: #6ee7b7;
  background: #10b9810e;
  border-color: #10b98118;
}
.flow-card-actions button.danger {
  color: #fda4af;
  background: #f43f5e0e;
  border-color: #f43f5e18;
}
.market-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 18px;
}
.market-categories button {
  font-size: 10px;
  padding: 6px 10px;
}
.market-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.market-sort {
  flex-shrink: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  font-size: 10px;
  color: #71717a;
  margin: 0;
}
.market-sort select {
  width: 132px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 50px;
  font-size: 11px;
  background: #18181b;
  border-color: #ffffff0a;
}
.market-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ffffff0b;
  background: transparent;
  border-radius: 50px;
  margin-bottom: 0;
  padding: 0 12px;
  height: 36px;
}
.market-search > svg {
  position: static;
  display: block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
}
.market-search #marketplace-search {
  flex: 1;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
  margin: 0;
  font-size: 11px;
}
.market-search #marketplace-search:focus-visible {
  outline: none;
}
.market-search:focus-within {
  border-color: #93b4fa;
  box-shadow: 0 0 0 1px #93b4fa;
}
.marketplace-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.marketplace-heading-actions .community-leaderboard-link {
  padding: 8px 12px;
  min-height: 34px;
  font-size: 11px;
  white-space: nowrap;
}
.section-heading .share-workflow {
  border-radius: 50px;
  background: #3b5aea;
  padding: 9px 14px;
  font-size: 11px;
  white-space: nowrap;
  min-height: 34px;
}
.marketplace-column .market-card {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 16px;
  padding: 18px;
  gap: 12px;
}
.market-card .flow-card-top {
  margin: 0;
}
.market-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 9px;
  color: #71717a;
}
.market-meta span {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.market-meta svg {
  height: 10px;
  width: 10px;
}
.market-card .market-description {
  font-size: 11px;
  line-height: 1.6;
  color: #a1a1aa;
  margin: 12px 0;
}
.market-card .card-bottom {
  padding: 10px 0 0;
  margin: 0;
  border: 0;
  min-height: 20px;
}
.market-card .flow-stats {
  font-size: 9px;
}
.market-card .card-bottom button {
  font-size: 10px;
}
.studio-page .empty {
  background: #18181b99;
  border: 1px solid #27272a;
  border-radius: 16px;
  padding: 36px 24px;
}
.studio-page .empty h3 {
  font-size: 16px;
}
.studio-page .empty p {
  font-size: 13px;
  max-width: 360px;
  margin: 10px auto 20px;
}
.studio-page .empty .primary {
  background: #3b5aea;
  border-radius: 50px;
  font-size: 12px;
}
.studio-page .studio-footer {
  display: none;
}
.live-viewer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 34;
  border-top: 1px solid #ffffff06;
  background: #18181bf5;
  backdrop-filter: blur(20px);
  box-shadow: 0 -15px 30px #0002;
}
.live-viewer-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 48px;
  height: 44px;
}
.live-viewer-bar > button {
  font-size: 11px;
  padding: 3px 0;
  border: 0;
  background: none;
  min-height: 26px;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  gap: 10px;
}
.live-viewer-bar > .live-viewer-toggle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
}
.live-viewer-bar > .live-viewer-toggle:focus-visible {
  outline-offset: -3px;
}
.live-viewer-label,
.live-viewer-chevron,
.live-viewer-bar .live-count {
  position: relative;
  pointer-events: none;
}
.live-viewer-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #a1a1aa;
}
.live-viewer-chevron {
  color: #a1a1aa;
  font-size: 11px;
}
.live-viewer-label i {
  color: #5c7aff;
  font-size: 16px;
}
.live-count {
  font-size: 10px;
  color: #818cf8;
  background: #3b5aea12;
  border: 1px solid #3b5aea22;
  border-radius: 4px;
  padding: 3px 8px;
  margin-left: auto;
}
.live-viewer-bar > button.small {
  position: relative;
  padding: 3px 8px;
  border: 1px solid #ffffff0a;
  border-radius: 4px;
  font-size: 10px;
}
.live-viewer-content {
  border-top: 1px solid #ffffff08;
  padding: 20px 48px;
  max-height: 40vh;
  overflow: auto;
  font-size: 13px;
}
.live-viewer-content p {
  margin: 0 0 5px;
}
.live-viewer-content small {
  color: #71717a;
}
.live-viewer-content > button {
  display: block;
  margin-top: 14px;
}
.live-viewer-content[hidden] {
  display: none;
}
.live-viewer-content.live-viewer-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.live-viewer-empty-copy p {
  color: #a1a1aa;
  font-size: 11px;
  line-height: 1.5;
  margin-bottom: 3px;
}
.live-viewer-empty-copy small {
  display: block;
  font-size: 10px;
  line-height: 1.5;
}
.live-viewer-empty > button {
  margin: 0;
  padding: 4px 0;
  font-size: 11px;
  color: #a1a1aa;
}
.live-viewer-content.live-viewer-empty[hidden] {
  display: none;
}
.dialog-backdrop {
  background: #0009;
  backdrop-filter: blur(7px);
}
.dialog {
  border: 1px solid #ffffff0e;
  border-radius: 24px;
  background: #18181b;
  box-shadow: 0 30px 100px #0008;
}
.dialog-header {
  border-bottom-color: #ffffff07;
}
.dialog-header .eyebrow {
  font-size: 9px;
  color: #71717a;
}
.dialog h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
}
.dialog form > p {
  font-size: 13px;
  line-height: 1.7;
}
.dialog .primary {
  background: #3b5aea;
  border-color: #3b5aea;
  border-radius: 12px;
}
.dialog input:not([type="checkbox"]):not([type="radio"]),
.dialog select,
.dialog textarea {
  background: #09090b77;
  border-color: #ffffff0c;
  border-radius: 12px;
}
.profiles-backdrop .dialog {
  width: min(1000px, calc(100vw - 40px));
  max-width: 1000px;
}
.profiles-backdrop .dialog-header .eyebrow {
  display: none;
}
.profiles-backdrop .dialog-header {
  padding-bottom: 12px;
}
.profile-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0;
}
.profile-modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid #ffffff0b;
  border-radius: 16px;
  background: #09090b40;
  padding: 22px;
  min-height: 200px;
  text-align: left;
  min-width: 0;
}
.profile-modal-card h3 {
  font-size: 15px;
  margin: 16px 0 4px;
}
.profile-modal-card p {
  font-size: 11px;
  color: #a1a1aa;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
.profile-modal-card .badge {
  position: absolute;
  right: 15px;
  top: 22px;
  font-size: 9px;
}
.profile-modal-card small {
  font-size: 10px;
  color: #71717a;
  line-height: 1.6;
}
.profile-service {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #3b5aea14;
  color: #8196ff;
  display: grid;
  place-items: center;
}
.profile-modal-card .actions {
  margin-top: auto;
  padding-top: 14px;
}
.profile-modal-card .actions button {
  font-size: 10px;
  padding: 6px 9px;
}
.profile-modal-card.add-profile {
  border-style: dashed;
  border-color: #27272a;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #18181b33;
  gap: 10px;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}
.add-profile > span {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: #27272a;
  color: #a1a1aa;
  display: grid;
  place-items: center;
  font-size: 24px;
  transition:
    color 0.15s,
    transform 0.15s;
}
.add-profile strong {
  font-size: 13px;
  color: #f4f4f5;
}
.add-profile small {
  color: #a1a1aa;
}
.profile-modal-foot {
  border-top: 1px solid #ffffff08;
  padding-top: 20px;
  color: #71717a;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px !important;
}
.profile-modal-foot svg {
  width: 13px;
  height: 13px;
}
/* Image avatars and the compact V5 icon chooser. */
.flow-avatar:has(.flow-avatar-image) {
  border-color: #27272a;
  background: #09090b;
  overflow: hidden;
}
.flow-avatar-image {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
}
.flow-avatar > .flow-avatar-image {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.flow-icon-backdrop.dialog-backdrop {
  padding: 16px;
  background: #000c;
  backdrop-filter: none;
}
.flow-icon-backdrop.dialog-backdrop > .dialog {
  width: min(448px, 100%);
  max-height: min(82dvh, 672px);
  border: 1px solid #27272a;
}
.flow-icon-backdrop.dialog-backdrop > .dialog > .dialog-header {
  min-height: 58px;
  padding: 12px 24px;
  background: #18181b80;
}
.flow-icon-backdrop.dialog-backdrop > .dialog > .dialog-header h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-transform: none;
}
.flow-icon-backdrop .dialog-header h2 > i {
  color: #d4d4d8;
}
.flow-icon-backdrop.dialog-backdrop > .dialog > form {
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}
.flow-icon-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
}
.flow-icon-picker > button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: 8px;
  border: 1px solid #27272a;
  border-radius: 8px;
  background: #18181b66;
}
.flow-icon-picker > button[aria-pressed="true"] {
  border-color: #71717a;
}
.flow-icon-picker > button:focus-visible {
  outline: 2px solid #a1a1aa;
  outline-offset: 2px;
}
.flow-icon-picker .flow-avatar-image {
  border: 1px solid #27272a;
  background: #09090b;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
}
.flow-icon-tooltip {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 20;
  margin-top: 8px;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 6px;
  background: #09090b;
  color: #fff;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow:
    0 0 0 1px #ffffff1a,
    0 4px 8px #0003;
  transition: opacity 0.15s;
}
.flow-icon-picker > button:is(:hover, :focus-visible) .flow-icon-tooltip {
  opacity: 1;
}
.flow-icon-upload {
  border: 1px solid #27272a;
  border-radius: 12px;
  background: #18181b66;
  padding: 16px;
}
.flow-icon-upload label {
  display: grid;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #d4d4d8;
}
.flow-icon-upload label i {
  margin-right: 6px;
  font-size: 10px;
  color: #71717a;
}
.flow-icon-backdrop .flow-icon-upload input[type="file"] {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 1px solid #27272a;
  border-radius: 8px;
  background: #09090bb3;
  color: #a1a1aa;
  font-size: 12px;
  cursor: pointer;
}
.flow-icon-upload input::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border: 0;
  background: #27272a;
  color: #e4e4e7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.flow-icon-upload .actions {
  justify-content: flex-end;
  margin-top: 12px;
}
.flow-icon-upload-button {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #e4e4e7;
  color: #18181b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.share-flow-list > button {
  display: flex;
  gap: 14px;
  width: 100%;
  align-items: center;
  border: 1px solid #ffffff0a;
  padding: 18px;
  margin-top: 10px;
  border-radius: 12px;
  background: #09090b40;
  text-align: left;
}
.share-flow-list > button > span {
  flex: 1;
}
.settings-illustration {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #3b5aea15;
  color: #a5b4fc;
  display: grid;
  place-items: center;
  margin: 20px 0;
}
.blue-coach {
  display: block;
  flex-shrink: 0;
  width: 120px;
  height: 133px;
  background-image: url("/reference/assets/coach.png");
  background-repeat: no-repeat;
  background-size: 600px 400px;
  background-position: -120px 0;
  filter: drop-shadow(0 10px 20px #3b5aea28);
}
.blue-coach[data-mood="thinking"] {
  background-position: -360px 0;
}
.blue-coach[data-mood="working"] {
  background-position: 0 -133px;
}
.blue-coach[data-mood="celebrating"] {
  background-position: -240px 0;
}
.coach-heading .blue-coach {
  width: 96px;
  height: 107px;
  background-size: 480px 320px;
  background-position: -288px 0;
}
.recorder-intro .intro-robot {
  margin: 0 auto 16px;
}
.onboarding-coach .blue-coach {
  margin: 0 auto 12px;
}
.auth-page,
.onboarding-page {
  background: #030303;
  background-image:
    radial-gradient(ellipse at 50% 38%, #3b5aea10, transparent 48%),
    linear-gradient(#ffffff03 1px, transparent 1px),
    linear-gradient(90deg, #ffffff03 1px, transparent 1px);
  background-size:
    auto,
    48px 48px,
    48px 48px;
}
.auth-page::before,
.onboarding-page::before {
  display: none;
}
.auth-layout {
  max-width: 448px;
  margin: auto;
  padding: 40px 0;
  min-height: 100vh;
  justify-content: center;
  gap: 0;
}
.auth-brand {
  margin: 0 auto 32px;
  position: static;
}
.auth-brand .brand {
  font-size: 20px;
  gap: 12px;
}
.auth-brand img {
  width: 40px;
  height: 40px;
  border-radius: 0;
}
.auth-card {
  width: 100%;
  padding: 32px;
  background: #09090b99;
  border: 1px solid #ffffff0d;
  border-radius: 24px;
  box-shadow: 0 4px 30px #0008;
  backdrop-filter: blur(24px);
}
.auth-card h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  font-weight: 700;
}
.auth-card h1 span {
  color: #5c7aff;
  text-shadow: 0 0 14px #3b5aea73;
}
.auth-card > p.muted {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0 0 24px;
}
.auth-card label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #94a3b8;
  margin-bottom: 8px;
}
.auth-card input {
  border: 1px solid #1e293bb3;
  background: #02061799;
  border-radius: 12px;
  padding: 10px 12px;
  height: 42px;
  font-size: 14px;
  color: #f1f5f9;
}
.auth-card form .primary {
  background: #3b5aea;
  border-color: #3b5aea;
  border-radius: 12px;
  font-size: 13px;
  height: 44px;
  margin-top: 22px;
}
.social-signin {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.social-signin button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid #ffffff0d;
  border-radius: 12px;
  padding: 11px 14px;
  background: #18181b66;
  color: #a1a1aa;
  font-size: 13px;
}
.social-signin button:disabled {
  opacity: 0.65;
}
.social-signin small {
  font-size: 10px;
  color: #71717a;
  text-align: center;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}
.auth-divider:before,
.auth-divider:after {
  content: "";
  height: 1px;
  flex: 1;
  background: #1e293bb3;
}
.auth-divider span {
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #94a3b8;
}
.auth-switch {
  font-size: 12px;
}
.auth-community {
  font-size: 11px;
}
.auth-benefits {
  display: none;
}
.auth-footer {
  position: static;
  margin-top: 24px;
  font-size: 11px;
}
.onboarding-wrap {
  max-width: 1024px;
  padding: 32px 0;
  margin: auto;
}
.onboarding-brand .brand {
  flex-direction: column;
  gap: 8px;
  font-size: 20px;
}
.onboarding-brand .brand img {
  width: 40px;
  height: 40px;
}
.onboarding-brand p {
  font-size: 14px;
  color: #94a3b8;
  margin-top: 8px;
}
.onboarding-usps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  list-style: none;
  padding: 0;
  margin: 20px 0 32px;
}
.onboarding-progress {
  display: none;
}
.onboarding-panel {
  border-radius: 24px;
  border: 1px solid #ffffff0d;
  background:
    radial-gradient(ellipse at 0 0, #3b5aea15, transparent 45%), #09090b99;
  box-shadow: 0 25px 70px #0006;
  grid-template-columns: 7fr 5fr;
}
.onboarding-panel > form {
  padding: 40px;
}
.onboarding-panel h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.onboarding-panel > .onboarding-coach {
  border-left: 1px solid #ffffff08;
  background:
    radial-gradient(ellipse at 50% 20%, #3b5aea12, transparent 60%), #18181b50;
  padding: 40px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.onboarding-coach h2 {
  font-size: 24px;
  line-height: 1.35;
  color: #f4f4f5;
}
.onboarding-coach p {
  font-size: 12px;
  line-height: 1.8;
  color: #94a3b8;
}
.onboarding-panel.terms-panel {
  max-width: 768px;
  margin: auto;
  display: block;
}
.onboarding-terms {
  height: min(56vh, 448px);
  max-height: 448px;
  padding: 24px;
  background: #09090b99;
  border: 1px solid #ffffff0d;
  border-radius: 16px;
}
.acceptance {
  border: 1px solid #3b5aea4d;
  background: #3b5aea1a;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 0 20px #3b5aea19;
}
.acceptance span {
  font-size: 14px;
  font-weight: 700;
}
.acceptance small {
  font-size: 12px;
  font-weight: 400;
  color: #bfdbfecc;
}
.onboarding-panel .primary {
  border-radius: 12px;
  background: #3b5aea;
  border-color: #3b5aea;
  padding: 12px 24px;
  font-size: 13px;
}
.onboarding-panel.platform-panel {
  max-width: 896px;
  display: block;
  margin: 0 auto;
}
.platform-panel .platform-choices {
  gap: 16px;
}
.platform-choices .choice-card {
  padding: 16px;
  background: #18181b66;
  border: 1px solid #ffffff1a;
  border-radius: 16px;
  min-height: 164px;
}
.platform-choices .choice-card:has(:checked) {
  border-color: #3b5aea80;
  background: #3b5aea1a;
  box-shadow: 0 0 0 1px #3b5aea80;
}
.platform-choices .platform-symbol {
  background: #fffffff2;
  height: 28px;
  width: max-content;
  padding: 5px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
}
.platform-choices .platform-symbol img {
  height: 14px;
  width: auto;
  max-width: 65px;
  object-fit: contain;
}
.platform-choices .platform-symbol.api {
  background: #3b5aea1a;
  color: #93c5fd;
}
.platform-choices .choice-card strong {
  font-size: 15px;
}
.platform-choices .choice-card small {
  font-size: 12px;
  color: #94a3b8;
}
.builder-backdrop .dialog {
  background:
    radial-gradient(ellipse at 15% 0, #3b5aea12, transparent 50%), #18181b;
  border-radius: 24px;
}
.builder-backdrop .builder-rail {
  background: #09090b66;
  border-color: #ffffff08;
}
.builder-rail li.current > span {
  background: #3b5aea;
}
.builder-rail li.current {
  color: #a5b4fc;
}
.builder-title h3 {
  font-weight: 700;
  letter-spacing: -0.025em;
}
.studio-sidebar {
  background: #18181b !important;
}
@media (min-width: 1500px) {
  .flow-card-controls {
    flex-basis: 142px;
  }
  .flow-card-actions button {
    width: 31px;
  }
}
@media (max-width: 1190px) {
  .studio-page .studio-header {
    padding: 0 24px;
  }
  .studio-page .content {
    padding: 28px 24px 90px;
  }
  .header-option {
    display: none !important;
  }
  .dashboard-columns {
    gap: 24px;
  }
  .studio-page .card.saved-flow-card {
    padding: 16px;
    gap: 14px;
  }
  .flow-card-controls {
    flex-basis: 110px;
    padding-left: 14px;
  }
  .flow-schema .integration-mini:not(:last-child) {
    display: none;
  }
  .live-viewer-bar {
    padding: 7px 24px;
  }
}
@media (max-width: 1000px) {
  .studio-header .sidebar-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
  }
  .navigation-open .studio-sidebar {
    top: 80px;
    padding: 8px;
  }
  .studio-sidebar .workspace-nav {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 920px) {
  .dashboard-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-columns > .marketplace-column {
    border-top: 1px solid #ffffff08;
    padding-top: 24px;
  }
  .flow-schema .integration-mini:not(:last-child) {
    display: inline-flex;
  }
  .profile-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .onboarding-wrap {
    padding: 24px;
  }
  .studio-header .header-tools > button.primary {
    padding: 0 12px;
  }
}
@media (max-width: 720px) {
  .studio-header .global-search {
    display: none;
  }
}
@media (max-width: 620px) {
  .navigation-open .studio-sidebar {
    top: 72px;
  }
  .studio-page .studio-header {
    height: 64px;
    min-height: 64px;
    padding: 0 14px;
    gap: 10px;
  }
  .studio-header .global-search {
    display: none;
  }
  .studio-header .header-profile {
    display: none !important;
  }
  .studio-header .brand span {
    display: none;
  }
  .studio-header .header-tools {
    gap: 8px;
  }
  .studio-header .sidebar-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
  }
  .studio-page .content {
    padding: 24px 16px 80px;
  }
  .studio-page .card.saved-flow-card {
    flex-direction: column;
  }
  .flow-card-controls {
    border-left: 0;
    border-top: 1px solid #ffffff08;
    padding: 12px 0 0;
    flex-direction: row;
    flex-basis: auto;
    justify-content: space-between;
    align-items: center;
  }
  .saved-flow-card .flow-integrate {
    width: auto;
    flex: 1;
    max-width: 180px;
  }
  .flow-card-actions button {
    width: 34px;
  }
  .flow-schema {
    padding: 10px;
    font-size: 8px;
    gap: 4px;
  }
  .flow-schema > i {
    padding: 0 3px;
  }
  .flow-schema .integration-mini:not(:last-child) {
    display: none;
  }
  .section-heading .share-workflow {
    font-size: 10px;
    padding: 8px 10px;
  }
  .market-categories {
    gap: 4px;
  }
  .market-categories button {
    font-size: 9px;
    padding: 5px 8px;
  }
  .live-viewer-bar {
    padding: 7px 16px;
    gap: 9px;
  }
  .live-viewer-content {
    padding: 20px 16px;
  }
  .profile-modal-grid {
    grid-template-columns: 1fr;
  }
  .profile-modal-card {
    min-height: 170px;
  }
  .auth-layout {
    width: auto;
    margin: 0 16px;
    padding: 30px 0;
  }
  .auth-card {
    padding: 28px;
  }
  .onboarding-wrap {
    padding: 24px 16px;
  }
  .onboarding-panel {
    display: block;
  }
  .onboarding-panel > form {
    padding: 24px;
  }
  .onboarding-panel > .onboarding-coach {
    display: none;
  }
  .onboarding-usps {
    gap: 10px;
    font-size: 10px;
  }
  .onboarding-panel h1 {
    font-size: 26px;
  }
  .platform-panel .platform-choices {
    grid-template-columns: 1fr;
  }
  .platform-choices .choice-card {
    min-height: 120px;
  }
  .onboarding-terms {
    padding: 18px;
  }
  .profile-modal-foot {
    align-items: flex-start;
  }
  .studio-header .header-tools > button.primary {
    font-size: 12px;
    gap: 6px;
  }
  .studio-header .header-tools > button.primary > span {
    display: inline;
  }
  .studio-header .header-tools > button.primary .ui-icon {
    width: 16px;
  }
}

/* Original recorder startup treatment: dark atmosphere and moving gradient type. */
.browser-node-loader {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 42%,
      rgba(92, 122, 255, 0.16),
      transparent 32%
    ),
    radial-gradient(
      circle at 35% 62%,
      rgba(139, 92, 246, 0.08),
      transparent 30%
    ),
    #07080c;
}

.browser-node-loader[hidden] {
  display: none !important;
}

.flow-recorder-screen > .browser-node-loader {
  display: flex;
  flex-direction: column;
  place-items: initial;
}

.browser-node-loader-body {
  display: flex;
  min-height: 0;
  width: 100%;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem;
}

.browser-node-loader-copy {
  min-width: 0;
  text-align: center;
}

.browser-node-loader-copy > h3 {
  margin: 0 0 0.35rem;
  background: linear-gradient(
    100deg,
    #f4f4f5 20%,
    #f4f4f5 38%,
    #a5b4fc 49%,
    #67e8f9 54%,
    #f4f4f5 66%,
    #f4f4f5 82%
  );
  background-position: 100% 50%;
  background-size: 240% 100%;
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  animation: browser-node-loader-shimmer 3.2s ease-in-out infinite;
}

.browser-node-loader-words {
  position: relative;
  width: min(32rem, 88vw);
  height: 1.45rem;
  overflow: hidden;
  color: rgb(147, 197, 253);
  font-size: clamp(0.62rem, 1.6vw, 0.78rem);
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.45rem;
  text-transform: uppercase;
}

.browser-node-loader-word {
  --browser-node-loader-word-delay: 0s;
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  background: linear-gradient(90deg, #93c5fd 0%, #c4b5fd 45%, #67e8f9 100%);
  background-position: 100% 50%;
  background-size: 220% 100%;
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  white-space: nowrap;
  transform: translateY(0.55rem);
  animation:
    browser-node-loader-word 10s ease-in-out
      var(--browser-node-loader-word-delay) 1 both,
    browser-node-loader-shimmer 3.2s ease-in-out infinite;
}

.browser-node-loader-word:nth-child(2) {
  --browser-node-loader-word-delay: 10s;
}
.browser-node-loader-word:nth-child(3) {
  --browser-node-loader-word-delay: 20s;
}
.browser-node-loader-word:nth-child(4) {
  --browser-node-loader-word-delay: 30s;
}
.browser-node-loader-word:nth-child(5) {
  --browser-node-loader-word-delay: 40s;
}
.browser-node-loader-word:nth-child(6) {
  --browser-node-loader-word-delay: 50s;
}
.browser-node-loader-word:nth-child(7) {
  --browser-node-loader-word-delay: 60s;
}
.browser-node-loader-word:nth-child(8) {
  --browser-node-loader-word-delay: 70s;
}

.browser-node-loader-word:last-child {
  animation:
    browser-node-loader-word-final 10s ease-in-out
      var(--browser-node-loader-word-delay) 1 both,
    browser-node-loader-shimmer 3.2s ease-in-out infinite;
}

@keyframes browser-node-loader-shimmer {
  0%,
  18% {
    background-position: 100% 50%;
  }
  72%,
  100% {
    background-position: 0% 50%;
  }
}

@keyframes browser-node-loader-word {
  0% {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  5%,
  92% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-0.3rem);
  }
}

@keyframes browser-node-loader-word-final {
  0% {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  5%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-backdrop .dialog {
  background: #07080c !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none;
}
.loading-backdrop .browser-node-loader {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
}
.loading-backdrop .loading-back {
  position: fixed;
  z-index: 61;
  top: max(20px, env(safe-area-inset-top));
  left: max(20px, env(safe-area-inset-left));
  min-height: 40px;
  padding: 8px 12px;
  color: #d4d4d8;
  font-size: 13px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
}
.loading-backdrop .loading-back:is(:hover, :focus-visible) {
  background: #101014;
  border-color: #ffffff1a;
}
.loading-backdrop .loading-back i {
  width: 16px;
  font-size: 14px;
}
.browser-node-loader:not(.loading-backdrop .browser-node-loader) {
  position: relative;
  min-height: 320px;
  border-radius: 16px;
}
.browser-node-loader-copy h3 {
  line-height: 1.5;
}
.browser-node-loader-words {
  margin: auto;
}
.browser-node-loader-word:nth-child(2) {
  --browser-node-loader-word-delay: 6s;
}
.browser-node-loader-word:nth-child(3) {
  --browser-node-loader-word-delay: 12s;
}
.browser-node-loader-word {
  animation-duration: 6s, 3.2s;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.builder-backdrop:not(.loading-backdrop) .dialog {
  border-radius: 12px;
  width: min(1536px, calc(100vw - 64px));
  max-width: 1536px;
  background: #09090b;
  border-color: #ffffff1a;
}
.builder-backdrop .dialog-header {
  min-height: 64px;
  padding: 20px 24px;
  background: #18181bf2;
  border-bottom: 1px solid #ffffff0d;
  border-radius: 0;
}
.builder-backdrop .dialog-header h2 {
  font-size: 14px;
  font-weight: 600;
}
.builder-backdrop .builder-layout {
  grid-template-columns: minmax(0, 1fr) 220px;
}
.builder-backdrop .builder-content {
  padding: 26px 42px 64px;
}
.builder-backdrop .builder-rail {
  background: #09090b;
  padding: 24px 20px;
  border-left: 1px solid #ffffff0d;
}
.builder-rail li {
  gap: 12px;
  margin-bottom: 18px;
}
.builder-rail li:not(:last-child)::after {
  display: none;
}
.builder-rail li > span {
  width: 29px;
  height: 29px;
  min-width: 29px;
  border: 1px solid #ffffff0d;
  border-radius: 50%;
  background: #ffffff02;
  color: #52525b;
  font-size: 11px;
  display: grid;
  place-items: center;
}
.builder-rail li.current {
  color: #f4f4f5;
}
.builder-rail li.current > span {
  color: #a5b4fc;
  background: #3b5aea12;
  border: 1px solid #6366f199;
  box-shadow: 0 0 0 3px #6366f108;
}
.builder-rail li > div {
  font-size: 11px;
  font-weight: 600;
}
.builder-backdrop .builder-title h3 {
  font-size: 24px;
  font-weight: 600;
}
.builder-backdrop .builder-title .eyebrow {
  color: #a5b4fc;
  font-size: 10px;
}
.builder-backdrop .builder-title p {
  font-size: 13px;
  color: #71717a;
}
.builder-backdrop .builder-content .primary {
  border-radius: 50px;
  padding: 13px 30px;
  font-weight: 600;
}
.builder-backdrop input[type="url"] {
  background: #ffffff03;
  border-color: #ffffff1a;
  border-radius: 16px;
  min-height: 47px;
}
.builder-switch {
  border-color: #ffffff14 !important;
  background: #ffffff02 !important;
}
.builder-title {
  padding-bottom: 22px;
  margin-bottom: 26px;
}
.builder-setup .builder-content {
  padding-bottom: 30px;
}
.builder-setup-section {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.builder-setup-section h4,
.builder-setup-section legend {
  padding: 0;
  margin: 0 0 12px;
  color: #f4f4f5;
  font-size: 14px;
  font-weight: 600;
}
.builder-setup-section .muted {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
}
.builder-setup-section input[type="url"] {
  padding: 13px 16px;
  border-radius: 12px;
}
.builder-setup #builder-profile label {
  font-size: 12px;
}
.builder-login-section {
  margin-top: 28px;
}
.builder-setup .login-options {
  gap: 12px;
}
.builder-setup .login-options .choice-card {
  min-height: 80px;
  padding: 16px;
  gap: 12px;
  border-radius: 12px;
}
.builder-setup .choice-card strong {
  font-size: 13px;
  font-weight: 600;
}
.builder-setup .choice-card small {
  font-size: 12px;
  line-height: 1.5;
}
.builder-setup #builder-profile {
  margin-top: 16px;
}
.builder-setup #builder-add-profile {
  margin-top: 10px;
  color: #a5b4fc;
}
.builder-setup .actions {
  margin-top: 24px;
  padding-top: 20px;
}
.pattern-status strong {
  display: block;
  font-size: 14px;
  color: #f4f4f5;
}
.pattern-status p {
  margin: 6px 0 0;
  color: #a1a1aa;
  font-size: 12px;
  line-height: 1.6;
}
.pattern-examples {
  list-style: none;
  display: grid;
  gap: 7px;
  padding: 0;
  margin: 12px 0;
  max-height: 160px;
  overflow: auto;
}
.pattern-examples > li,
.pattern-examples > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: #ffffff04;
  border: 1px solid #ffffff0d;
  border-radius: 10px;
}
.pattern-examples span {
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 600;
}
.pattern-examples p {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 12px;
  line-height: 1.5;
  color: #d4d4d8;
  overflow-wrap: anywhere;
}
.pattern-secondary {
  display: flex;
  gap: 8px;
}
.pattern-preview {
  font-size: 12px;
  color: #a1a1aa;
}
.pattern-preview summary {
  cursor: pointer;
}
.pattern-preview ol {
  padding-left: 20px;
  max-height: 150px;
  overflow: auto;
  overflow-wrap: anywhere;
}
.pattern-preview li {
  padding: 6px 0;
}
.auth-card h1,
.auth-card > p.muted {
  text-align: left;
}
.auth-page .auth-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.auth-page .auth-brand {
  width: auto;
}
.auth-page .auth-footer {
  flex: none;
}
.onboarding-step-1 .onboarding-brand {
  display: none;
}
.onboarding-step-1 .onboarding-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.onboarding-panel > .onboarding-coach {
  justify-content: space-between;
  text-align: left;
  background:
    radial-gradient(ellipse at top left, #3b5aea26, transparent 50%), #09090bcc;
  padding: 40px;
}
.onboarding-coach h2 {
  font-size: 24px;
  margin: 8px 0 28px;
}
.growth-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.growth-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
}
.growth-benefits li > i {
  color: #3b5aea;
  margin-top: 3px;
}
.growth-benefits strong {
  display: block;
  font-size: 14px;
  color: #fff;
}
.growth-benefits span {
  display: block;
  font-size: 12px;
  line-height: 1.7;
  color: #94a3b8;
  margin-top: 2px;
}
.onboarding-review {
  margin-top: 48px;
  padding: 20px;
  border: 1px solid #ffffff0d;
  border-radius: 16px;
  background: #ffffff0d;
}
.onboarding-review > div {
  font-size: 10px;
  color: #eab308;
  letter-spacing: 2px;
}
.onboarding-review p {
  font-size: 13px;
  color: #cbd5e1;
  font-style: italic;
  line-height: 1.7;
  margin: 8px 0;
}
.onboarding-review small {
  color: #71717a;
  font-size: 9px;
}
.onboarding-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.onboarding-divider {
  border: 0;
  border-top: 1px solid #ffffff0d;
  margin: 28px 0;
}
.onboarding-step-1 h1 {
  font-size: 24px;
}
.onboarding-step-1 fieldset legend,
.onboarding-step-1 label:not(.choice-card) {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #94a3b8;
}
.market-search input {
  border: 0 !important;
  box-shadow: none !important;
  background: none !important;
}
.auth-layout .auth-card {
  flex: none;
}
@media (max-width: 620px) {
  .builder-backdrop:not(.loading-backdrop) .dialog {
    width: calc(100vw - 16px);
  }
  .builder-backdrop .builder-layout {
    display: flex;
    flex-direction: column-reverse;
  }
  .builder-backdrop .builder-content {
    padding: 24px;
  }
  .builder-backdrop .builder-rail {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    border-left: 0;
    border-bottom: 1px solid #ffffff0d;
  }
  .builder-rail li {
    margin: 0;
  }
  .builder-rail li > div {
    display: none;
  }
  .onboarding-fields-row {
    grid-template-columns: 1fr;
  }
  .auth-page .auth-layout {
    min-height: 100dvh;
  }
  .onboarding-step-1 .onboarding-panel {
    display: block;
  }
  .onboarding-step-1 .onboarding-wrap {
    padding-top: 30px;
  }
  .browser-node-loader-words {
    font-size: 9px;
    letter-spacing: 0.02em;
  }
}
@media (prefers-reduced-motion: reduce) {
  .browser-node-loader-word {
    display: none;
    animation: none;
    opacity: 1;
    transform: none;
  }
  .browser-node-loader-word:first-child {
    display: block;
  }
  .browser-node-loader-copy h3 {
    animation: none;
  }
}
.loading-backdrop .loader-hint {
  display: none;
}
.browser-node-loader-copy .loader-hint {
  font-size: 11px;
  color: #71717a;
  margin-top: 24px;
}
.profiles-backdrop .dialog {
  width: min(1152px, calc(100vw - 48px));
  max-width: 1152px;
  min-height: min(650px, 85vh);
  background: #09090b;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
.profiles-backdrop .dialog-header {
  background: #18181bf2;
  padding: 16px 24px;
  border-bottom: 1px solid #ffffff0d;
}
.profiles-backdrop .dialog-header h2 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.profiles-backdrop .dialog > form {
  padding: 24px 32px;
  flex: 1;
}
.profile-quick-fill {
  display: flex;
  gap: 8px;
  margin: 12px 0 24px;
}
.profile-quick-fill button {
  width: 42px;
  height: 35px;
  padding: 0;
  background: #18181b;
  color: #a1a1aa;
  border: 1px solid #27272a;
  font-size: 16px;
}
.recorder-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #0009;
}
.recorder-intro > .blue-coach {
  width: 120px;
  height: 133px;
  align-self: center;
  transform: scale(1.35);
  margin: 0 10px 0 0;
}
.recorder-intro .dialog {
  width: 430px;
  max-width: calc(100vw - 180px);
  background: #09090bf2;
  border: 1px solid #bfdbfe40;
  border-radius: 24px;
  box-shadow: 0 30px 90px #000b;
  text-align: left;
  position: relative;
  margin: 0;
  padding: 24px;
}
.recorder-intro .dialog-header {
  padding: 0;
  border: 0;
  align-items: start;
}
.recorder-intro .dialog-header .eyebrow {
  display: block;
  color: #93c5fd;
  font-size: 9px;
  margin-bottom: 8px;
}
.recorder-intro .dialog-header h2 {
  font-size: 20px;
  line-height: 1.4;
}
.recorder-intro .dialog > form {
  padding: 0;
}
.recorder-intro .dialog form > .eyebrow {
  display: none;
}
.recorder-intro .dialog p {
  font-size: 13px;
  line-height: 1.7;
  margin: 14px 0 22px;
  color: #94a3b8;
}
.recorder-intro .actions {
  justify-content: flex-start;
}
.recorder-intro .primary {
  border-radius: 50px;
  font-size: 12px;
}
.account-page {
  max-width: 896px;
  margin: 8px auto 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.account-hero {
  padding: 24px;
  border: 1px solid #ffffff1a;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at right top, #3b5aea14, transparent 60%), #18181b66;
  box-shadow: 0 20px 45px #0002;
  margin-bottom: 8px;
}
.account-hero > .badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: #3b5aea1a;
  border: 1px solid #3b5aea4d;
  color: #93c5fd;
  font-size: 11px;
  border-radius: 50px;
  padding: 5px 12px;
}
.account-hero > .badge svg {
  width: 12px;
  height: 12px;
}
.account-hero h1 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 0;
  margin: 16px 0 10px;
}
.account-hero p {
  font-size: 14px;
  color: #a1a1aa;
  max-width: 450px;
  line-height: 1.7;
  margin: 0;
}
.account-section {
  padding: 24px;
  border: 1px solid #ffffff0d;
  border-radius: 24px;
  background: linear-gradient(#ffffff02, transparent), #18181b66;
  box-shadow: 0 15px 30px #0002;
}
.account-section h2 {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: #d4d4d8;
  letter-spacing: 0;
}
.account-section h2 i {
  color: #71717a;
}
.account-section > p {
  font-size: 13px;
  color: #a1a1aa;
  line-height: 1.8;
  margin: 0 0 24px;
  max-width: 600px;
}
.account-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.account-detail-grid > div {
  padding: 20px;
  background: #0006;
  border: 1px solid #ffffff0d;
  border-radius: 16px;
}
.account-detail-grid span {
  font-size: 11px;
  color: #71717a;
  display: block;
}
.account-detail-grid strong {
  display: block;
  font-size: 16px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.account-billing-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 20px;
  margin-bottom: 24px;
  border: 1px solid #ffffff0d;
  border-radius: 16px;
  background: #0005;
}
.account-billing-summary > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.account-billing-summary > div:last-child {
  text-align: right;
}
.account-billing-summary strong {
  color: #f4f4f5;
  font-size: 14px;
  font-weight: 600;
}
.account-billing-summary span,
.account-billing-test {
  color: #a1a1aa;
  font-size: 12px;
  line-height: 1.6;
}
.account-billing .actions {
  margin-top: 0;
}
.account-billing .primary {
  gap: 9px;
}
.account-billing-test {
  display: block;
  margin-top: 16px;
  color: #71717a;
}
@media (max-width: 620px) {
  .account-billing-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
  .account-billing-summary > div:last-child {
    text-align: left;
  }
  .account-billing .actions > button {
    width: 100%;
  }
}
.marketplace-profile-fields {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
}
.marketplace-avatar {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  color: white;
  background: #3b5aea;
  border: 1px solid #ffffff1a;
  border-radius: 16px;
  font-size: 36px;
  font-weight: 700;
}
.account-section input:not([type="checkbox"]):not([type="radio"]),
.account-section textarea {
  background: #0006;
  border: 1px solid #ffffff1a;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
}
.account-section label:not(.choice-card) {
  font-size: 11px;
  color: #71717a;
}
#notification-preferences > label,
#email-preferences > label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: #d4d4d8;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}
#notification-preferences input[type="checkbox"],
#email-preferences input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
}
.account-section .primary {
  font-size: 12px;
  border-radius: 50px;
  background: #3b5aea;
  padding: 11px 24px;
  min-height: 42px;
}
.account-connections .actions {
  flex-wrap: wrap;
}
.account-platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.account-platforms .choice-card {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  border-radius: 16px;
  padding: 16px;
  background: #0005;
  border-color: #ffffff1a;
}
.account-platforms .choice-card:has(:checked) {
  border-color: #3b5aea88;
  background: #3b5aea1a;
}
.account-api-list > button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 10px;
  background: #0005;
  border: 1px solid #ffffff0d;
  border-radius: 12px;
  padding: 16px;
  font-size: 12px;
  margin-bottom: 8px;
}
.account-api-list > button span {
  margin-right: auto;
}
.account-plan-note {
  border: 1px solid #ffffff0d;
  background: #0005;
  border-radius: 16px;
  padding: 20px;
  font-size: 12px;
  color: #a1a1aa;
}
.account-plan-note p {
  line-height: 1.8;
}
.account-policy {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  font-size: 11px;
  color: #71717a;
}
.integration-tabs button {
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 112px;
  gap: 10px;
}
.integration-tabs .platform-symbol {
  width: 104px;
  max-width: 100%;
  height: 36px;
  background: none !important;
  border: 0 !important;
}
.integration-tabs .platform-symbol img {
  width: 80px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.integration-tabs .platform-symbol:is(.make, .n8n) img {
  filter: brightness(0) invert(1);
}
.integration-tabs .platform-symbol.n8n img {
  width: 74px;
}
.integration-tabs .platform-symbol:is(.chatgpt, .claude) img,
.integration-tabs .platform-symbol > svg {
  height: 26px;
  width: 26px;
}
@media (max-width: 480px) {
  .integration-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.integration-backdrop {
  --integration-accent: 168, 85, 247;
  --integration-text: #c4b5fd;
  --integration-solid: #7e22ce;
}
.integration-backdrop > .dialog,
.dialog:has([data-flow-mcp]) {
  width: min(800px, calc(100vw - 32px));
  min-width: 0;
}
.dialog [data-flow-mcp] .row {
  flex-wrap: wrap;
}
.dialog [data-flow-mcp] .row input {
  flex: 1 1 180px;
  min-width: 0;
}
.dialog [data-flow-mcp] .integration-step > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.integration-backdrop:has([data-platform="n8n"][aria-pressed="true"]) {
  --integration-accent: 234, 75, 113;
  --integration-text: #fda4af;
  --integration-solid: #be3454;
}
.integration-backdrop:has([data-platform="api"][aria-pressed="true"]) {
  --integration-accent: 59, 130, 246;
  --integration-text: #93c5fd;
  --integration-solid: #2563eb;
}
.integration-backdrop .integration-tabs button[aria-pressed="true"] {
  border-color: rgba(var(--integration-accent), 0.4);
  background: rgba(var(--integration-accent), 0.05);
}
.integration-backdrop .integration-step > b {
  color: var(--integration-text);
  background: rgba(var(--integration-accent), 0.1);
}
.integration-backdrop .dialog .primary {
  background: var(--integration-solid);
}
.integration-backdrop :is(button, input, a):focus-visible {
  outline-color: var(--integration-text);
}
.recorder-coach.is-minimized .blue-coach {
  display: none;
}
@media (max-width: 620px) {
  .recorder-intro {
    gap: 0;
    flex-direction: column;
  }
  .recorder-intro > .blue-coach {
    transform: none;
    margin: 0;
  }
  .recorder-intro .dialog {
    width: calc(100vw - 32px);
    max-width: none;
    padding: 22px;
  }
  .account-page {
    margin-top: 0;
  }
  .account-hero {
    padding: 20px;
  }
  .account-hero h1 {
    font-size: 28px;
  }
  .account-section {
    padding: 20px;
  }
  .account-detail-grid {
    grid-template-columns: 1fr;
  }
  .marketplace-profile-fields {
    grid-template-columns: 1fr;
  }
  .account-platforms {
    grid-template-columns: 1fr;
  }
  .profiles-backdrop .dialog > form {
    padding: 20px;
  }
  .profiles-backdrop .dialog {
    width: calc(100vw - 20px);
  }
  .account-policy {
    flex-wrap: wrap;
  }
}
.recorder-intro {
  padding: 24px;
}
.recorder-intro > .blue-coach {
  position: static;
  left: auto;
  top: auto;
}
.global-search input {
  border: 0 !important;
  box-shadow: none !important;
  background: none !important;
}
.saved-flow-card .flow-profile-row {
  justify-content: flex-start;
  margin: 4px 0 0;
}
.profiles-backdrop .profile-modal-foot {
  margin-top: auto;
}

/* Shared Browserflow surfaces and controls, following the public homepage. */
:root {
  --bf-text: #f4f4f5;
  --bf-muted: #a1a1aa;
  --bf-edge: #ffffff14;
  --bf-surface: #111216;
  --bf-blue: #3b5aea;
}
.auth-card,
.onboarding-panel,
.account-section,
.dialog {
  border-color: var(--bf-edge);
}
.auth-card h1 span {
  color: #93b4fa;
  text-shadow: none;
}
.auth-card input,
.onboarding-panel input:not([type="checkbox"]):not([type="radio"]),
.onboarding-panel select,
.account-section input:not([type="checkbox"]):not([type="radio"]),
.account-section textarea {
  background: #09090b;
  border-color: #ffffff1a;
  color: var(--bf-text);
}
.auth-card > p.muted,
.onboarding-brand p,
.onboarding-coach p,
.auth-card label {
  color: var(--bf-muted);
}
.auth-card form .primary,
.onboarding-panel .primary,
.account-section .primary,
.dialog .primary {
  background: var(--bf-blue);
  border: 1px solid #ffffff14;
  border-radius: 999px;
  color: #fff;
  box-shadow: inset 0 1px 0 #ffffff14;
  text-shadow: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #93b4fa;
  outline-offset: 4px;
}
.account-hero h1 {
  letter-spacing: -0.035em;
}
.subscription-section {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--bf-edge);
  border-radius: 24px;
  background: #0b0c0f;
  box-shadow: 0 24px 80px #0003;
}
.subscription-story {
  padding: 36px;
  background: radial-gradient(ellipse at 0 100%, #3b5aea13, transparent 65%);
}
.subscription-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--bf-text);
}
.subscription-section h2 i {
  color: #7099f8;
  font-size: 20px;
}
.subscription-intro {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--bf-muted);
}
.subscription-benefits {
  display: grid;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 28px 0;
}
.subscription-benefits li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.subscription-benefits .ui-icon {
  box-sizing: content-box;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  padding: 8px;
  background: #3b5aea12;
  border: 1px solid #7099f81a;
  border-radius: 10px;
  color: #85a7f6;
}
.subscription-benefits strong,
.subscription-workflow strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  color: #e4e4e7;
}
.subscription-benefits span,
.subscription-workflow span:not(.blue-coach) {
  display: block;
  font-size: 11px;
  color: var(--bf-muted);
  line-height: 1.6;
  margin-top: 3px;
}
.subscription-workflow {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--bf-edge);
}
.subscription-workflow .blue-coach {
  flex: 0 0 120px;
  zoom: 0.58;
  margin: 0;
}
.subscription-checkout {
  padding: 36px;
  border-left: 1px solid var(--bf-edge);
  background: linear-gradient(145deg, #ffffff04, transparent), #111216;
}
.subscription-plan-label {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--bf-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.subscription-plan-label .badge {
  font-size: 9px;
  letter-spacing: 0.02em;
  font-weight: 500;
  border: 1px solid #ffffff14;
  background: #ffffff05;
  color: #c4c4cd;
  padding: 5px 9px;
  text-transform: none;
}
.subscription-checkout h3 {
  margin: 28px 0 12px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.account-section .subscription-price {
  margin: 0;
  color: #fafafa;
  font-size: 48px;
  line-height: 1.2;
  letter-spacing: -0.05em;
  font-weight: 600;
}
.subscription-price small {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--bf-muted);
}
.subscription-trial-title {
  margin: 18px 0 14px;
  color: #fafafa;
  font-size: clamp(40px, 4.5vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.subscription-after-trial {
  margin: 0;
  color: var(--bf-muted);
  font-size: 14px;
  line-height: 1.6;
}
.subscription-after-trial strong {
  color: #d4d4d8;
  font-weight: 500;
}
.subscription-price-caption {
  margin: 8px 0 24px;
  color: var(--bf-muted);
  font-size: 11px;
}
.subscription-message {
  margin: 0 0 20px;
  padding-top: 20px;
  border-top: 1px solid var(--bf-edge);
  font-size: 12px;
  line-height: 1.8;
  color: #c4c4cd;
}
.subscription-message strong {
  color: var(--bf-text);
}
.subscription-checkout button {
  width: 100%;
  min-height: 42px;
  font-size: 12px;
  white-space: normal;
  border-radius: 999px;
}
.subscription-checkout .primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.subscription-section .actions {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}
.subscription-section .actions:empty {
  display: none;
}
.subscription-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 16px 0;
  color: var(--bf-muted);
  font-size: 10px;
}
.subscription-secure .ui-icon {
  width: 12px;
  height: 12px;
}
.billing-test-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 10px;
  margin: 20px 0 12px;
  background: #3b5aea0c;
  border: 1px solid #7099f822;
  border-radius: 9px;
  color: var(--bf-muted);
  font-size: 10px;
  line-height: 1.6;
}
.billing-test-banner > span {
  color: #93b4fa;
  font-size: 8px;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.subscription-fineprint {
  margin: 0;
  font-size: 10px;
  color: #92929d;
  line-height: 1.7;
}
.onboarding-billing {
  max-width: 1040px;
  padding: 28px 24px 30px;
}
.billing-brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.billing-brandbar .brand {
  font-size: 17px;
  gap: 10px;
}
.billing-brandbar .brand img {
  width: 30px;
  height: 30px;
  border-radius: 0;
}
.billing-step-label {
  color: var(--bf-muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.billing-step-label > span {
  margin: 0 8px;
  color: #52525b;
}
.billing-onboarding-heading {
  text-align: center;
  margin: 40px auto 30px;
}
.billing-onboarding-heading > .subscription-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  vertical-align: middle;
  border: 1px solid var(--bf-edge);
  padding: 8px 12px;
  border-radius: 999px;
  background: #111216b3;
  font-size: 9px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.12em;
  color: var(--bf-muted);
}
.brand-badge-mark {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 4px;
}
.billing-onboarding-heading h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  color: #f4f4f5;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
  margin: 18px 0 14px;
  text-wrap: balance;
}
.billing-onboarding-heading p {
  margin: 0;
  color: var(--bf-muted);
  line-height: 1.7;
  font-size: 13px;
}
.billing-access-note {
  text-align: center;
  color: #92929d;
  font-size: 11px;
  line-height: 1.6;
  margin: 20px 0;
}
.billing-onboarding-footer,
.billing-onboarding-footer > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--bf-muted);
  font-size: 11px;
}
.billing-onboarding-footer {
  border-top: 1px solid var(--bf-edge);
  padding-top: 18px;
}
.billing-onboarding-footer button {
  font-size: 11px;
  padding: 0;
}
@media (max-width: 700px) {
  .subscription-section {
    grid-template-columns: 1fr;
  }
  .subscription-story,
  .subscription-checkout {
    padding: 24px;
  }
  .subscription-checkout {
    order: -1;
    border-left: 0;
    border-top: 0;
    border-bottom: 1px solid var(--bf-edge);
  }
  .subscription-benefits {
    gap: 16px;
    margin: 22px 0;
  }
  .onboarding-billing {
    padding: 20px 16px;
  }
  .billing-step-label {
    font-size: 8px;
  }
  .billing-step-label > span {
    margin: 0 3px;
  }
  .billing-brandbar .brand {
    font-size: 14px;
  }
  .billing-brandbar .brand img {
    width: 25px;
    height: 25px;
  }
  .billing-onboarding-heading {
    margin: 32px auto 24px;
  }
  .billing-onboarding-footer {
    justify-content: center;
  }
}

.auth-oauth-message {
  padding: 12px 14px;
  border: 1px solid var(--bf-edge);
  background: #3b5aea0c;
  color: #d4d4d8;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.7;
}

/* Dedicated login capture, following V5's authentication wizard. */
body.profile-capture-page {
  background:
    radial-gradient(ellipse at top, #18213a66, transparent 65%), #09090b;
}
.profile-capture {
  width: min(1152px, calc(100% - 64px));
  height: 100dvh;
  min-height: 660px;
  margin: 0 auto;
  padding: 48px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.capture-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 32px;
  padding: 24px;
  border: 1px solid #ffffff12;
  border-radius: 24px;
  background: #18181bf2;
  box-shadow: 0 20px 50px #0003;
}
.capture-intro {
  flex: 1;
  min-width: 0;
}
.capture-back.quiet {
  padding: 0;
  margin-bottom: 12px;
  border: 0;
  background: none;
  border-radius: 0;
  color: #a1a1aa;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.capture-header h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.035em;
}
.capture-intro > p {
  max-width: 640px;
  margin: 8px 0 12px;
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.65;
}
.capture-target {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #93c5fd;
  font-size: 12px;
}
.capture-target > i {
  font-size: 9px;
}
.capture-target > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.capture-actions {
  width: 240px;
  flex-shrink: 0;
}
.capture-actions label {
  margin: 0 0 7px;
  font-size: 11px;
  color: #a1a1aa;
}
.capture-actions input {
  height: 38px;
  margin-bottom: 10px;
  font-size: 13px;
}
.capture-actions .primary {
  background: #3b5aea;
  border-color: #6179f1;
  width: 100%;
  min-height: 44px;
  gap: 10px;
  border-radius: 12px;
  font-size: 13px;
}
.capture-close.quiet {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px;
  border: 0;
  background: none;
  color: #71717a;
}
.capture-browser {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #ffffff14;
  border-radius: 24px;
  background: #09090b;
  box-shadow: 0 28px 70px #0005;
}
.capture-titlebar {
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid #ffffff0c;
  background: #18181b;
}
.capture-window-dots {
  display: flex;
  gap: 8px;
  width: 70px;
}
.capture-window-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f87171;
}
.capture-window-dots i:nth-child(2) {
  background: #fbbf24;
}
.capture-window-dots i:nth-child(3) {
  background: #34d399;
}
.capture-window-label {
  color: #a1a1aa;
  background: #09090b80;
  border: 1px solid #ffffff0c;
  border-radius: 6px;
  padding: 3px 14px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.capture-secure {
  color: #6ee7b7;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: flex;
  gap: 6px;
  align-items: center;
}
.capture-browser .browser-screen {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #09090b;
}
.capture-browser .browser-screen img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  cursor: default;
}
.capture-browser .browser-screen img:not([src]) {
  visibility: hidden;
}
.capture-browser .browser-screen:focus-visible {
  outline: 2px solid #3b5aea;
  outline-offset: -2px;
}
.capture-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  background: #09090bf2;
  color: #d4d4d8;
  font-size: 13px;
  line-height: 1.5;
}
.capture-loading > i {
  color: #6b83ff;
  font-size: 28px;
}
.capture-footer {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid #ffffff0c;
  background: #18181b;
}
.capture-footer > p {
  margin: 0;
  color: #a1a1aa;
  font-size: 11px;
}
.capture-footer i {
  margin-right: 6px;
}
.capture-keyboard summary {
  color: #d4d4d8;
  font-size: 11px;
  cursor: pointer;
  list-style: none;
}
.capture-keyboard .browserfoot {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: #18181b;
  border-top: 1px solid #ffffff14;
  box-shadow: 0 -12px 24px #0004;
}
.capture-keyboard .browserfoot input {
  background: #09090b;
}
@media (max-width: 720px) {
  .profile-capture {
    width: calc(100% - 16px);
    padding: 8px 0;
    gap: 8px;
    min-height: 720px;
  }
  .capture-header {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    border-radius: 14px;
  }
  .capture-header h1 {
    font-size: 21px;
  }
  .capture-intro > p {
    font-size: 12px;
    margin: 6px 0 10px;
  }
  .capture-back.quiet {
    margin-bottom: 8px;
  }
  .capture-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
    align-items: center;
  }
  .capture-actions label {
    grid-column: 1 / -1;
  }
  .capture-actions input {
    margin: 0;
  }
  .capture-actions .primary {
    padding: 10px 12px;
    min-height: 38px;
    font-size: 11px;
  }
  .capture-browser {
    border-radius: 14px;
  }
  .capture-titlebar {
    padding: 0 12px;
  }
  .capture-window-dots {
    width: auto;
    gap: 5px;
  }
  .capture-window-dots i {
    width: 8px;
    height: 8px;
  }
  .capture-footer {
    padding: 10px;
    flex-wrap: wrap;
  }
  .capture-footer > p,
  .capture-keyboard summary {
    font-size: 10px;
  }
}

/* Keep the setup rail compact and let the browser own the recording canvas. */
.builder-backdrop .builder-rail li {
  align-items: center;
  padding: 8px 0;
  margin: 0;
  gap: 10px;
}
.recording-page .studio-header,
.recording-page .studio-sidebar,
.recording-page .studio-footer,
.recording-page .live-viewer {
  display: none;
}
.recording-page .content {
  padding: 10px 12px 42px;
  max-width: none;
  margin: 0;
}
.recording-page .topline {
  min-height: 34px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.recording-page > .bf-cookie-settings,
.recording-page:not(:has(.bf-cookie-settings:not(:disabled)))
  #recorder-cookie-settings {
  display: none;
}
.recording-page .topline button {
  padding: 7px 12px;
  font-size: 12px;
}
.recording-page .browserbar {
  padding: 6px 10px;
}
.recording-page .browser-screen {
  width: min(100%, calc((100dvh - 184px) * 1.53846));
  margin: 0 auto;
}
.recording-page .browserfoot {
  padding: 5px 10px;
}
.recording-page #recorder-help {
  margin: 0;
  padding: 6px 12px;
  border: 0;
  font-size: 11px;
}
.recording-page .recorder-coach {
  top: 104px;
  right: 24px;
  width: 330px;
  padding: 16px;
  max-height: calc(100dvh - 154px);
  border-radius: 20px;
  background: #101014f5;
  border-color: #ffffff20;
  backdrop-filter: blur(20px);
}
.recorder-coach > .row {
  display: none;
}
.recorder-coach .coach-heading {
  margin-bottom: 14px;
}
.recorder-coach .coach-heading h3 {
  font-size: 16px;
  line-height: 1.35;
}
.recorder-coach .coach-heading p {
  font-size: 12px;
  line-height: 1.6;
}
.recorder-coach #coach-progress {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #a5b4fc;
}
.recorder-guide-actions {
  display: grid;
  gap: 9px;
}
.recorder-guide-actions > button {
  width: 100%;
  font-size: 12px;
}
.recorder-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  text-align: left;
  border: 1px solid #ffffff16;
  border-radius: 12px;
  background: #ffffff04;
}
.recorder-choice > i:first-child {
  color: #93c5fd;
  font-size: 17px;
  width: 20px;
  text-align: center;
}
.recorder-choice > i:last-child {
  color: #71717a;
  font-size: 9px;
  margin-left: auto;
}
.recorder-choice span {
  flex: 1;
}
.recorder-choice strong,
.recorder-choice small {
  display: block;
}
.recorder-choice strong {
  color: #f4f4f5;
  font-size: 12px;
}
.recorder-choice small {
  margin-top: 5px;
  color: #a1a1aa;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 400;
}
.selection-cue {
  padding: 16px;
  text-align: center;
  border: 1px dashed #818cf866;
  border-radius: 12px;
  color: #a5b4fc;
  font-size: 12px;
  line-height: 1.5;
}
.selection-cue i {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
}
.recorder-results {
  border: 1px solid #ffffff12;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 5px;
}
.recorder-results > span {
  display: block;
  color: #a1a1aa;
  font-size: 10px;
  margin-bottom: 10px;
}
.recorder-results > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 6px 0;
  font-size: 12px;
}
.recorder-results i {
  color: #86efac;
}
.recorder-results small {
  color: #a1a1aa;
  margin-left: auto;
  font-size: 10px;
}
.recording-page .recorder-timeline {
  position: fixed;
  bottom: 8px;
  left: 12px;
  right: 12px;
  z-index: 40;
  margin: 0;
  padding: 8px 12px;
  background: #18181bf5;
  border-radius: 12px;
}
.recorder-timeline summary {
  cursor: pointer;
  font-size: 11px;
  color: #a1a1aa;
}
.recorder-timeline summary i {
  margin-right: 6px;
}
.recorder-timeline details[open] #steps {
  margin-top: 12px;
}
.input-review {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.input-review > div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #ffffff14;
  border-radius: 12px;
}
.input-review span {
  font-size: 11px;
  color: #a1a1aa;
}
.input-review strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.input-review button {
  justify-self: start;
  font-size: 12px;
}
.list-options[hidden] {
  display: none;
}
.list-options > button {
  width: 100%;
  margin-top: 10px;
}
.recorder-coach .guide-actions {
  display: grid;
  gap: 8px;
}
@media (max-width: 720px) {
  .recording-page .content {
    padding: 8px 8px 44px;
  }
  .recording-page .browser-screen {
    width: 100%;
  }
  .recording-page .recorder-coach {
    position: static;
    width: auto;
    max-height: none;
    margin-top: 10px;
  }
  .recording-page .recorder-timeline {
    left: 8px;
    right: 8px;
  }
  .builder-backdrop .builder-rail li {
    padding: 0;
  }
}
.recording-page .browserfoot[hidden],
.recorder-coach .list-guide[hidden] {
  display: none;
}
.recorder-coach .coach-heading .blue-coach {
  width: 60px;
  min-width: 60px;
  height: 76px;
}
.recorder-coach .primary {
  background: #3b5aea;
  border-color: #6179f1;
}
.field-options {
  margin-top: 18px;
  border-top: 1px solid #ffffff12;
  padding-top: 12px;
}
.field-options summary {
  color: #a1a1aa;
  font-size: 12px;
  cursor: pointer;
}
.recorder-guide-actions {
  grid-template-columns: minmax(0, 1fr);
}
.recorder-choice {
  white-space: normal;
}
.recorder-choice span,
.recorder-coach .coach-heading > div {
  min-width: 0;
}
.recorder-coach .coach-heading .blue-coach {
  height: 67px;
  background-size: 300px 200px;
  background-position: -180px 0;
}

.cortex-backdrop .dialog {
  max-width: 580px;
}
.ai-settings-backdrop .dialog {
  max-width: 620px;
}
.ai-settings-backdrop .cortex-heading {
  margin-bottom: 16px;
}
.ai-cortex-card {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid #34343d;
  border-radius: 12px;
  background: #ffffff04;
}
.cortex-settings .ai-field-hint {
  margin: 6px 0 16px;
  font-size: 11px;
}
.ai-key-saved {
  margin-left: 8px;
  font-size: 10px;
  color: #86d4b1;
  font-weight: 400;
}
.cortex-settings .ai-data-note {
  padding: 12px 14px;
  margin-top: 20px;
  border-radius: 8px;
  background: #ffffff05;
  font-size: 11px;
}
.ai-data-note i {
  margin-right: 6px;
}
.cortex-settings .ai-test-status {
  color: #86d4b1;
  font-size: 12px;
}
.ai-test-status:empty {
  display: none;
}
.ai-settings-actions {
  flex-wrap: wrap;
}
.ai-settings-actions [data-ai-disconnect] {
  margin-right: auto;
}
.cortex-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.cortex-heading .settings-illustration {
  margin: 0;
  flex-shrink: 0;
  color: #a5b4fc;
  font-size: 22px;
}
.cortex-heading .eyebrow {
  font-size: 9px;
  color: #a1a1aa;
}
.cortex-heading h3 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: -0.025em;
}
.cortex-heading > .badge {
  margin-left: auto;
}
.cortex-settings h4 {
  margin: 0 0 10px;
  font-size: 15px;
}
.cortex-settings p {
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.7;
}
.cortex-settings .cortex-runtime {
  font-size: 11px;
  color: #85858f;
}
.cortex-settings .cortex-coming-soon {
  margin: 18px 0 0;
  font-size: 11px;
  color: #85858f;
}
@media (max-width: 620px) {
  .cortex-heading {
    flex-wrap: wrap;
  }
  .cortex-heading h3 {
    font-size: 18px;
  }
}

.share-categories {
  margin: 20px 0;
}
.share-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.share-category-grid .share-category-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #27272a;
  border-radius: 12px;
  background: #09090bb3;
  color: #d4d4d8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.share-category-choice:hover {
  border-color: #52525b;
  background: #18181b;
}
.share-category-choice:has(input:checked) {
  border-color: #6179f180;
  background: #3b5aea18;
  color: #e0e7ff;
}
.share-category-choice:has(input:focus-visible) {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
.share-category-grid input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 0;
  accent-color: #3b5aea;
}
@media (max-width: 480px) {
  .share-category-grid {
    grid-template-columns: 1fr;
  }
}

/* Shared window chrome, following the Login Profiles title bar. */
.dialog-backdrop:where(
    :not(.builder-backdrop, .recorder-intro, .loading-backdrop)
  )
  > .dialog {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #09090b;
  border-radius: 12px;
  box-shadow: 0 28px 90px #0009;
}
.dialog-backdrop:where(
    :not(.builder-backdrop, .recorder-intro, .loading-backdrop)
  )
  > .dialog
  > .dialog-header {
  flex-shrink: 0;
  min-height: 64px;
  padding: 14px 24px;
  gap: 16px;
  background: #18181bf2;
  border-bottom: 1px solid #ffffff0d;
  border-radius: 0;
}
.dialog-backdrop:where(
    :not(.builder-backdrop, .recorder-intro, .loading-backdrop)
  )
  > .dialog
  > .dialog-header
  h2 {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.dialog-backdrop:where(
    :not(.builder-backdrop, .recorder-intro, .loading-backdrop)
  )
  > .dialog
  > .dialog-header
  .dialog-close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #a1a1aa;
  font-size: 23px;
  line-height: 1;
}

.dialog-backdrop:where(
    :not(.builder-backdrop, .recorder-intro, .loading-backdrop)
  )
  > .dialog
  > form {
  min-height: 0;
  overflow-y: auto;
}
@media (max-width: 600px) {
  .dialog-backdrop:where(
      :not(.builder-backdrop, .recorder-intro, .loading-backdrop)
    )
    > .dialog
    > .dialog-header {
    padding: 12px 18px;
    min-height: 60px;
  }
}

/* One hover palette for all Studio controls, including dialogs and onboarding. */
.dialog-header h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dialog-header h2 > .modal-title-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 1.25em;
  width: 1.25em;
  height: 1.25em;
  font-size: 1em;
  line-height: 1;
  letter-spacing: 0;
  color: #a1a1aa;
}
.dialog-header h2 > span {
  min-width: 0;
}

:root {
  --control-hover-background: #27272a;
  --control-hover-border: #3f3f46;
  --control-hover-text: #fafafa;
  --primary-hover-background: #4e6cf3;
  --primary-hover-border: #6b83f6;
  --danger-hover-background: #3b1d25;
  --danger-hover-border: #71303f;
  --danger-hover-text: #fda4af;
}
body:is(.studio-page, .auth-page, .onboarding-page) :is(button, .button) {
  --hover-background: var(--control-hover-background);
  --hover-border: var(--control-hover-border);
  --hover-text: var(--control-hover-text);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
body:is(.studio-page, .auth-page, .onboarding-page)
  :is(button, .button).primary {
  --hover-background: var(--primary-hover-background);
  --hover-border: var(--primary-hover-border);
  --hover-text: #fff;
}
body:is(.studio-page, .auth-page, .onboarding-page)
  :is(button, .button):is(.danger, .revoke) {
  --hover-background: var(--danger-hover-background);
  --hover-border: var(--danger-hover-border);
  --hover-text: var(--danger-hover-text);
}
body:is(.studio-page, .auth-page, .onboarding-page)
  :is(button, .button):not(:disabled):not([aria-disabled="true"]):not(
    .active,
    .selected,
    .is-active,
    .is-selected,
    [aria-pressed="true"],
    [aria-selected="true"],
    [aria-current]:not([aria-current="false"])
  ):hover {
  background: var(--hover-background);
  border-color: var(--hover-border);
  color: var(--hover-text);
}

/* Step evidence and repair review share the existing window/dialog treatment. */
.history-backdrop .dialog {
  width: min(1000px, calc(100vw - 32px));
  max-width: 1000px;
}
.history-steps {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}
.history-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
}
.history-step > div {
  display: flex;
  gap: 6px;
}
.history-image {
  position: relative;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.history-image img {
  display: block;
  width: 100%;
  height: auto;
}
.history-target {
  position: absolute;
  border: 2px solid #2563eb;
  background: #2563eb22;
  pointer-events: none;
}
.history-dom {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 300px;
  overflow: auto;
  font-size: 12px;
}
.repair-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.repair-comparison section {
  min-width: 0;
}
.repair-change dd {
  margin: 4px 0 12px;
  overflow-wrap: anywhere;
}
.repair-change dt {
  font-weight: 600;
}
.repair-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #818cf833;
  border-left: 3px solid #818cf8;
  border-radius: 10px;
  background: #818cf80a;
}
.repair-notice-icon {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  height: 32px;
  border-radius: 8px;
  color: #a5b4fc;
  background: #818cf814;
  font-size: 14px;
}
.repair-notice-copy {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.repair-notice-copy strong {
  color: #e4e4e7;
  font-size: 13px;
  font-weight: 600;
}
.repair-notice-copy > span {
  color: #a1a1aa;
  font-size: 12px;
  line-height: 1.5;
}
.saved-flow-card .repair-notice-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 10px;
  border: 1px solid #818cf833;
  border-radius: 7px;
  background: #818cf80f;
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 600;
}
.saved-flow-card .repair-notice-action:hover {
  background: #818cf824;
  border-color: #818cf866;
  color: #c7d2fe;
}
@media (max-width: 480px) {
  .repair-notice {
    flex-wrap: wrap;
  }
  .repair-notice-copy {
    flex-basis: calc(100% - 44px);
  }
  .saved-flow-card .repair-notice-action {
    margin-left: 44px;
  }
}
@media (max-width: 640px) {
  .repair-comparison {
    grid-template-columns: 1fr;
  }
  .history-step {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* One continuous, in-panel path for every output field. */
.field-wizard {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.field-wizard button {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.field-wizard button.primary {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.field-wizard .pattern-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.field-wizard .pattern-secondary button,
.field-wizard .field-refinement-actions button {
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 8px;
  white-space: normal;
  border: 1px solid #ffffff14;
  border-radius: 8px;
  background: #ffffff04;
}
.field-wizard .field-refinement-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.field-refinement-actions p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
.field-wizard .field-options {
  margin: 0;
  padding: 12px;
  border: 1px solid #ffffff12;
  border-radius: 8px;
}
.field-wizard .field-options summary {
  font-size: 12px;
  line-height: 1.5;
}
.field-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #ffffff12;
}
.field-wizard-footer button {
  min-height: 36px;
}
.field-wizard-footer [data-field-wizard="cancel"] {
  color: #a1a1aa;
}
.field-wizard-footer [data-field-wizard="cancel"]:hover {
  color: #fca5a5;
}
.field-wizard-progress {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
}
.field-wizard-progress li {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #71717a;
  font-size: 10px;
  text-align: center;
}
.field-wizard-progress span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #ffffff20;
  border-radius: 50%;
  font-size: 12px;
}
.field-wizard-progress [aria-current="step"] {
  color: #bfceff;
}
.field-wizard-progress [aria-current="step"] span {
  background: #3b5aea;
  color: white;
  border-color: #6380ff;
}
.field-wizard-progress .complete {
  color: #93c5b0;
}
.field-wizard-progress .complete span {
  background: #16814a20;
  border-color: #16814a80;
}
.field-wizard form {
  display: grid;
  gap: 12px;
}
.wizard-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.wizard-field-label strong {
  overflow-wrap: anywhere;
}
.wizard-coverage {
  margin: 0;
  color: #b8becb;
  font-size: 12px;
}
.field-wizard .pattern-preview {
  margin: 0;
  padding: 12px;
  background: #ffffff04;
  border: 1px solid #ffffff12;
  border-radius: 12px;
}
.field-wizard .pattern-preview li {
  overflow-wrap: anywhere;
}
.field-wizard .field-options input[type="checkbox"] {
  width: auto;
  margin-right: 6px;
}
.field-refinement summary {
  font-size: 12px;
  color: #a1a1aa;
  cursor: pointer;
}
.field-refinement button {
  margin-top: 10px;
}

/* Recorder timeline: compact during capture, full workbench on demand. */
.timeline-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.timeline-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.timeline-toolbar span,
.timeline-route,
.scroll-bundle summary span {
  color: #a1a1aa;
  font-size: 12px;
}
.timeline-toolbar input,
.timeline-toolbar select {
  width: auto;
  max-width: 220px;
}
.recorder-timeline #steps {
  max-height: 40vh;
  overflow: auto;
}
.recording-page .recorder-timeline.is-editing {
  z-index: 85;
}
.timeline-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 24px;
  height: min(62vh, 640px);
}
.timeline-actions,
.timeline-inspector {
  overflow: auto;
  min-width: 0;
  padding: 8px;
}
.timeline-inspector {
  border-left: 1px solid #ffffff18;
  padding: 16px;
}
.timeline-inspector h3 {
  font-size: 16px;
  margin: 0 0 16px;
}
.timeline-inspector p,
.timeline-inspector small {
  color: #a1a1aa;
  font-size: 12px;
  line-height: 1.6;
}
.timeline-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}
.timeline-step > .step {
  flex: 1;
  min-width: 0;
}
.timeline-step.is-selected {
  background: #3b5bdb22;
  border-color: #7aa2ff;
}
.timeline-step > input,
.timeline-list-options input[type="checkbox"] {
  width: auto;
}
.timeline-step .info small {
  overflow-wrap: anywhere;
}
.timeline-group,
.scroll-bundle,
.block-solvers {
  border: 1px solid #ffffff18;
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
}
.recorder-timeline .timeline-group > summary,
.recorder-timeline .scroll-bundle > summary,
.recorder-timeline .block-solvers > summary {
  color: #e4e4e7;
  font-size: 13px;
  padding: 5px;
}
.timeline-group > summary span,
.scroll-bundle > summary span {
  margin-left: 12px;
}
.block-solvers {
  background: #f59e0b08;
  border-color: #f59e0b33;
}
.block-solvers > p {
  font-size: 12px;
  color: #a1a1aa;
}
.timeline-route {
  margin: 5px 16px 10px;
}
.timeline-advanced,
.timeline-selectors {
  margin-top: 20px;
  border-top: 1px solid #ffffff18;
  padding-top: 16px;
}
.timeline-advanced summary,
.timeline-selectors summary {
  color: #a5b4fc;
  font-size: 13px;
}
.timeline-list-options {
  margin-top: 20px;
}
.timeline-inspector button {
  margin-top: 8px;
}
@media (max-width: 720px) {
  .timeline-workspace {
    grid-template-columns: 1fr;
    height: 60vh;
    overflow: auto;
    gap: 8px;
  }
  .timeline-actions,
  .timeline-inspector {
    overflow: visible;
  }
  .timeline-inspector {
    border-left: 0;
    border-top: 1px solid #ffffff18;
  }
  .timeline-toolbar input {
    max-width: 150px;
  }
  .timeline-step {
    gap: 4px;
    padding: 4px;
  }
  .timeline-step .step {
    padding: 6px;
  }
  .timeline-step button {
    font-size: 10px;
    padding: 6px;
  }
}

.recording-page .recorder-timeline.is-editing {
  background: #18181b;
  box-shadow: 0 -8px 40px #0006;
}
.recording-page:has(.recorder-timeline.is-editing) .recorder-coach {
  visibility: hidden;
}

/* Group boundaries and branching paths share the same timeline spine. */
.timeline-ungrouped,
.timeline-group {
  position: relative;
}
.timeline-ungrouped {
  padding-left: 18px;
  border-left: 2px solid #ffffff18;
  margin: 12px 0 12px 10px;
}
.timeline-group {
  border-left: 3px solid #648eff;
  background: #648eff05;
}
.timeline-group > summary {
  display: flex;
  align-items: center;
  gap: 10px;
}
.timeline-group > summary strong {
  flex: 1;
}
.timeline-group > summary span {
  color: #a1a1aa;
  font-size: 12px;
}
.timeline-edit-help {
  color: #a1a1aa;
  font-size: 12px;
  margin: 0 0 14px;
}
.timeline-record-point {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a1a1aa;
  font-size: 12px;
  margin: 10px 0;
  min-height: 34px;
}
.timeline-record-point::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #ffffff12;
}
.record-point-dot {
  width: 8px;
  height: 8px;
  border: 1px solid #71717a;
  border-radius: 50%;
  flex-shrink: 0;
}
.timeline-record-point.is-active {
  color: #a5baff;
}
.timeline-record-point.is-active .record-point-dot {
  background: #6996ff;
  border-color: #6996ff;
  box-shadow: 0 0 0 4px #6996ff18;
}
.timeline-fork {
  margin: 12px 10px 18px;
  display: grid;
  justify-items: center;
}
.path-condition {
  border: 1px solid #9b8cf966;
  border-radius: 10px;
  padding: 10px 16px;
  background: #9b8cf910;
  color: #d0c8ff;
  font-size: 13px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.path-condition > span {
  font-size: 18px;
  margin-right: 6px;
}
.path-lanes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  padding-top: 20px;
  position: relative;
  gap: 20px;
}
.path-lanes::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 20px;
  border-left: 1px solid #71717a;
}
.path-lane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  position: relative;
  padding-top: 14px;
  min-width: 0;
}
.path-lane::before {
  content: "";
  position: absolute;
  top: 0;
  width: calc(50% + 10px);
  height: 12px;
  border-top: 1px solid #71717a;
}
.path-lane.yes::before {
  left: 50%;
  border-left: 1px solid #71717a;
  border-top-left-radius: 6px;
}
.path-lane.no::before {
  right: 50%;
  border-right: 1px solid #71717a;
  border-top-right-radius: 6px;
}
.path-label {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 20px;
}
.path-lane.yes .path-label {
  color: #86d5ba;
  background: #86d5ba14;
}
.path-lane.no .path-label {
  color: #f6bd85;
  background: #f6bd8514;
}
.recorder-timeline .path-destination {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 500;
  padding: 9px 12px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #ffffff20;
  border-radius: 9px;
  background: #222226;
  color: #e4e4e7;
}
.recorder-timeline .path-destination:hover {
  border-color: #88a8ff;
  background: #648eff12;
}
.path-end {
  border: 1px solid #ffffff18;
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 12px;
  color: #a1a1aa;
}
.path-continue {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 18px;
  color: #71717a;
}
.path-error {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border-left: 2px dashed #f2b173;
  padding: 6px 12px;
  margin: 12px 18px;
  font-size: 12px;
  color: #f2b173;
}
.path-lanes.is-merged {
  padding-bottom: 20px;
}
.path-lanes.is-merged::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 0;
  height: 15px;
  border: 1px solid #71717a;
  border-top: 0;
  border-radius: 0 0 6px 6px;
}
.path-merge {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding-top: 14px;
  position: relative;
}
.path-merge::before {
  content: "";
  position: absolute;
  top: 0;
  height: 10px;
  border-left: 1px solid #71717a;
}
.path-merge small {
  color: #a1a1aa;
  font-size: 11px;
}
@keyframes timeline-target-flash {
  from {
    outline: 2px solid #88a8ff;
    outline-offset: 3px;
  }
  to {
    outline: 2px solid transparent;
    outline-offset: 3px;
  }
}
.timeline-target-flash {
  animation: timeline-target-flash 1.6s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .timeline-target-flash {
    animation: none;
    outline: 2px solid #88a8ff;
  }
}
@media (max-width: 720px) {
  .timeline-fork {
    margin-inline: 2px;
  }
  .path-lanes {
    gap: 10px;
  }
  .path-lane::before {
    width: calc(50% + 5px);
  }
  .timeline-group > summary {
    flex-wrap: wrap;
  }
}

/* One horizontal recording lane in both viewing and editing mode. */
.recording-page .recorder-timeline {
  background: #18181b;
}
.recorder-timeline #steps,
.timeline-actions {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  overflow: auto;
  overscroll-behavior-x: contain;
  min-width: 0;
  max-width: 100%;
  padding: 16px 8px 20px;
}
.recorder-timeline #steps[hidden] {
  display: none;
}
.timeline-ungrouped,
.timeline-group-content,
.timeline-node {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 0 0 auto;
  gap: 20px;
}
.timeline-ungrouped {
  padding: 0;
  margin: 0;
  border: 0;
}
.timeline-group-content {
  padding: 12px 0 4px;
}
.timeline-node {
  position: relative;
}
.timeline-node::after {
  content: "→";
  color: #71717a;
  flex: 0 0 auto;
}
.timeline-node > .step,
.timeline-step {
  width: 240px;
  flex: 0 0 240px;
  min-height: 100px;
  margin: 0;
}
.timeline-node > .step {
  align-items: flex-start;
  padding: 14px;
}
.timeline-node > .step .info {
  min-width: 0;
}
.timeline-node .step small {
  overflow-wrap: anywhere;
  white-space: normal;
}
.timeline-step {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  background: #202024;
  border-color: #ffffff14;
}
.timeline-step > .step {
  width: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}
.timeline-step > button {
  grid-column: 2;
  justify-self: start;
}
.timeline-node > [data-path-for]:empty {
  display: none;
}
.timeline-actions > *,
.recorder-timeline #steps > * {
  flex: 0 0 auto;
}
.timeline-group,
.scroll-bundle {
  margin: 0;
  flex: 0 0 auto;
  min-width: 230px;
  width: max-content;
  max-width: none;
  border-left: 1px solid #ffffff18;
  border-top: 3px solid #648eff;
}
.scroll-bundle {
  border-top-color: #71717a;
}
.timeline-group > summary {
  width: 100%;
  min-width: 230px;
}
.timeline-group > summary strong {
  max-width: 260px;
}
.timeline-group > summary span {
  flex: 0 0 auto;
}
.scroll-bundle > summary {
  max-width: 250px;
}
.block-solvers {
  margin: 0;
  width: max-content;
  min-width: 250px;
  max-width: none;
}
.block-solvers > p,
.block-solvers > small {
  display: block;
  max-width: 280px;
}
.block-solvers > .timeline-group {
  margin-top: 12px;
}
.timeline-record-point {
  width: 165px;
  flex: 0 0 165px;
  min-height: 80px;
  margin: 0;
}
.timeline-record-point::after {
  display: none;
}
.timeline-record-point > span:last-child {
  max-width: 130px;
}
.timeline-workspace {
  height: min(52vh, 520px);
}
.timeline-fork {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  margin: 8px 0;
  width: max-content;
}
.path-condition {
  width: 170px;
  flex: 0 0 170px;
}
.path-lanes {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  width: 210px;
  flex: 0 0 210px;
  gap: 0;
  padding: 0 0 0 28px;
}
.path-lanes::before {
  top: 50%;
  left: 0;
  width: 16px;
  height: 0;
  border-left: 0;
  border-top: 1px solid #71717a;
}
.path-lane {
  flex-direction: row;
  justify-content: flex-start;
  padding: 12px 0;
  gap: 7px;
  min-height: 62px;
}
.path-lane::before {
  width: 13px;
  height: 50%;
  left: -13px;
  right: auto;
  border: 0;
  border-radius: 0;
}
.path-lane.yes::before {
  top: 50%;
  left: -13px;
  height: 50%;
  border-left: 1px solid #71717a;
  border-top: 1px solid #71717a;
  border-radius: 5px 0 0 0;
}
.path-lane.no::before {
  top: 0;
  left: -13px;
  right: auto;
  height: 50%;
  border-left: 1px solid #71717a;
  border-bottom: 1px solid #71717a;
  border-top: 0;
  border-right: 0;
  border-radius: 0 0 0 5px;
}
.path-lanes.is-merged {
  width: 100px;
  flex-basis: 100px;
  padding: 0 16px 0 28px;
}
.path-lanes.is-merged::after {
  left: auto;
  right: 0;
  top: 25%;
  bottom: 25%;
  width: 16px;
  height: auto;
  border: 1px solid #71717a;
  border-left: 0;
  border-radius: 0 5px 5px 0;
}
.path-merge {
  width: 155px;
  flex: 0 0 155px;
  padding: 0 0 0 16px;
}
.path-merge::before {
  top: 50%;
  left: 0;
  height: 0;
  width: 12px;
  border-left: 0;
  border-top: 1px solid #71717a;
}
.path-continue {
  flex: 0 0 auto;
  margin: 8px 0;
  max-width: 190px;
}
.path-error {
  max-width: 230px;
  margin: 8px 0;
}
@media (max-width: 720px) {
  .timeline-workspace {
    display: flex;
    flex-direction: column;
    height: 58vh;
    overflow: auto;
  }
  .timeline-actions {
    flex: 0 0 auto;
    width: 100%;
    max-height: 32vh;
    overflow: auto;
  }
  .timeline-inspector {
    flex: 0 0 auto;
    width: 100%;
  }
  .timeline-step {
    gap: 8px;
    padding: 10px;
  }
  .timeline-step .step {
    padding: 0;
  }
  .timeline-step button {
    font-size: 12px;
    padding: 8px;
  }
  .timeline-group > summary {
    flex-wrap: nowrap;
  }
}

.timeline-selection {
  padding: 6px 10px;
  border: 1px solid #648eff55;
  border-radius: 12px;
  background: #648eff0d;
}
.timeline-context-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  min-width: 180px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  color: #f4f4f5;
  background: #242428;
  border: 1px solid #ffffff24;
  border-radius: 12px;
  box-shadow: 0 12px 36px #0008;
}
.timeline-context-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 7px;
  background: transparent;
}
.timeline-context-menu button:hover,
.timeline-context-menu button:focus-visible {
  background: #648eff26;
}

/* Keep batch controls compact, with optional guidance and mobile stacking. */
.replay-batch-settings {
  min-width: 0;
  margin: 24px 0;
  padding: 20px;
  border: 1px solid #ffffff14;
  border-radius: 12px;
}
.replay-batch-settings legend {
  padding: 0 6px;
  color: #ededed;
  font-size: 15px;
  font-weight: 600;
}
.replay-batch-intro,
.replay-batch-help,
.replay-batch-note {
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.6;
}
.replay-batch-settings .replay-batch-intro {
  margin: 14px 0 0;
}
.replay-batch-details {
  margin-top: 16px;
}
.replay-batch-details > summary {
  color: #a1a1aa;
  font-size: 12px;
  cursor: pointer;
}
.replay-batch-details > summary:hover,
.replay-batch-details > summary:focus-visible {
  color: #ededed;
}
.replay-batch-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 20px;
}
.replay-batch-fields label {
  margin-top: 0;
}
.replay-batch-settings .replay-batch-help {
  margin: 10px 0 0;
}
.replay-batch-settings .replay-batch-range {
  margin: 8px 0 0;
  color: #d4d4d8;
  font-size: 12px;
  line-height: 1.6;
}
.replay-batch-help strong {
  color: #d4d4d8;
  font-weight: 500;
}
.replay-batch-example {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #ffffff06;
  color: #b4b4bc;
  font-size: 13px;
  line-height: 1.7;
}
.replay-batch-example > strong {
  color: #ededed;
  font-weight: 500;
}
.replay-batch-settings .replay-batch-example p {
  margin: 6px 0 0;
}
.replay-batch-example b {
  color: #ededed;
  font-weight: 500;
}
.replay-batch-settings .replay-batch-note {
  margin: 14px 0 0;
}
/* The validation wait belongs to the builder, with a compact, readable status. */
.builder-backdrop.validation-running .dialog {
  width: min(920px, calc(100vw - 32px));
}
.validation-running .builder-layout {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 200px;
}
.validation-running .builder-content {
  padding: 40px;
}
.validation-loader {
  max-width: 480px;
  margin: 0 auto;
}
.validation-loader-spinner {
  width: 44px;
  height: 44px;
  margin-bottom: 26px;
  border: 3px solid #818cf826;
  border-top-color: #a5b4fc;
  border-right-color: #6380ff;
  border-radius: 50%;
  animation: validation-spin 0.85s linear infinite;
}
@keyframes validation-spin {
  to {
    transform: rotate(360deg);
  }
}
.validation-preview {
  margin-top: 20px;
  border: 1px solid #ffffff12;
  border-radius: 10px;
  background: #ffffff03;
  overflow: hidden;
}
.validation-preview summary {
  padding: 13px 16px;
  color: #a5b4fc;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.validation-preview-caption {
  margin: 0;
  padding: 0 16px 14px;
  color: #a1a1aa;
  font-size: 12px;
  line-height: 1.5;
}
.validation-preview img {
  display: block;
  width: 100%;
  border-top: 1px solid #ffffff12;
}
.validation-preview img[hidden] {
  display: none;
}
.live-run-backdrop .dialog {
  width: min(1080px, calc(100vw - 32px));
}
.builder-backdrop.validation-running.validation-watching .dialog {
  width: min(1080px, calc(100vw - 32px));
}
.validation-watching .validation-loader {
  max-width: 680px;
}
.validation-loader > .eyebrow {
  color: #a5b4fc;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.validation-loader h3 {
  margin: 10px 0;
  color: #fafafa;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.validation-loader-description {
  margin: 0 0 28px;
  color: #a1a1aa;
  font-size: 14px;
  line-height: 1.65;
}
.validation-loader-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid #ffffff12;
  border-radius: 12px 12px 0 0;
  background: #ffffff04;
  color: #e4e4e7;
  font-size: 13px;
}
.validation-loader-dot {
  flex: 0 0 7px;
  height: 7px;
  border-radius: 50%;
  background: #819bff;
  box-shadow: 0 0 0 4px #6380ff16;
}
.validation-loader-track {
  height: 3px;
  overflow: hidden;
  border-radius: 0 0 4px 4px;
  background: #6380ff18;
}
.validation-loader-track > span {
  display: block;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #819bff, transparent);
  animation: validation-loading 2s ease-in-out infinite;
}
.validation-loader-hint {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 22px 0 0;
  color: #a1a1aa;
  font-size: 12px;
  line-height: 1.7;
}
.validation-loader-hint i {
  color: #71717a;
}
@keyframes validation-loading {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(385%);
  }
}
@media (max-width: 620px) {
  .builder-backdrop.validation-running .dialog {
    width: calc(100vw - 16px);
  }
  .validation-running .builder-content {
    padding: 28px 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .validation-loader-spinner {
    animation: none;
  }
  .validation-loader-track > span {
    animation: none;
    width: 100%;
    opacity: 0.65;
  }
}

/* The header search previews results without filtering the dashboard. */
.studio-header .global-search {
  position: relative;
}
.global-search-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: min(520px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #ffffff1a;
  border-radius: 16px;
  background: #16171b;
  box-shadow:
    0 20px 60px #0008,
    0 4px 12px #0004;
  text-align: left;
}
.global-search-panel[hidden] {
  display: none;
}
#global-search-results {
  max-height: min(480px, calc(100dvh - 200px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
}
.global-search-group + .global-search-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #ffffff0d;
}
.global-search-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 8px;
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.global-search-heading span {
  color: #71717a;
  font-variant-numeric: tabular-nums;
}
.global-search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #f4f4f5;
  text-decoration: none;
}
.global-search-result:hover,
.global-search-result[aria-selected="true"] {
  background: #3b5aea20;
  color: #fff;
}
.global-search-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid #ffffff0d;
  border-radius: 10px;
  background: #ffffff05;
  color: #a5b4fc;
}
.global-search-icon img,
.global-search-icon svg {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.global-search-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.global-search-copy strong,
.global-search-copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.global-search-copy strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.global-search-copy small {
  color: #a1a1aa;
  font-size: 11px;
  line-height: 1.4;
}
.global-search-arrow {
  color: #71717a;
  font-size: 16px;
}
.global-search-result:hover .global-search-arrow,
.global-search-result[aria-selected="true"] .global-search-arrow {
  color: #a5b4fc;
}
.global-search-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid #ffffff0d;
  color: #a1a1aa;
  font-size: 11px;
}
.global-search-footer > span > span {
  margin-left: 12px;
}
.global-search-empty {
  display: grid;
  gap: 8px;
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
}
.global-search-empty span,
.global-search-more {
  color: #a1a1aa;
  font-size: 12px;
}
.global-search-more {
  margin: 6px 12px 12px;
  line-height: 1.5;
}
@media (max-width: 720px) {
  .studio-page .studio-header {
    flex-wrap: wrap;
    height: auto;
    min-height: 116px;
    gap: 10px;
    padding: 12px 16px;
  }
  .studio-header .header-tools {
    margin-left: auto;
  }
  .studio-header .global-search {
    display: flex;
    flex: 1 0 100%;
    order: 2;
    max-width: none;
    margin: 0;
  }
  .global-search-panel {
    width: 100%;
    top: calc(100% + 8px);
  }
  .global-search-footer > span[aria-hidden] {
    display: none;
  }
  .navigation-open .studio-sidebar {
    top: 120px;
  }
}

.runtime-meter {
  margin: 1.25rem 0;
  padding: 1.1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: #111113;
}
.runtime-benefits {
  font-weight: 600;
}
.runtime-label,
.runtime-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.runtime-meter progress {
  display: block;
  width: 100%;
  height: 10px;
  margin: 0.7rem 0;
  accent-color: #2563eb;
}
.runtime-meter small,
.runtime-caption {
  color: #a1a1aa;
  font-size: 0.85rem;
}
.runtime-meter button {
  margin-top: 0.8rem;
}
.runtime-banner {
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  background: #fffbeb;
  color: #78350f;
  font-size: 0.9rem;
}
.runtime-banner a {
  color: inherit;
  font-weight: 600;
}
.runtime-banner.runtime-urgent {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.runtime-meter small {
  display: block;
  margin-top: 0.5rem;
}
