.toolbar-text-link {
  position: relative;
  display: inline-flex;
  height: auto;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink, #050b1a);
  background: none;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: none;
  transition: color 160ms ease, text-shadow 160ms ease;
}

.toolbar-text-link::after {
  content: none;
}

.toolbar-text-link > span {
  position: static;
  z-index: auto;
}

.toolbar-text-link:hover {
  color: var(--ink, #050b1a);
  background: none;
  box-shadow: none;
  text-shadow: 0 8px 18px rgb(113 55 255 / 28%);
  transform: none;
}

.toolbar-text-link:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgb(113 55 255 / 24%);
  outline-offset: 4px;
}

.toolbar-text-link[aria-current="page"] {
  color: var(--accent-800, #6d28d9);
}

#authSlot > .auth-control {
  position: relative;
  display: flex;
}

#authSlot .auth-button {
  position: relative;
  display: flex;
  min-width: 0;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink, #050b1a);
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: none;
  transition: color 160ms ease;
}

#authSlot .auth-button:hover:not(:disabled) {
  color: var(--ink, #050b1a);
  box-shadow: none;
  transform: none;
}

#authSlot .auth-button:hover:not(:disabled) .auth-button-label {
  text-shadow: 0 8px 18px rgb(113 55 255 / 28%);
}

#authSlot .auth-button > * {
  position: relative;
  z-index: 1;
}

#authSlot .auth-button:focus-visible,
#authSlot .auth-sign-out:focus-visible {
  outline: 3px solid rgb(113 55 255 / 24%);
  outline-offset: 3px;
}

#authSlot .auth-button:disabled {
  color: var(--ink, #050b1a);
  cursor: wait;
}

#authSlot .auth-button.is-signed-in {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-color: transparent;
  color: #111827;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#authSlot .auth-button.is-signed-in:hover:not(:disabled) {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform: none;
}

#authSlot .auth-button.is-signed-in .auth-method-icon {
  display: none;
}

#authSlot .auth-method-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

#authSlot .auth-apple-icon {
  fill: #676767;
}

#authSlot .auth-avatar,
#authSlot .auth-menu-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--accent-700, #7137ff);
  font-weight: 800;
}

#authSlot .auth-avatar {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  box-shadow: 0 8px 22px rgb(113 55 255 / 20%);
  font-size: 12px;
  line-height: 16px;
}

#authSlot .auth-button-photo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgb(17 24 39 / 14%);
  object-fit: cover;
}

#authSlot .auth-button-label {
  white-space: nowrap;
  transition: text-shadow 160ms ease;
}

#authSlot .auth-button-label:empty {
  display: none;
}

#authSlot .auth-menu {
  position: absolute;
  top: 52px;
  right: 0;
  width: 290px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 54px rgb(17 24 39 / 16%);
}

#authSlot .auth-menu-user {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 8px 8px 12px;
  border-bottom: 1px solid #eef0f3;
}

#authSlot .auth-menu-photo,
#authSlot .auth-menu-avatar {
  width: 38px;
  height: 38px;
}

#authSlot .auth-menu-photo {
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
}

#authSlot .auth-menu-avatar {
  font-size: 12px;
}

#authSlot .auth-menu-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

#authSlot .auth-menu-copy strong,
#authSlot .auth-menu-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#authSlot .auth-menu-copy strong {
  color: #111827;
  font-size: 14px;
}

#authSlot .auth-menu-copy span {
  color: #7e8698;
  font-size: 12px;
}

#authSlot .auth-usage-billing,
#authSlot .auth-sign-out {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 10px 11px;
  border: 0;
  border-radius: 10px;
  color: #374151;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

#authSlot .auth-sign-out {
  margin-top: 2px;
}

#authSlot .auth-usage-billing:hover,
#authSlot .auth-sign-out:hover {
  color: var(--accent-850, #5b21b6);
  background: var(--accent-100, #faf9ff);
}

#authSlot .auth-usage-billing:focus-visible {
  outline: 3px solid rgb(113 55 255 / 24%);
  outline-offset: 3px;
}

#authSlot .auth-status {
  position: absolute;
  top: 51px;
  right: 0;
  width: max-content;
  max-width: 320px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #4b5563;
  background: #fff;
  box-shadow: 0 12px 30px rgb(17 24 39 / 10%);
  font-size: 12px;
  font-weight: 650;
  line-height: 17px;
}

#authSlot .auth-status[data-kind="error"] {
  border-color: #fecaca;
  color: #b42318;
  background: #fff7f7;
}

.sign-in-dialog-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  background: rgb(5 11 26 / 18%);
  backdrop-filter: blur(6px);
}

.sign-in-dialog {
  position: fixed;
  z-index: 41;
  top: 50%;
  left: 50%;
  display: flex;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  flex-direction: column;
  overflow: auto;
  padding: 24px;
  border: 1px solid rgb(255 255 255 / 96%);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 0%, rgb(255 255 255 / 98%), rgb(255 255 255 / 68%) 42%, rgb(245 247 252 / 72%)),
    rgb(255 255 255 / 84%);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -10px 28px rgb(126 134 152 / 7%),
    0 34px 90px rgb(17 24 39 / 22%),
    0 8px 24px rgb(35 42 59 / 8%);
  backdrop-filter: blur(36px) saturate(1.35);
  transform: translate(-50%, -50%);
}

.sign-in-dialog.is-options {
  min-height: 300px;
}

