:root {
  --pricely-ink: #211833;
  --pricely-muted: #6f6879;
  --pricely-purple: #6331c7;
  --pricely-purple-dark: #241444;
  --pricely-lime: #d5ff73;
  --pricely-surface: #fbfafc;
  --pricely-line: #e7e1ee;
  color: var(--pricely-ink);
  background: var(--pricely-surface);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--pricely-surface);
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 26px;
  color: #fff;
  background:
    linear-gradient(100deg, rgb(30 17 57 / 98%), rgb(51 26 94 / 98%));
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  box-shadow: 0 8px 30px rgb(32 17 61 / 14%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--pricely-purple-dark);
  background: var(--pricely-lime);
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgb(25 14 49 / 10%);
  font-size: 19px;
  font-weight: 900;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 16px;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.brand-copy small {
  color: #d8cdec;
  font-size: 11px;
  letter-spacing: 0.015em;
}

.portal-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.portal-auth {
  display: flex;
  gap: 7px;
  align-items: center;
}

.auth-status {
  color: #d8cdec;
  font-size: 12px;
  font-weight: 650;
}

.auth-status.auth-error {
  color: #ffb5b5;
}

.auth-button {
  min-height: 32px;
  padding: 6px 11px;
  color: #fff;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

.auth-button:hover:not(:disabled) {
  background: rgb(255 255 255 / 16%);
}

.auth-button:focus-visible {
  outline: 2px solid var(--pricely-lime);
  outline-offset: 2px;
}

.auth-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.auth-clear {
  color: #25310a;
  background: var(--pricely-lime);
  border-color: var(--pricely-lime);
}

.contract,
.environment {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.contract {
  color: #dcd1ef;
  border: 1px solid rgb(255 255 255 / 16%);
}

.environment {
  color: #25310a;
  background: var(--pricely-lime);
}

#app {
  min-height: calc(100vh - 64px);

  --scalar-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --scalar-font-code: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --scalar-color-1: var(--pricely-ink);
  --scalar-color-2: var(--pricely-muted);
  --scalar-color-3: #97909f;
  --scalar-color-accent: var(--pricely-purple);
  --scalar-background-1: #fff;
  --scalar-background-2: #f8f6fa;
  --scalar-background-3: #f1edf5;
  --scalar-background-accent: #eee7fb;
  --scalar-border-color: var(--pricely-line);
  --scalar-sidebar-background-1: #f5f1f8;
  --scalar-sidebar-color-1: #332942;
  --scalar-sidebar-color-2: #7b7286;
  --scalar-sidebar-color-active: var(--pricely-purple);
  --scalar-sidebar-item-active-background: #e9e0f8;
  --scalar-sidebar-item-hover-background: #eee9f3;
  --scalar-sidebar-search-background: #fff;
  --scalar-sidebar-search-border-color: #ddd4e6;
  --scalar-button-1: var(--pricely-purple);
  --scalar-button-1-hover: #5124a9;
  --scalar-button-1-color: #fff;
  --scalar-radius: 8px;
  --scalar-radius-lg: 12px;
  --scalar-radius-xl: 16px;
  --scalar-content-max-width: 1540px;
  --scalar-custom-header-height: 64px;
}

#app .references-layout {
  min-height: calc(100vh - 64px);
}

#app .section-container:first-child {
  position: relative;
}

#app .section-container:first-child::before {
  display: block;
  width: fit-content;
  margin-bottom: 16px;
  padding: 6px 10px;
  color: #5420b6;
  background: #eee7fb;
  border: 1px solid #ded0f4;
  border-radius: 999px;
  content: "LIVE CONTRACT";
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

@media (max-width: 720px) {
  .portal-header {
    min-height: 58px;
    padding: 0 14px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .brand-copy small,
  .contract,
  .auth-status,
  .auth-button[data-auth-provider="operatorToken"] {
    display: none;
  }

  #app {
    min-height: calc(100vh - 58px);
    --scalar-custom-header-height: 58px;
  }
}
