@font-face {
  font-family: "Azeret Mono";
  src: url("/ui/AzeretMono.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --connect-font: "Azeret Mono", Consolas, monospace;
  --next-bg: #111111;
  --next-panel: #292929;
  --next-side: #111111;
  --next-ink: #ffffff;
  --next-muted: #bdbdbb;
  --next-line: #ffffff26;
  --next-glass: #292929;
  --next-selected: #245bff24;
  --next-accent: #adc1ff;
  --connect-blue: #245bff;
}

:root[data-theme="light"] {
  --next-bg: #f7f7f4;
  --next-panel: #ffffff;
  --next-side: #ffffff;
  --next-ink: #111111;
  --next-muted: #565656;
  --next-line: #e6e6e3;
  --next-glass: #ffffff;
  --next-selected: #245bff12;
  --next-accent: #245bff;
}

body, button, input, select, textarea, h1, h2, h3,
.canvas-heading h2, .inspector-heading h2 {
  font-family: var(--connect-font) !important;
}

h1, h2, h3 {
  font-weight: 600 !important;
}

.connect-signature {
  position: relative;
  display: block;
  width: min(168px, 42vw);
  aspect-ratio: 168 / 32;
  overflow: hidden;
  flex: none;
}
:root:not([data-theme="light"]) .connect-signature {
  background: #f7f7f4;
  border-radius: 6px;
}
body :is(.brand, .next-brand) .connect-signature img {
  position: absolute;
  width: 186%;
  height: auto;
  top: -68%;
  left: -8%;
  max-width: none;
}

.auth-page .orbit-system .connect-orbit-mark {
  height: auto;
  max-width: 100%;
  object-fit: contain;
  transform: none;
  filter: none;
}

body :is(button, a, input, select, textarea):focus-visible {
  outline-color: var(--connect-blue);
}

body button:is(.primary, .submit, .connect-secondary):not([role="tab"]) {
  min-height: 40px;
  border-radius: 12px;
  font-weight: 500;
}
body button:is(.primary, .submit):not([role="tab"]) {
  background: #111111 !important;
  border: 1px solid #777777 !important;
  color: #ffffff !important;
}
body button:is(.primary, .submit):hover:not(:disabled) {
  background: #292929 !important;
}
body button.connect-secondary {
  background: transparent !important;
  border: 1px solid var(--next-muted) !important;
  color: var(--next-ink) !important;
}
body button.connect-secondary:hover:not(:disabled) {
  background: var(--next-panel) !important;
}
:root[data-theme="light"] body button.connect-secondary:hover:not(:disabled) {
  background: #e6e6e3 !important;
}
body button:is(.primary, .submit, .connect-secondary):not(:disabled):is(:active, [aria-pressed="true"]) {
  background: #245bff !important;
  border-color: #245bff !important;
  color: #ffffff !important;
}
body button:is(.primary, .submit, .connect-secondary):disabled {
  background: #e6e6e3 !important;
  border-color: #e6e6e3 !important;
  color: #565656 !important;
  opacity: 1;
}
body button:is(.primary, .submit, .connect-secondary):focus-visible {
  outline: 2px solid #245bff;
  outline-offset: 3px;
}

.next-space .connect-space-avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 24%;
}

.connect-project-nav { display: none; }
body[data-view="editor"] .connect-project-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.connect-project-nav button { min-height: 40px; }
body[data-view="editor"] .canvas-card,
body[data-view="editor"] #controls {
  border-radius: 12px !important;
}
body[data-view="editor"] .shell-stage-footer {
  border-top: 1px solid var(--next-line);
}
body[data-view="editor"] .shell-tool-dock [aria-selected="true"] {
  box-shadow: inset 0 -2px var(--connect-blue) !important;
}
body[data-view="home"] .project-home .home-heading {
  gap: 16px;
}
.auth-page .account-layout .auth-card,
.next-page-content .next-automation-grid > section,
.next-page-content .next-connection {
  border-radius: 12px;
  border-color: var(--next-line);
}

body[data-view="editor"] .next-sidebar .connect-project-nav {
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  margin: 12px 0;
  padding: 10px 0;
  border-top: 1px solid var(--next-line);
}
.next-sidebar .connect-project-nav button {
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  color: var(--next-ink);
}
body[data-view="editor"] .canvas-column { min-width: 0; }
body[data-view="editor"] .shell-operation { margin-top: 12px; }
.connect-studio-shortcuts summary {
  cursor: pointer;
  padding: 8px;
  font-size: 11px;
  color: var(--next-muted);
}
.next-sidebar .connect-project-nav button:hover,
.next-sidebar .connect-project-nav button:focus-visible {
  background: var(--next-selected);
  color: var(--next-accent);
}
.next-sidebar .connect-project-nav svg {
  width: 18px;
  height: 18px;
  flex: none;
}
body[data-view="editor"] .review-inspector { margin-bottom: 16px; }
body[data-view="editor"] .review-inspector .review-actions { grid-template-columns: 1fr; }