.sign-in-dialog.is-email {
  min-height: 332px;
}

.sign-in-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.sign-in-dialog-header h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 28px;
}

.sign-in-dialog-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 96%);
  border-radius: 999px;
  color: #596174;
  background:
    radial-gradient(circle at 28% 18%, rgb(255 255 255 / 98%), rgb(255 255 255 / 42%) 42%, rgb(245 247 252 / 50%)),
    rgb(255 255 255 / 56%);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -5px 12px rgb(126 134 152 / 6%),
    0 10px 24px rgb(35 42 59 / 9%);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.sign-in-dialog-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.sign-in-options,
.sign-in-email-form {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
}

.sign-in-choice {
  position: relative;
  display: flex;
  width: 100%;
  height: 50px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.sign-in-choice svg {
  position: absolute;
  left: 18px;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.sign-in-choice-apple {
  border: 1px solid rgb(17 24 39 / 94%);
  color: #fff;
  background: #111827;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), 0 10px 24px rgb(17 24 39 / 14%);
}

.sign-in-choice-apple svg {
  fill: #676767;
}

.sign-in-choice-google {
  border: 1px solid rgb(255 255 255 / 96%);
  color: #111827;
  background: radial-gradient(circle at 28% 18%, rgb(255 255 255 / 98%), rgb(255 255 255 / 42%) 42%, rgb(245 247 252 / 50%));
  box-shadow: inset 0 1px 0 #fff, inset 0 -5px 12px rgb(126 134 152 / 6%), 0 10px 24px rgb(35 42 59 / 9%);
}

.sign-in-choice-email {
  border: 1px solid transparent;
  color: #596174;
  background: transparent;
  box-shadow: none;
}

.sign-in-choice-email svg,
.sign-in-field svg {
  fill: none;
  stroke: var(--accent-700);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sign-in-choice:hover:not(:disabled),
.sign-in-dialog-close:hover:not(:disabled) {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 20%), 0 16px 32px color-mix(in srgb, var(--accent-shadow) 15%, transparent);
  transform: translateY(-1px);
}

.sign-in-choice-email:hover:not(:disabled) {
  color: #111827;
  background: rgb(255 255 255 / 48%);
  box-shadow: none;
}

.sign-in-field {
  display: flex;
  width: 100%;
  height: 48px;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  border: 1px solid rgb(126 134 152 / 22%);
  border-radius: 16px;
  background: rgb(255 255 255 / 72%);
  box-shadow: inset 0 1px 0 #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.sign-in-field:focus-within {
  border-color: color-mix(in srgb, var(--accent-700) 46%, transparent);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 3px color-mix(in srgb, var(--accent-700) 12%, transparent);
}

.sign-in-field svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sign-in-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: #111827;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}

.sign-in-field input::placeholder {
  color: #7e8698;
  opacity: 1;
}

.sign-in-email-submit {
  display: flex;
  width: 100%;
  height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid color-mix(in srgb, var(--accent-800) 92%, transparent);
  border-radius: 999px;
  color: #fff;
  background: var(--accent-700);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 28%), 0 12px 26px color-mix(in srgb, var(--accent-700) 22%, transparent);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.sign-in-email-submit svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sign-in-back {
  width: 100%;
  height: 38px;
  padding: 0;
  border: 0;
  color: #596174;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.sign-in-dialog-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 12px;
  color: #b42318;
  background: #fff1f1;
  font-size: 12px;
  font-weight: 650;
  line-height: 17px;
  text-align: center;
}

.sign-in-dialog-status[data-kind="busy"] {
  color: var(--accent-750);
  background: var(--accent-75);
}

.sign-in-cancel {
  padding: 0;
  border: 0;
  color: #596174;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.sign-in-cancel:hover {
  color: #111827;
}

.sign-in-choice:disabled,
.sign-in-dialog-close:disabled,
.sign-in-email-submit:disabled,
.sign-in-back:disabled,
.sign-in-field:has(input:disabled) {
  cursor: wait;
  opacity: 0.62;
}

.sign-in-dialog-close:focus-visible,
.sign-in-choice:focus-visible,
.sign-in-email-submit:focus-visible,
.sign-in-back:focus-visible,
.sign-in-cancel:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-700) 24%, transparent);
  outline-offset: 3px;
}

body.is-sign-in-dialog-open {
  overflow: hidden;
}

@media (max-width: 1160px) {
  .app-toolbar-page #authSlot {
    gap: 24px;
  }

  #authSlot .auth-button.is-signed-in {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding: 0;
  }
}

@media (max-width: 820px) {
  #authSlot .auth-button.is-signed-in {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
  }

  .sign-in-dialog {
    width: min(520px, calc(100vw - 32px));
    padding: 20px;
    border-radius: 24px;
  }

  .sign-in-dialog.is-options {
    min-height: 292px;
  }

  .sign-in-dialog.is-email {
    min-height: 324px;
  }

  .sign-in-dialog-header h2 {
    font-size: 20px;
  }
}

@media (max-width: 520px) {
  .app-toolbar-page #authSlot {
    gap: 18px;
  }

  #authSlot .auth-button.is-signed-in {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
  }

  .app-toolbar-page #authSlot > .examples-link {
    display: none;
  }
}

@media (max-width: 440px) {
  #authSlot .auth-button {
    gap: 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  #authSlot .auth-method-icon {
    display: none;
  }
}