/* Signed header and the original Codrops demo-4 button geometry. */
body header.studio-header.orbit-header, body .next-header, body .auth-top {
  background: #111111 !important;
  color: #f7f7f4 !important;
}
body :is(.next-sidebar, header, .auth-top) .connect-signature {
  background: transparent;
  border-radius: 0;
}
body :is(header, .next-sidebar) .connect-signature img { filter: invert(1); }
body .next-sidebar { background: #111111; color: #f7f7f4; }
body .next-sidebar :is(a, button, summary) {color:#f7f7f4;}
body .next-sidebar :is(.next-space small,.next-nav-label) {color:#bdbdbb;}

body .connect-model4 {
  --button-bg: #111111;
  --button-stroke: #777777;
  --button-text: #f7f7f4;
  --button-stroke-hover: #245bff;
  --button-text-hover: #fff;
  --button-filler: #245bff;
  position: relative;
  isolation: isolate;
  min-width: 0;
  height: auto;
  min-height: 44px;
  margin: 0;
  border-radius: 999px!important;
  border: 1px solid var(--button-stroke)!important;
  background: var(--button-bg)!important;
  color: var(--button-text)!important;
  padding: 0 16px;
  font-size: inherit;
}
body .connect-model4.connect-secondary {
  --button-bg: transparent;
  --button-text: var(--next-ink);
}
body .connect-model4.button--hover:not(:disabled) {
  border-color: var(--button-stroke-hover)!important;
  color: var(--button-text-hover)!important;
}
body .connect-model4:disabled .button__filler { visibility: hidden; }
body .connect-model4 .button__text { position: relative; z-index: 1; }
body .connect-model4 .button__text-inner { gap: 7px; }
body .connect-model4:focus-visible:not(:disabled) {outline:2px solid #245bff;outline-offset:3px;}
@media (hover:none), (prefers-reduced-motion:reduce) {
  body .connect-model4:active:not(:disabled) {background:#245bff!important;color:#fff!important;}
}
.connect-panel-controls,.connect-project-mobile {display:none;}
@media (min-width:761px) {
  body[data-view="editor"] .connect-panel-controls {display:flex;gap:6px;}
  body[data-view="editor"].connect-sidebar-collapsed {padding-left:0!important;}
  body[data-view="editor"].connect-sidebar-collapsed .next-sidebar {display:none!important;}
  body[data-view="editor"].connect-inspector-collapsed main {grid-template-columns:minmax(0,1fr)!important;}
  body[data-view="editor"].connect-inspector-collapsed #controls {display:none!important;}
}
@media (max-width:760px) {
  body[data-view="editor"] .connect-project-mobile:not([hidden]) {display:block;min-width:0;color:#fff;}
  .connect-project-mobile summary {cursor:pointer;min-height:44px;display:flex;align-items:center;gap:6px;}
  .connect-project-mobile summary::after {content:'▾';}
  body[data-view="editor"] .next-header-context {display:none!important;}
  .connect-project-mobile .connect-project-nav {
    position:absolute;
    top:100%;
    inset-inline:12px;
    z-index:50;
    background:#111;
    border:1px solid #777;
    border-radius:12px;
    padding:8px;
    display:grid!important;
    color:#fff;
  }
  .connect-project-mobile:not([open]) .connect-project-nav {display:none!important;}
  .connect-project-mobile .connect-project-nav button {justify-content:flex-start;min-height:44px;}
}

:root:not([data-theme="light"]) body .next-sidebar .connect-signature {
  background: transparent;
}
body .connect-model4-nav {
  --button-bg: transparent;
  --button-text: #f7f7f4;
  --button-stroke: #575757;
  text-decoration: none;
}
body .connect-model4-nav .button__text-inner { justify-content: flex-start; }
body .connect-model4-nav[aria-current="page"] {
  --button-bg: #171f38;
  --button-stroke: #245bff;
}
body .shell-commands .connect-model4 { min-height: 40px; }
@media (max-width: 760px) {
  body .next-mobile-nav .connect-model4-nav {padding: 3px 4px;}
  body .next-mobile-nav .connect-model4-nav .button__text-inner {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }
}
